Open Interest
Not on staging
GET /fapi/v1/openInterest returns HTTP 404 on https://api.ztdxtest.xyz. Live open interest is the open_interest field of GET /api/v1/markets/{symbol}/ticker and of the ticker:{symbol} WebSocket on wss://api.ztdxtest.xyz/ws.
Description
Get the total open interest for a specific trading pair.
HTTP Request
GET /fapi/v1/openInterest
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | YES | Trading pair |
Response Example
{
"symbol": "BTCUSDT",
"openInterest": "444.75910000", // Total open interest
"time": 1508312967000 // Server time
}
Code Examples
cURL
curl -s "https://api.ztdxtest.xyz/fapi/v1/openInterest?symbol=BTCUSDT"
Python
import requests
base_url = "https://api.ztdxtest.xyz"
response = requests.get(f"{base_url}/fapi/v1/openInterest", params={"symbol": "BTCUSDT"})
data = response.json()
print(f"{data['symbol']}: OI={data['openInterest']}")