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.
| Field | Description |
|---|---|
id | TokenId — internal unified token id |
e | Exchange — e.g. bybit |
d | Timestamp — exchange-reported time (ms, UTC) |
s | Symbol — exchange-native API symbol |
b | Base — e.g. BTC |
q | Quote — e.g. USDT |
oi | OpenInterest — open interest in base asset units |
oiusd | OpenInterestUsd — USD-converted open interest (omitted if no price available) |
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 subscribe request is billed 1 credit regardless of how many pairs are in params. The connection itself is free.