Skip to content

Balances ​

List balances ​

listBalances · GET /api/v1/balances · scope ledger:read

Returns one balance per asset on one network, for the whole install. Payouts draw on these balances and leave from your treasury.

There is no balance per customer address: payouts and their fees are held against the whole install, never one address. To follow one address, call listTransactions with its wallet_id.

Every asset a customer address accepts, or the ledger holds, is listed, with zeroes where nothing moved. Rows sort by asset_id; the list is complete, not paged. This call reads only the ledger, never a node.

Query

NameTypeNote
networkstringRequired. A network's code, in any case, or its id, from listNetworks. One that names no network of this install answers 400 with error.field.
sh
curl -sS "$FIATLESS_URL/api/v1/balances?network=$NETWORK" \
  -H "Authorization: Bearer $FIATLESS_KEY"

Responses

StatusMeaning
200Every balance on the network.
400A malformed value or query string, an unknown field or query parameter, a body member sent twice or matching a field only in another case, a bad cursor, or no Idempotency-Key on a call that needs one. The codes are invalid_request and idempotency_key_required.
401No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate.
403The key lacks the scope this call needs. The code is permission_denied.
500The install failed; the details stay in its logs. The code is internal_error.

200 OK

FieldTypeNote
network_iduuidThe network you asked for.
balancesobject[]Every balance on the network, sorted by asset_id; not a page.
balances[].network_iduuidThe network this balance is on.
balances[].asset_iduuidThe asset, within network_id.
balances[].confirmedstringConfirmed money in minus money out, for the whole install: every customer address and the treasury together.
balances[].heldstringHeld by payouts and sweep fees in progress.
balances[].availablestringWhat payouts can use: confirmed minus held. For native XRP and SOL it also leaves out what the treasury must keep: the XRPL treasury's observed account reserve, or Solana's 890,880-lamport rent-exempt minimum. On XRP it also leaves out the base reserve that each deposit address paid in XRP keeps, since no sweep can move it. 0 while spendable is false.
balances[].spendablebooleanfalse while payouts cannot draw on this balance: before its first confirmed movement; while a reorganisation undoes a payout, or a sweep on any network but Bitcoin; while the network's scanner has stopped (stale, halted or failing) or is at least its confirmation count behind; while a database restore's recovery waits for the operator to accept it; or while confirmed minus held is below the treasury's floor. On XRPL it is also false until the treasury's reserve has been observed.