Public Trade
Get recent public trades data in Bybit.
Cover: USDT Perpetual, USDC Perpetual, Inverse Perpetual, Inverse Future, Option
info
After subscription, you will be pushed delta trade message in real-time once there is an order filled.
Push frequency: real-time
Topic:
publicTrade.{symbol}
For option, it should use base coin, e.g.,
publicTrade.BTC
Response Parameters
Parameter | Type | Comments |
---|---|---|
id | string | Message id. Unique field for option |
topic | string | Topic name |
type | string | Message type. snapshot |
ts | number | The timestamp (ms) that system generates the data. |
data | array | Object. The element in the array is sort by matching time in ascending order |
> T | number | The timestamp (ms) that the order is filled |
> s | string | Symbol name |
> S | string | Side of taker. Buy ,Sell |
> v | string | qty |
> p | string | Executed price |
> L | string | Direction of price change. Unique field for future |
> i | string | Trade id |
> BT | boolean | Block trade or not |
> mP | string | Mark price, unique field for option |
> iP | string | Index price, unique field for option |
> mIv | string | Mark iv, unique field for option |
> iv | string | iv, unique field for option |
Request Example
{
"op": "subscribe",
"args": [
"publicTrade.BTCPERP"
],
"req_id": "test" // optional
}
Response Example
{
"topic": "publicTrade.BTCPERP",
"type": "snapshot",
"ts": 1671181689023,
"data": [
{
"T": 1671181689021,
"s": "BTCPERP",
"S": "Buy",
"v": "0.002",
"p": "17032.50",
"L": "MinusTick",
"i": "d9cd8295-40dc-5dce-8deb-42882580a7ab",
"BT": false
}
]
}