Balances
Balances Request
Message sent to request a list of the users current asset balances.
Balances Request Message
Name | Type | Comments |
---|---|---|
user_tag | string | Client 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
Name | Type | Comments |
---|---|---|
server_utc_timestamp | integer | Time at which the message was generated by the API |
user_tag | string | Client defined tag used to identify the request |
balances | Balance[] | See structure below |
Balance
Object
Name | Type | Comments |
---|---|---|
deliverable_id | integer | Id of deliverable |
symbol | string | Asset name e.g BTC , USD . For USD-REFERENCE see note below |
timestamp | integer | μs utc timestamp when the balance was last updated |
cash_balance | float | Total balance for that asset |
reserved_balance | float | Balance allocated to open orders and margin |
available_balance | float | Balance Available for trading |
withdrawable_balance | float | Balance 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
Name | Type | Comments |
---|---|---|
server_utc_timestamp | integer | Time at which the message was generated by the API |
user_tag | string | Client defined tag used to identify the request |
error_code | integer | Numeric value of error |
message | string | Text explanation of error |
{
"balances_response": {
"server_utc_timestamp": "1213455667789",
"user_tag": "unique_request_id",
"error_code": "28",
"message": "balance information not available"
}
}