Skip to main content

Liquidation

Real-time futures liquidation event stream. Unlike the other feeds, liquidations are event-driven — you receive one message per liquidation, no snapshot, no "current state". Subscribe to any {symbol}@{exchange} pair and the stream stays idle until a liquidation fires.

Connect

websocat wss://api.datamaxiplus.com/ws/v1/liquidation -H 'X-DTMX-APIKEY: $YOUR_API_KEY'

Subscribe

params is a list of {symbol}@{exchange} entries. symbol is the exchange-native API symbol.

{ "method": "SUBSCRIBE", "params": [ string ], "id": int32 }

Response

protojson-encoded pb.Liquidation.

FieldDescription
idTokenId — Internal unified token id
eExchange — e.g. bybit
dTimestamp — Event time in ms (UTC)
sSymbol — Exchange-native API symbol
bBase
qQuote
sdSidebuy or sell (the side that was liquidated)
pPrice — Liquidation price
pusdPriceUsd — Liquidation price in USD (optional)
vVolume — Liquidation volume in base units
vusdVolumeUsd — Liquidation volume in USD (optional)

Example

{
"id": "bitcoin",
"e": "bybit",
"d": 1776826789123,
"s": "BTC-USDT",
"b": "BTC",
"q": "USDT",
"sd": "buy",
"p": 76321.5,
"pusd": 76321.5,
"v": 0.125,
"vusd": 9540.18
}

Ping / Keepalive

Send {"method":"PING"} periodically to keep the connection alive.

Pricing

Each successful subscribe request costs 1 credit regardless of how many pairs are in params. Connection itself is free.