Trade-by-Trade
Trade-by-trade pushes information for each transaction. A transaction is defined as a single taker trading with a single maker.
Subscribe URL
wss://stream.bittap.com/endpoint?format=JSON
Subscribe Parameters
Stream Name: s_trade@<symbol>
| Parameter | Description |
|---|---|
| symbol | indicates the trading pair |
Data Update
| Name | Type | Description |
|---|---|---|
| e | STRING | Topic |
| E | LONG | Event time |
| s | STRING | Symbol |
| t | LONG | Trade ID |
| p | STRING | Price |
| q | STRING | Quantity |
| T | LONG | Trade time |
| m | BOOLEAN | Is the buyer the market maker? If true, this was a passive sell order, otherwise it was an active buy order. |
Subscribe Example
{
"method": "SUBSCRIBE",
"params": [
"s_trade@BTC-USDT"
],
"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": "s_trade", // topic
"E": 1672515782136, // Event time
"s": "BTCUSDT", // Symbol
"t": 12345, // Trade ID
"p": "0.001", // Price
"q": "100", // Quantity
"T": 1672515782136, // Trade time
"m": true // Is the buyer the market maker? If true, this was a passive sell order, otherwise it was an active buy order.
}Unsubscribe Example
{
"method": "UNSUBSCRIBE",
"params": [
"s_trade@BTC-USDT"
],
"id": "eru1bat"
}Error Codes
No information available
Code Example
Last updated on: