Skip to main content
GET
/
chipi-wallets
/
token-balance
curl -X GET "https://api.chipipay.com/v1/chipi-wallets/token-balance?externalUserId=user_123&chainToken=USDC&chain=STARKNET" \
  -H "Authorization: Bearer sk_prod_xxxx" \
  -H "x-api-key: pk_xxxx"
{
  "chain": "STARKNET",
  "chainToken": "USDC",
  "chainTokenAddress": "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
  "decimals": 6,
  "balance": "15000000"
}
curl -X GET "https://api.chipipay.com/v1/chipi-wallets/token-balance?externalUserId=user_123&chainToken=USDC&chain=STARKNET" \
  -H "Authorization: Bearer sk_prod_xxxx" \
  -H "x-api-key: pk_xxxx"
{
  "chain": "STARKNET",
  "chainToken": "USDC",
  "chainTokenAddress": "0x033068F6539f8e6e6b131e6B2B814e6c34A5224bC66947c47DaB9dFeE93b35fb",
  "decimals": 6,
  "balance": "15000000"
}

Notes

  • The balance field is a raw integer string. Divide by 10^decimals to get the human-readable amount. In the example above, 15000000 / 10^6 = 15.0 USDC.
  • You can identify the wallet by either externalUserId or walletPublicKey. At least one is required.

Authorizations

Authorization
string
header
required

Bearer token — use your secret key (sk_prod_xxx) for server-side calls, or the user's JWT for client-side calls

x-api-key
string
header
required

Your Chipi public API key (pk_xxx)

Query Parameters

externalUserId
string

Your application's user identifier (provide this or walletPublicKey)

walletPublicKey
string

The wallet's public key / address (provide this or externalUserId)

chainToken
enum<string>
required

The token to query Token identifier

Available options:
USDC,
USDC_E,
USDT,
DAI,
ETH,
STRK,
SLINK,
ALF,
BROTHER,
ARB,
DOC,
MXNB,
WLD,
WBTC,
OTHER
chain
enum<string>
required

The blockchain network Blockchain network identifier

Available options:
STARKNET,
BASE,
ARBITRUM,
OPTIMISM,
ROOTSTOCK,
SCROLL,
WORLDCHAIN

Response

Token balance

chain
enum<string>
required

Blockchain network identifier

Available options:
STARKNET,
BASE,
ARBITRUM,
OPTIMISM,
ROOTSTOCK,
SCROLL,
WORLDCHAIN
chainToken
enum<string>
required

Token identifier

Available options:
USDC,
USDC_E,
USDT,
DAI,
ETH,
STRK,
SLINK,
ALF,
BROTHER,
ARB,
DOC,
MXNB,
WLD,
WBTC,
OTHER
chainTokenAddress
string
required

The token's contract address on the chain

decimals
integer
required

Number of decimal places for the token

balance
string
required

The raw balance (divide by 10^decimals for human-readable amount)