Request
https://api.zapi.ink/v1/finance:okx/open-interestSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 30 seconds.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| instType | enum: SWAP | FUTURES | OPTION | query | No | Product line. Open interest is published for derivatives only Example: SWAP |
| symbol | string | query | No | One instrument ID. Omit to list the whole line Example: BTC-USDT-SWAP |
| instFamily | string | query | No | Contract family, for FUTURES and OPTION Example: BTC-USDT |
Code examples
curl -X GET "https://api.zapi.ink/v1/finance:okx/open-interest?instType=SWAP&symbol=BTC-USDT-SWAP&instFamily=BTC-USDT" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/finance:okx/open-interest?instType=SWAP&symbol=BTC-USDT-SWAP&instFamily=BTC-USDT", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/finance:okx/open-interest", params={"instType":"SWAP","symbol":"BTC-USDT-SWAP","instFamily":"BTC-USDT"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "finance:okx", "data": { "count": 1, "items": [ { "date": "2026-08-20T14:58:47.103Z", "time": 1787237927103, "symbol": "BTC-USDT-SWAP", "instType": "SWAP", "openInterest": 3014259.4000000125, "openInterestUsd": 2159463662.310409, "openInterestBase": 30142.59400000013 } ], "symbol": "BTC-USDT-SWAP", "dataset": "open-interest", "instType": "SWAP", "provider": "okx" }, "timestamp": "2026-08-20T14:57:49Z" }
Frequently asked questions
How do I call the OKX Open Interest API?
Send a GET request to https://api.zapi.ink/v1/finance:okx/open-interest with your Zapi key in the x-api-key header. Parameters — optional: instType, symbol, instFamily. The response is JSON in the { project, data, timestamp } envelope.
What does the OKX Open Interest API return?
Open interest for OKX derivatives — a live snapshot, not a series. The example response has the fields count, items, symbol, dataset, instType, provider. Each item in items has fields such as date, time, symbol, instType, openInterest, openInterestUsd, openInterestBase.
Is the OKX Open Interest API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.
Can an AI assistant call the OKX Open Interest API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "okx" and endpoint "open-interest".
What other OKX API endpoints are there?
It has 3 endpoints. Besides Open Interest: Funding Rate, Long Short Ratio.
