Endpoint limits read from Binance’s official Python connector and API docs on November 5, 2026. Binance’s docs remain the authority.
Open interest statistics
GET /futures/data/openInterestHistLong/short ratios
GET /futures/data/globalLongShortAccountRatio, topLongShortAccountRatio, topLongShortPositionRatioTaker buy/sell volume
GET /futures/data/takerlongshortRatioFunding rate history
GET /fapi/v1/fundingRateAt 5-minute bars, 30 days is 8,640 points, so reading one symbol in full takes 18 calls of 500. Setting startTime further back gets you nothing, so if you want to study how open interest behaved through a 2022 or 2024 sell-off, this endpoint can’t help.
Limits are per IP. Go over and Binance answers with HTTP 429. Keep going and you get a 418 and an IP ban of anywhere from 2 minutes to 3 days, according to its API docs. So if you want every listed perp, even inside the 30 days, pace yourself.
import httpx
rows = httpx.get(
"https://fapi.binance.com/futures/data/openInterestHist",
params={"symbol": "BTCUSDT", "period": "5m", "limit": 500},
).json()Binance publishes daily metrics files for USDⓈ-M futures at data.binance.vision: open interest, its value and the long/short ratios every 5 minutes, as zipped CSV per symbol per day. A sample day for BTCUSDT (May 1, 2025) has 288 rows. That gets you past 30 days, at the cost of one download per symbol per day.
The archive is licensed CC BY-NC-SA 4.0, which makes it free for non-commercial use like personal backtesting. Commercial use needs a separate written licence from Binance. Its README also warns that archived files may be changed later as issues are found.
The open interest and funding datasets come as parquet bars from 1 minute to 1 day, timestamped by the exchange or by when each update reached us, and we never recalculate a bar after publishing it. Open interest comes with its change, volatility and ratio to the price move in each bar. Funding comes as the rate in each bar plus how often it updated.
One request returns links to every monthly or daily file in your date range, so a year of 5-minute bars is one call instead of a paging loop. Pro has high rate limits and 5 years of history. Prime has no rate limits and the full history (pricing). You can try it on real history for free: a free account gets every metric for 2025 on BTC, ETH, SOL and 10 RWA perps, on all three venues, open interest and funding included (catalog).
from datetime import date
from aperiodic import get_metrics
# 2022 at 5 minutes, a year Binance's endpoints no longer serve
oi = get_metrics(
api_key="YOUR_KEY",
metric="open_interest",
exchange="binance-futures",
symbol="perpetual-BTC-USDT:USDT",
interval="5m",
timestamp="exchange",
start_date=date(2022, 1, 1),
end_date=date(2022, 12, 31),
)Also: OKX funding rate and open interest history API, measured · open interest, every venue · funding rates, every venue