User Transaction Subscription
Reminder
Before using this endpoint, please call the "server.sign" method for signature authorization.
Info
- The push delay of this method is: real-time
User Transaction Subscription
- Method:
user_deals.subscribe - Parameters:
| Parameter Name | Required | Type | Notes |
|---|---|---|---|
| market_list | true | []string | Market list. Empty list to subscribe to all markets. |
- Example:
// Subscribe to a singular market
{
"method": "user_deals.subscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Subscribe to multiple markets
{
"method": "user_deals.subscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Subscribe to all markets
{
"method": "user_deals.subscribe",
"params": {"market_list": []},
"id": 1
}
User Transaction Push
- Method:
user_deals.update - Parameters:
| Parameter Name | Type | Notes |
|---|---|---|
| deal_id | int | Txid |
| created_at | int | Transaction timestamp, millisecond |
| market | string | Market name |
| side | string | Buy or sell |
| order_id | int | Order id |
| client_id | string | Client ID |
| margin_market | string | Margin market, null for non-margin markets |
| price | string | Filled price |
| amount | string | Filled volume |
| role | string | Taker or maker |
| fee | string | Trading fee charged |
| fee_ccy | string | Trading fee currency |
- Example:
{
"method": "user_deals.update",
"data": {
"deal_id": 3514376759,
"created_at": 1689152421692,
"market": "BTCUSDT",
"side": "buy",
"order_id": 8678890,
"client_id": "client_id_1",
"margin_market": "BTCUSDT",
"price": "30718.42",
"amount": "0.00000325",
"role": "taker",
"fee": "0.0299",
"fee_ccy": "USDT"
},
"id": null
}
Cancel User Transaction Subscription
- Method:
user_deals.unsubscribe - Parameters:
| Parameter Name | Required | Type | Notes |
|---|---|---|---|
| market_list | true | []string | Market list. Empty list to unsubscribe to all markets. |
- Example:
// Unsubscribe to a singular market
{
"method": "user_deals.unsubscribe",
"params": {"market_list": ["BTCUSDT"]},
"id": 1
}
// Unsubscribe to multiple markets
{
"method": "user_deals.unsubscribe",
"params": {"market_list": ["BTCUSDT", "ETHUSDT"]},
"id": 1
}
// Unsubscribe to all markets
{
"method": "user_deals.unsubscribe",
"params": {"market_list": []},
"id": 1
}