Balances
Real time information about all of client’s balance(s) updates. The "Symbols” field in a request does not do anything for balances (it is ignored).
There are 7 different types of events: "place_order"
, "canceled_order"
,"match_order"
, "transfer_in"
, "transfer_out"
,
"deposit"
,"withdraw"
Stream Response Field | Data Type | Description |
---|---|---|
changeTime | Long | time the change was executed |
accountId | String | account id where the change is taking place |
accountType | String | SPOT is the default and only supported one |
eventType | String | event type |
available | String | currency amount available |
currency | String | currency name |
id | Long | id of the asset update |
userId | Long | user id |
hold | String | currency amount on hold |
ts | Long | time the record was pushed |
Example:
# --> Request
{
"event": "subscribe",
"channel": ["balances"]
}
# <-- Receipt Confirmation
{
"channel": "balances",
"event": "subscribe"
}
# <-- Stream
{
"channel": "balances",
"data": [{
"changeTime": 1657312008411,
"accountId": "1234",
"accountType": "SPOT",
"eventType": "place_order",
"available": "9999999983.668",
"currency": "BTC",
"id": 60018450912695040,
"userId": 12345,
"hold": "16.332",
"ts": 1657312008443
}]
}