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.

GET/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>"
Parameters
ParameterDescription
limit

query · integer · optional

Token rows per page, 1 to 1000; 100 when omitted.
cursor

query · string · optional

The cursor of the previous page. Omit it for the first.
chain

path · string · required

SOL. Every other chain returns 400: ZK-compressed accounts and tokens are a Solana construct.
address

path · 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.

Response fields of What a Solana wallet holds in ZK-compressed form
FieldTypeDescription
addressstringThe wallet asked about.
slotintegerThe lowest slot the answer was read at.
lamportsstring | nullTotal 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.
tokensobject[]One row per mint of the wallet's compressed token balances. Empty when it holds none.
tokens[].mintstringThe token mint.
tokens[].amountRawstring | nullThe 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.
cursorstring | nullPass 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