Skip to Content

Trade Stream

Trade stream pushes information for each trade. A trade is defined as a single taker trading with a single maker.

Subscribe URL

wss://stream.bittap.com/endpoint?format=JSON

Subscribe Parameters

Stream name: f_trade@<symbol>

ParameterDescription
symbolindicates the trading pair

Data Update

NameTypeDescription
eSTRINGTopic
ELONGevent time
sSTRINGtrading pair
tLONGtrade ID
pSTRINGtrade price
qSTRINGtrade quantity
TLONGtrade time
mBOOLEANwhether buyer is maker. If true, this trade is an active sell order, otherwise an active buy order.

Subscribe Example

{ "method": "SUBSCRIBE", "params": [ "f_trade@BTC-USDT-M" ], "id": "eru1bat" }

Subscribe Success Example

{ "code": 0, // 0 means success, non-0 means failure "msg":"", // failure reason, null when success "topic": ["", ""], // topics that failed to subscribe "id": 1 }

Data Update Example

{ "e": "f_trade", // topic "E": 1672515782136, // event time "s": "BTC-USDT-M", // trading pair "t": 12345, // trade ID "p": "0.001", // trade price "q": "100", // trade quantity "T": 1672515782136, // trade time "m": true // whether buyer is maker. If true, this trade is an active sell order, otherwise an active buy order. }

Unsubscribe Example

{ "method": "UNSUBSCRIBE", "params": [ "f_trade@BTC-USDT-M" ], "id": "eru1bat" }

Error Codes

No information available

Code Example

Last updated on: