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
| Name | Type | Note |
|---|---|---|
network | string | Required. 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
| Status | Meaning |
|---|---|
200 | Every balance on the network. |
400 | A 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. |
401 | No API key, or one the install does not know. The code is authentication_required. Headers: WWW-Authenticate. |
403 | The key lacks the scope this call needs. The code is permission_denied. |
500 | The install failed; the details stay in its logs. The code is internal_error. |
200 OK
| Field | Type | Note |
|---|---|---|
network_id | uuid | The network you asked for. |
balances | object[] | Every balance on the network, sorted by asset_id; not a page. |
balances[].network_id | uuid | The network this balance is on. |
balances[].asset_id | uuid | The asset, within network_id. |
balances[].confirmed | string | Confirmed money in minus money out, for the whole install: every customer address and the treasury together. |
balances[].held | string | Held by payouts and sweep fees in progress. |
balances[].available | string | What 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[].spendable | boolean | false 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. |