Skip to main content

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

ParameterTypeComments
idstringMessage id. Unique field for option
topicstringTopic name
typestringMessage type. snapshot
tsnumberThe timestamp (ms) that system generates the data.
dataarrayObject. The element in the array is sort by matching time in ascending order
> TnumberThe timestamp (ms) that the order is filled
> sstringSymbol name
> SstringSide of taker. Buy,Sell
> vstringqty
> pstringExecuted price
> LstringDirection of price change. Unique field for future
> istringTrade id
> BTbooleanBlock trade or not
> mPstringMark price, unique field for option
> iPstringIndex price, unique field for option
> mIvstringMark iv, unique field for option
> ivstringiv, 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
}
]
}