Skip to content

Tokens

Fungible-token routes follow an account-model wallet API against the peer’s configured chaincode (schema family account-model / fungible-token v2.0, multi-token).

Authenticate with X-Api-Key. Full OpenAPI: API reference.

Contract

MethodPathPurpose
POST/api/tokens/issueIssue units to a wallet (default token)
POST/api/tokens/transferTransfer between wallets (default token)
GET/api/tokens/redeem/quoteQuote redemption for an amount
POST/api/tokens/redeemRedeem units from a wallet
GET/api/tokens/statsNetwork economics / supply snapshot
GET/api/tokens/{walletId}/balanceWallet balance
GET/api/tokens/{walletId}/historyWallet history

These seven routes remain the primary Peer REST wallet surface (VPC-private). Integrators should treat them as the stable contract; see Upgrade & compatibility.

Multi-token

A single network can host many independent coins. The primary / deploy-time token uses tokenId=default and keeps legacy ledger keys for rollback safety. Additional tokens use explicit ids:

MethodPathPurpose
GET/api/tokensList tokens on the network
POST/api/tokens/{tokenId}/issueIssue for a specific token
POST/api/tokens/{tokenId}/transferTransfer for a specific token
GET/api/tokens/{tokenId}/{walletId}/balanceBalance for a specific token
GET/api/tokens/wallets/{walletId}/portfolioHoldings across all tokens

Creating tokens (POST /api/tokens) is admin-tagged on Peer REST; SaaS builders use the public token gateway with token:create instead.

Public token gateway

SaaS backends that cannot reach the VPC call the public token gateway (X-Api-Key, internet-reachable) instead of Peer REST:

MethodPathScope
GET/token-gateway/whoamiResolve networkId + URLs from the API key alone
GET/token-gateway/{networkId}/tokenstoken:read
POST/token-gateway/{networkId}/tokenstoken:create
POST/token-gateway/{networkId}/tokens/{tokenId}/issuetoken:issue
POST/token-gateway/{networkId}/tokens/{tokenId}/transfertoken:transfer
POST/token-gateway/{networkId}/tokens/{tokenId}/redeemtoken:redeem
GET/token-gateway/{networkId}/wallets/{walletId}/portfoliotoken:read

Deep-links: API reference → token-gateway. Mint keys with token:* scopes in the dashboard Developer → API Keys page.

Wallet operations

Issue

POST /api/tokens/issue
X-Api-Key: <key>
Content-Type: application/json

{
  "walletId": "wallet-a",
  "usdAmount": 10,
  "coinUnits": 100
}

Transfer

{
  "fromWalletId": "wallet-a",
  "toWalletId": "wallet-b",
  "amount": 25
}

Redeem quote

GET /api/tokens/redeem/quote?amount=10
X-Api-Key: <key>

Redeem

{
  "walletId": "wallet-a",
  "amount": 10
}

Admin routes (out of scope)

Routes such as /api/tokens/init, /distribute, /top-up-reserve, /reverse, and audit-export require X-Admin-Api-Key and are operator tooling, not the partner wallet contract. They may appear in OpenAPI for completeness but are not the primary integration path.

Success shape

Successful submits typically return:

{
  "success": true,
  "transactionId": "…"
}

Evaluates (quote, balance, history, stats) return { "success": true, "result": … }. Failures use the error envelope.

Was this page clear?