Skip to content

Get account balance

GET https://rest.haasapi.com/v1/accounts/{account_id}/balance

Returns the account’s wallet: one row per currency (per wallet on venues with contract wallets), with available and total amounts. Returned whole - no pagination.

Requires the read scope.

Terminal window
curl "https://rest.haasapi.com/v1/accounts/{account_id}/balance" \
-H "Authorization: Bearer hk_live_YOUR_KEY"

200 OK. Returns a BalancePage.

{
"data": [
{
"currency": "BTC",
"wallet_id": "BTC",
"available": "10.0",
"total": "10.0"
},
{
"currency": "ETH",
"wallet_id": "ETH",
"available": "100.0",
"total": "100.0"
}
]
}
Field Type Description
data array of Balance The account’s wallet: one row per currency (per wallet on venues with contract wallets). Returned whole - no cursor.
Field Type Description
currency string The asset this row holds.
wallet_id string Wallet identifier. Equals currency on spot venues; distinguishes contract wallets on some futures venues.
available string (decimal) Amount free to trade.
total string (decimal) Total amount held, including what open orders and positions reserve.

All errors are RFC 9457 problem documents.

Status Description
400 The request is malformed (invalid limit, unusable cursor, …). (code: invalid_request)
401 Missing, malformed, disabled, or revoked API key. (code: invalid_api_key)
404 No accessible account with that id. (code: account_not_found)
500 An unexpected error inside the API. Nothing about the request caused it; retry, and quote the instance value if it persists. (code: internal_error)
502 An internal service answered in a way the API could not serve. Retry. (code: upstream_error)
503 The request could not be served right now. Retry with the same key - do not discard it. (code: temporarily_unavailable)
504 An internal service did not answer within the deadline. Retry with backoff. (code: upstream_timeout)
{
"type": "https://docs.haasapi.com/errors/invalid_request",
"title": "Invalid request",
"status": 400,
"detail": "The request is malformed (invalid limit, unusable cursor, …).",
"code": "invalid_request"
}