Open Interest
Real-time futures open interest (OI) stream. Subscribe to {symbol}@{exchange} pairs and receive every update the collector observes. Futures only — spot does not have open interest.
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's native API symbol (e.g. Bybit's BTC-USDT). Invalid pairs are silently dropped; the ack returns only those that 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 an open interest snapshot for a single pair. protojson-encoded — keys use the short JSON names from the protobuf schema.
- Schema
- Example
Schema
internal unified token id
e.g. bybit
exchange-reported time (ms, UTC)
exchange-native API symbol
e.g. BTC
e.g. USDT
open interest in base asset units
USD-converted open interest (omitted if no price available)
open interest converted to the requested fiat/quote currency (optional)
{
"id": "bitcoin",
"e": "bybit",
"d": 1776826789123,
"s": "BTC-USDT",
"b": "BTC",
"q": "USDT",
"oi": 98432.5,
"oiusd": 7500123456.7,
"oifiat": 7500123456.7
}
Ping / Keepalive
Connection keepalive is server-managed — the server sends WebSocket protocol Ping frames every 30 seconds and standard WebSocket libraries respond with Pong automatically. Clients do not need to send an application-level {"method":"PING"} to stay connected.
See WebSocket API › Ping for details.
Pricing
Each subscribe request is billed 1 credit regardless of how many pairs are in params. The connection itself is free.