Skip to main content

Balances

Balances Request

Message sent to request a list of the users current asset balances.

Balances Request Message

NameTypeComments
user_tagstringClient defined tag used to identify the request

Example

{
"balances": {
"user_tag": "unique_request_id"
}
}

Balances Response

This is a response to a balances request message.

Balances Response Message

NameTypeComments
server_utc_timestampintegerTime at which the message was generated by the API
user_tagstringClient defined tag used to identify the request
balancesBalance[]See structure below

Balance Object

NameTypeComments
deliverable_idintegerId of deliverable
symbolstringAsset name e.g BTC, USD. For USD-REFERENCE see note below
timestampintegerμs utc timestamp when the balance was last updated
cash_balancefloatTotal balance for that asset
reserved_balancefloatBalance allocated to open orders and margin
available_balancefloatBalance Available for trading
withdrawable_balancefloatBalance Available for withdrawal

Example

{
"server_utc_timestamp": "1670146133299527",
"user_tag": "unique_request_id",
"balances": [
{
"deliverable_id": "2",
"symbol": "USD-REFERENCE",
"cash_balance": "102707162.58",
"available_balance": "102065099.87",
"reserved_balance": "-642062.71",
"withdrawable_balance": "0",
"timestamp": "1670146130681482000"
},
{
"deliverable_id": "2",
"symbol": "USD",
"cash_balance": "101810613.5533626338",
"available_balance": "101491689.9579963306",
"reserved_balance": "-318923.5953663032",
"withdrawable_balance": "101491689.9579963306",
"timestamp": "1670146130680767000"
},
{
"deliverable_id": "17",
"symbol": "PTF",
"cash_balance": "100000",
"available_balance": "100000",
"reserved_balance": "0",
"withdrawable_balance": "100000",
"timestamp": "1670146130681482000"
},
{
"deliverable_id": "3",
"symbol": "BTC",
"cash_balance": "13.1947",
"available_balance": "13.1947",
"reserved_balance": "0",
"withdrawable_balance": "13.1947",
"timestamp": "1670146130680767000"
}
]
}

USD-REFERENCE special balance

The USD-REFERENCE balance corresponds to the entire account's balance (all assets combined) converted to USD.

The withdrawable_balance for the USD reference balance is always harcoded to 0.

Balances Response Error Message

NameTypeComments
server_utc_timestampintegerTime at which the message was generated by the API
user_tagstringClient defined tag used to identify the request
error_codeintegerNumeric value of error
messagestringText explanation of error
{
"balances_response": {
"server_utc_timestamp": "1213455667789",
"user_tag": "unique_request_id",
"error_code": "28",
"message": "balance information not available"
}
}