Transaction Logs
A push is triggered when there is a change in account balance. The corresponding topics for spot and futures are spotTradingTransLog / futureTradingTransLog;
Push Fields
| Field | Type | Description | Enum Values |
|---|---|---|---|
category | int32 | Business type | 1 = spot, 2 = futures |
trans_log_id | string | Transaction log unique ID | — |
order_id | string | Associated order ID (empty if no association) | — |
trade_id | string | Associated trade ID (empty if no association) | — |
symbol | string | Associated trading pair (account-level transaction log is empty) | — |
trans_type | string | Transaction type | See the enumeration table below |
trans_type_code | string | International code for transaction type, e.g., E200001 | — |
side | string | Trading direction (empty for trading transaction logs) | BUY / SELL |
action | string | Funding operation direction | DEBIT = deduction, CREDIT = credit |
size | string | Execution quantity (empty if no transaction log) | — |
trade_price | string | Execution price (empty if no transaction log) | — |
funding | string | Funding fee (only for futures funding fee logs) | — |
fee | string | Commission (positive for deduction, negative for rebate) | — |
fee_rate | string | Commission rate | — |
cash_flow | string | Cash flow (account balance change) | — |
change | string | Account balance variation value | — |
cash_balance | string | Account available balance after adjustment | — |
mark_price | string | Mark price at the time of transaction | — |
trans_log_time | int64 | transaction timestamp in milliseconds (UTC+8) | — |
settle_coin | string | Settlement asset. | — |
remark | string | Notes | — |
trans_type Values
| Value | Meaning |
|---|---|
| TRADE | Normal trade execution |
| FUNDING | Futures funding fee (positive = charged, negative = paid) |
| COMMISSION | fee |
| TRANSFER | Fund transfer |
| LIQUIDATION | forced liquidation |
| ADL | Automatic position reduction (ADL) |
| SETTLEMENT | futures settlement |
| BONUS | Experience fund-related |
Push example (spot trade deduction transaction log)
{
"isSubResponse": false,
"data": [
{
"category": 1,
"trans_log_id": "log-9a8b7c6d",
"order_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"trade_id": "exec-7f3a2b1c",
"symbol": "BTC-USDT",
"trans_type": "TRADE",
"trans_type_code": "E200001",
"side": "BUY",
"action": "DEBIT",
"size": "0.04",
"trade_price": "65000.00",
"fee": "2.60",
"fee_rate": "0.001",
"cash_flow": "-2602.60",
"change": "-2602.60",
"cash_balance": "5397.40",
"trans_log_time": 1710000100000,
"settle_coin": "USDT"
}
],
"tps": { "t": "spotTradingTransLog", "ch": "tradingMaker", "id": "sub-006", "sk": [], "p": {} },
"sessionId": "client-session-001",
"tid": "evt-005",
"ts": 1710000100600
}