Wallets API
How much of this token does this wallet hold right now, and what is it worth?
The wallet's current balance of one token, exact (on SOL summed over every token account it owns of it), with the USD price and value.
/api/external/wallet-analysis/wallet-token-balance/{chain}/{address}What it returns
The wallet's current balance of ONE token, with its USD value. On SOL it is summed over every token account the wallet owns of the token; on RHC it is the balance the token contract records for the wallet. balanceRaw and balance are exact decimal strings; "0" is a real zero. priceUsd and valueUsd are null when no price is known; the balance still stands. The native coin is not a token here: its wrapped token is.
Chains
- Solana SOL
- Robinhood Chain RHC
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/wallet-analysis/wallet-token-balance/SOL/<address>?token=<token>"
| Parameter | Description |
|---|---|
tokenquery · string · required | The token address: the mint on SOL, the token contract on RHC. |
chainpath · string · required | The chain the wallet address belongs to. SOL and RHC are served; BNB, ETH, BASE, STABLE and ARC return 400. CELO, ARB, OP and SCROLL return 400 here. |
addresspath · string · required | The wallet address. |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
wallet | string | The wallet asked about. |
token | string | The token asked about. |
balanceRaw | string | Base units, as a decimal string. |
decimals | integer | The token's decimals. |
balance | string | balanceRaw / 10^decimals, exact, as a decimal string. |
tokenAccounts | integer | null | How many token accounts of the token the wallet owns on SOL, where a wallet can own several; null on SOL when the count is not known for this answer. null on EVM chains (RHC): there a balance is recorded against the wallet in the token contract, so there are no token accounts to count. |
priceUsd | number | null | USD price of one token; null when no price is known. |
valueUsd | number | null | balance × priceUsd; null when no price is known. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key