Listing balances
Read the current balance of every currency held on your account.
account.balance.getMany returns the current balance of every currency you hold a non-zero amount of.
Request
POST /account.balance.getManyNo request body — this endpoint takes no input.
Response
{
"data": [
{
"id": "01a694ab-b2cb-43b4-b048-1ab9115ff052",
"account_id": "7724b470-552f-4d57-bfbf-f461fb620e73",
"balance": { "value": "1500000000", "code": "AUD", "decimals": 6 }
},
{
"id": "0070fd82-d3a8-4339-9466-1a91d0f4491d",
"account_id": "7724b470-552f-4d57-bfbf-f461fb620e73",
"balance": { "value": "250000000", "code": "USD", "decimals": 6 }
}
]
}- Only currencies you hold are returned — zero balances are filtered out, so an empty account returns an empty array.
balance.valueis the smallest unit at the returneddecimalsprecision, as a string. Use aBigIntor decimal library — neverNumber— to avoid precision loss.balance.codegives the currency.balance.decimalsgives the precision of that value — always use thedecimalsfrom the response to convertbalance.valueto a display amount (balances can be reported at a higher precision than the currency's display convention, e.g. fiat at 6 decimals).
Refreshing
Balances change asynchronously when transactions settle. Two recommended patterns:
- Webhook-driven — subscribe to webhooks and refetch balances when a
transaction.updatedevent reportsstatus: "COMPLETED". - On-view — refetch when the user opens the balance screen. Avoid polling on a tight loop; nothing changes between settlements.
Computing display amounts
function toDisplay(amount: string, decimals: number): string {
const big = BigInt(amount);
const negative = big < 0n;
const abs = negative ? -big : big;
const s = abs.toString().padStart(decimals + 1, "0");
const whole = s.slice(0, s.length - decimals);
const frac = s.slice(s.length - decimals);
return `${negative ? "-" : ""}${whole}.${frac}`;
}
toDisplay("250000000", 6); // "250.000000" (USD at 6-decimal ledger precision)
toDisplay("1500000000", 6); // "1500.000000" (AUD)
// Or map over the response:
data.map((b) => toDisplay(b.balance.value, b.balance.decimals));Decimals per currency are listed in the API reference.