Skip to main content

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​

FieldTypeDescriptionEnum Values
categoryint32Business type1 = spot, 2 = futures
trans_log_idstringTransaction log unique ID—
order_idstringAssociated order ID (empty if no association)—
trade_idstringAssociated trade ID (empty if no association)—
symbolstringAssociated trading pair (account-level transaction log is empty)—
trans_typestringTransaction typeSee the enumeration table below
trans_type_codestringInternational code for transaction type, e.g., E200001—
sidestringTrading direction (empty for trading transaction logs)BUY / SELL
actionstringFunding operation directionDEBIT = deduction, CREDIT = credit
sizestringExecution quantity (empty if no transaction log)—
trade_pricestringExecution price (empty if no transaction log)—
fundingstringFunding fee (only for futures funding fee logs)—
feestringCommission (positive for deduction, negative for rebate)—
fee_ratestringCommission rate—
cash_flowstringCash flow (account balance change)—
changestringAccount balance variation value—
cash_balancestringAccount available balance after adjustment—
mark_pricestringMark price at the time of transaction—
trans_log_timeint64transaction timestamp in milliseconds (UTC+8)—
settle_coinstringSettlement asset.—
remarkstringNotes—

trans_type Values​

ValueMeaning
TRADENormal trade execution
FUNDINGFutures funding fee (positive = charged, negative = paid)
COMMISSIONfee
TRANSFERFund transfer
LIQUIDATIONforced liquidation
ADLAutomatic position reduction (ADL)
SETTLEMENTfutures settlement
BONUSExperience 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
}