Skip to main content

Liquidation

Subscribe to the liquidation stream. Pushes at most one order per second per symbol. As such, this feed does not push all liquidations that occur on Bybit.

Push frequency: 1s

Topic:
liquidation.{symbol} e.g., liquidation.BTCUSDT

Response Parameters

ParameterTypeComments
topicstringTopic name
typestringData type. snapshot
tsnumberThe timestamp (ms) that the system generates the data
dataObject
> updateTimenumberThe updated timestamp (ms)
> symbolstringSymbol name
> sidestringPosition side. Buy,Sell. When you receive a Buy update, this means that a long position has been liquidated
> sizestringExecuted size
> pricestringBankruptcy price

Subscribe Example

from pybit.unified_trading import WebSocket
from time import sleep
ws = WebSocket(
testnet=True,
channel_type="linear",
)
def handle_message(message):
print(message)
ws.liquidation_stream(
symbol="BTCUSDT",
callback=handle_message
)
while True:
sleep(1)

Response Example

{
"topic": "liquidation.BTCUSDT",
"type": "snapshot",
"ts": 1703485237953,
"data": {
"updatedTime": 1703485237953,
"symbol": "BTCUSDT",
"side": "Sell",
"size": "0.003",
"price": "43511.70"
}
}