For AI agents: the documentation index is at /llms.txt, and this page is available as Markdown at /documentation/balances.md.
Balances and holds
The balance field is not the amount you can trade. It is the gross amount of an asset on the exchange, before the holds on your open orders and pending transfers. If you size orders or withdrawals from balance, the exchange rejects them for insufficient balance.
To get the amount you can use, subtract the holds.
Fields
GET /v1/cefi/balances returns these fields for each asset in balances[]:
| Field | Meaning |
|---|---|
balance | Gross amount of the asset on the exchange. |
unsettled | Net amount traded but awaiting custodian settlement. Positive is inbound; negative is an outbound obligation. |
order_hold | Amount held against open orders. Released as the orders fill or cancel. |
transfer_hold | Amount held against pending transfers and withdrawals. Released when the transfer settles or is rejected. |
It returns these once per account, next to balances[]:
| Field | Meaning |
|---|---|
fees_hold | Fee asset held against expected fees on open orders. |
unsettled_fees | Fees accrued from trading but not yet settled. |
fees_hold and unsettled_fees are in the fee asset, the settlement stablecoin, and only affect that asset.
Tradable amount
For any asset:
tradable = balance + unsettled - order_hold - transfer_holdFor the fee asset, also subtract the account-level fee amounts:
tradable(fee asset) = balance + unsettled - order_hold - transfer_hold
- fees_hold - unsettled_feesPositive unsettled (inbound trades) counts toward what you can trade; negative unsettled reduces it.
Withdrawable amount
The withdrawable amount is stricter than the tradable amount. Positive unsettled doesn't count until it settles, but negative unsettled still reduces the total.
withdrawable = balance + min(unsettled, 0) - order_hold - transfer_holdFor the fee asset, also subtract fees_hold and any positive unsettled_fees. Rebates owed to you don't count until they settle.
Worked example
A non-fee asset:
balance = 10000.00
unsettled = 50.00 (inbound trade awaiting settlement)
order_hold = 3000.00 (resting buy orders)
transfer_hold = 100.00 (pending withdrawal)
tradable = 10000 + 50 - 3000 - 100 = 6950.00
withdrawable = 10000 + 0 - 3000 - 100 = 6900.00 (inbound 50 excluded)An order sized from balance (10000) would over-commit by 3050 and be rejected. The most you can trade is the tradable amount, 6950.
- Need help? Ask us on Discord, or email [email protected].
- See what changed in the changelog