Open Interest
Real-time futures Open Interest stream. Subscribe to any
{symbol}@{exchange} pair to receive every update the collector observes.
Futures-only (spot Open Interest does not exist).
Connect
- websocat
- wscat
websocat wss://api.datamaxiplus.com/ws/v1/open-interest -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
wscat -c wss://api.datamaxiplus.com/ws/v1/open-interest -H 'X-DTMX-APIKEY: $YOUR_API_KEY'
Subscribe
params is a list of {symbol}@{exchange} entries. symbol is the
exchange-native API symbol (e.g. BTC-USDT on Bybit). Invalid pairs are
silently dropped — the ack echoes back only what passed validation.
- schema
- example
{ "method": "SUBSCRIBE", "params": [ string ], "id": int32 }
{
"method": "SUBSCRIBE",
"params": ["BTC-USDT@bybit", "ETH-USDT@okx"],
"id": 1
}
Response
Each update is a full Open Interest snapshot for a single pair. protojson-encoded — keys match the short JSON names from the protobuf schema.
| Field | Description |
|---|---|
id | TokenId — Internal unified token id |
e | Exchange — e.g. bybit |
d | Timestamp — Exchange-reported time in ms (UTC) |
s | Symbol — Exchange-native API symbol |
b | Base — e.g. BTC |
q | Quote — e.g. USDT |
oi | OpenInterest — Open Interest in base units |
oiusd | OpenInterestUsd — Open Interest in USD (optional, missing if no price) |
Example
{
"id": "bitcoin",
"e": "bybit",
"d": 1776826789123,
"s": "BTC-USDT",
"b": "BTC",
"q": "USDT",
"oi": 98432.5,
"oiusd": 7500123456.7
}
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.