Wallets API
What a Solana wallet holds in ZK-compressed form
A Solana wallet's ZK-compressed SOL and its compressed token balances, one row per mint, paged: holdings the ordinary balance and portfolio tools do not see.
/api/external/wallet-analysis/compressed-balances/{chain}/{address}What it returns
Returns the balances a Solana wallet holds in ZK-COMPRESSED form, which the ordinary balance and portfolio endpoints do not see: compressed state lives in state Merkle trees, not in ordinary accounts. lamports is the total across every compressed account the wallet owns (0 when it owns none). tokens is one row per mint of its compressed token balances, raw base units, paged: pass the returned cursor back to read the next page. All figures are decimal strings; one is null only when it is too large to have been read exactly. slot is the lowest slot of the reads behind the answer.
Chains
- Solana SOL
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/compressed-balances/SOL/<address>"
| Parameter | Description |
|---|---|
limitquery · integer · optional | Token rows per page, 1 to 1000; 100 when omitted. |
cursorquery · string · optional | The cursor of the previous page. Omit it for the first. |
chainpath · string · required | SOL. Every other chain returns 400: ZK-compressed accounts and tokens are a Solana construct. |
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 |
|---|---|---|
address | string | The wallet asked about. |
slot | integer | The lowest slot the answer was read at. |
lamports | string | null | Total lamports in the wallet's compressed accounts, as a decimal string; "0" when it owns none. Null only when the figure was too large to be read exactly. |
tokens | object[] | One row per mint of the wallet's compressed token balances. Empty when it holds none. |
tokens[].mint | string | The token mint. |
tokens[].amountRaw | string | null | The compressed balance in raw base units (not divided by decimals), as a decimal string. Null only when it was too large to be read exactly. |
cursor | string | null | Pass it as cursor to read the next page of tokens; null on the last page. |
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