Skip to main content

User Transaction Subscription

Reminder
  • Before using this endpoint, please call the "server.sign" method for signature authorization.
  • The push delay of this method is: real-time

User Transaction Subscription

  • Method: user_deals.subscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringMarket 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 NameTypeNotes
deal_idintTxid
created_atintTransaction timestamp (millisecond)
order_idintRelated order id
client_idstringClient ID
position_idintPosition ID
marketstringMarket name
sidestringBuy or sell
pricestringFilled price
amountstringFilled volume
rolestringTaker or maker
feestringTrading fee charged
fee_ccystringTrading fee currency
  • Example:
{
"method": "user_deals.update",
"data": {
"deal_id": 123456789,
"created_at": 1689152421692,
"order_id": 12345678,
"client_id": "client_id_1",
"position_id": 927266133,
"market": "BTCUSDT",
"side": "buy",
"price": "30718.42",
"amount": "0.123",
"role": "taker",
"fee": "0.0299",
"fee_ccy": "USDT",
},
"id": null
}

Cancel User Transaction Subscription

  • Method: user_deals.unsubscribe
  • Parameters:
Parameter NameRequiredTypeNotes
market_listtrue[]stringMarket 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
}