Balances
GET{BASE_URL}/balances
Returns cash balances for a Hong Kong account in the account currency (HKD). Amounts are decimal strings with trailing zeros removed.
By default, values come from Atomic Vaults' stored ledger for the account.
With end_customer_id, the response is the end customer's sub-ledger
under the omnibus account. Only cash_available and
cash_withheld_for_buys are populated; the other fields are "0". An
unknown ID returns 400 DataRetrieval_Error.
With source=whale (omnibus requests only; ignored when
end_customer_id is set), cash_available is GigaMoney Whale's total
available cash, summed across the Whale accounts mapped to
account_number and expressed in currency. Every other field is
"0". If the account has no Whale mapping, the default ledger response
is returned. Whale failures return 502.
Request
Responses
- 200
- 400
- 401
- 500
- 502
- 503
OK
The request could not be accepted, for example because the account or
symbol is unavailable, a required paired account is missing, buying power
or position is insufficient, required market pricing is unavailable, an
identifier is duplicated, or an order field or requested lifecycle action
is invalid. A missing account_number, or one not linked to the API key,
also returns 400 BasicInput_Error.
Missing or invalid X-API-KEY.
Unexpected server-side failure, for example the order service did not
answer in time (AVInternal_Error, system too busy) or was
unreachable (Misc_Error). For order requests, check the order's
status before retrying: a retried order_id that was already
accepted is rejected as a duplicate.
A request to GigaMoney Whale failed or returned an unreadable response.
A required service is temporarily unavailable (for example the database, or for Hong Kong requests that read from GigaMoney Whale, the Whale connection). Retry later.