GET https://api.trustware.io/api/v1/data/balances/:address
Returns token holdings for a wallet address across every chain compatible with that address format, scanned in parallel. Use this to populate an asset selector. The response includes token symbol, balance, decimals, USD price, and logo URI for each holding.
The scan covers every compatible chain, so a buffered response waits for the slowest one. Ask for a streamed response to render each chain as it lands instead.
Either way, check the partial flag: if true, at least one chain failed or timed out, and the holdings you received are incomplete. An empty wallet and an unreachable chain look identical in the rows themselves, so read partial before you render “no balances”.
Path parameters
Query parameters
Response
Response fields
Balance object fields
Streaming responses
Pass?stream=1 (or ?format=ndjson) to receive each chain’s result as soon as that chain answers, rather than waiting for the whole scan. The endpoint responds with 200 OK and streams newline-delimited JSON: one JSON object per line, terminated by a summary line.
X-Accel-Buffering: no is there to stop an intermediate proxy from buffering the body and erasing the benefit, so preserve it if you proxy this endpoint yourself.
Frames
type to tell the two frames apart. A chain_result frame carries the same per-chain object the buffered results[] array holds, flattened to the top level and wrapped with progress counters.
The
summary frame closes the stream.
Consuming the stream
Frames arrive in completion order, not in chain order, so a fast chain reports ahead of a slow one. Merge each frame into your own map keyed bychain_id rather than appending, and drive any progress indicator off completed and total.
Streaming is enabled per deployment. Where it is off, the endpoint rejects the request rather than silently buffering:
400, so treat it as a signal to retry the same URL without stream, not as a scan failure. Check the response Content-Type before you parse: a deployment that answers application/json to a streamed request has served you the buffered payload, and reading it line by line will fail.
The React SDK does all of this for you.
Trustware.getBalancesByAddressStream
streams by default from SDK 1.1.12, reports the summary through onSummary,
and falls back to the buffered response (emitting balance_stream_fallback)
when streaming is refused or aborted, or the runtime has no readable response
body. See
BalanceStreamOptions.Partial responses
Whenpartial: true, some chains responded with an error or did not return data before the scan finished. The results[].error field on each chain entry, or the error field on a streamed chain_result frame, indicates if that chain encountered an issue. Chains with error: null returned successfully.