Open Interest Statistics
Description
Get historical open interest statistics for trading pairs.
HTTP Request
GET /futures/data/openInterestHist
Weight
1
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | YES | Trading pair |
| period | ENUM | YES | "5m","15m","30m","1h","2h","4h","6h","12h","1d" |
| limit | INT | NO | Default 30; Max 500 |
| startTime | LONG | NO | Start time |
| endTime | LONG | NO | End time |
Response Example
[
{
"symbol": "BTCUSDT",
"sumOpenInterest": "20403.473", // Total open interest
"sumOpenInterestValue": "150570701.18", // Total open interest value
"timestamp": 1583127600000 // Timestamp
}
]
Code Examples
cURL
curl -s "https://api-sepolia.ztdx.io/futures/data/openInterestHist?symbol=BTCUSDT&period=1h&limit=5"
Python
import requests
base_url = "https://api.ztdx.io"
params = {"symbol": "BTCUSDT", "period": "1h", "limit": 5}
response = requests.get(f"{base_url}/futures/data/openInterestHist", params=params)
for record in response.json():
print(f"{record['symbol']}: OI={record['sumOpenInterest']} ts={record['timestamp']}")