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>
| Parameter | Description |
|---|---|
| symbol | indicates the trading pair |
Data Update
| Name | Type | Description |
|---|---|---|
| e | STRING | Topic |
| E | LONG | event time |
| s | STRING | trading pair |
| t | LONG | trade ID |
| p | STRING | trade price |
| q | STRING | trade quantity |
| T | LONG | trade time |
| m | BOOLEAN | whether 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: