API Reference: Funding, Open Interest and Liquidations
Details
Docs navigation
- Getting started: Quickstart, Authentication, Rate limits, Errors and retries
- Guides: Symbol formats, Timestamps and time zones, Pagination, Split and dividend adjustments, WebSocket streaming, Dataset downloads, Excel and Google Sheets, Changelog
- API reference: Stock bars, Stock trades and quotes, Snapshots and movers, Tickers, exchanges, calendar, Splits and dividends, Fundamentals and SEC filings, Options chain and Greeks, Options EOD, bars, OI, Forex, Crypto, Crypto derivatives (you are here), Futures bars and continuous, Settlements and COT, Indices, Economic data, Technical indicators
- SDKs: Python, JavaScript
Crypto leverage shows up in three numbers: the funding rate longs pay shorts on perpetual swaps, the open interest building up behind it, and the liquidations when it unwinds. This page documents the funding rate API endpoint, the open interest endpoint and the liquidations endpoint, with real rows from our free Binance samples.
Early access. Planned v1 endpoints, not live yet. Free: settled funding history for all perpetuals. Starter ($29/mo): open interest, long/short ratios and basis at 5-minute resolution. Pro ($79/mo): 1-minute history and the live liquidation stream. Business ($249/mo) for commercial use. The free funding and open interest samples on /sample-data are live today.
Details
Funding rates
GET https://api.marketdata.co/v1/crypto/funding
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol |
string | yes | Perpetual, e.g. BTC-USDT-PERP |
|
exchange |
string | no | binance |
Venue code |
start, end |
string | no | 30 days | UTC range |
settled_only |
boolean | no | true |
false adds predicted rates between settlements |
limit, cursor, format |
no | Paging and output |
Response fields
| Field | Type | Description |
|---|---|---|
symbol |
string | Contract |
exchange |
string | Venue |
timestamp |
string | Settlement time, UTC |
funding_rate |
number | Rate per interval, decimal |
funding_interval_hours |
number | e.g. 8 |
annualized_rate_pct |
number | funding_rate x payments per year x 100 |
predicted_funding_rate |
number | Next estimated rate (optional) |
is_settled_funding |
boolean | True when the rate was actually paid |
next_funding_time |
string | UTC (optional) |
mark_price, index_price |
number | At settlement (optional) |
Example
Example (curl):
curl -H "Authorization: Bearer YOUR_API_KEY" \
"https://api.marketdata.co/v1/crypto/funding?symbol=BTC-USDT-PERP&exchange=binance&start=2026-09-01"
First rows of our free BTC funding sample:
symbol,timestamp,funding_interval_hours,funding_rate,annualized_rate_pct
BTC-USDT-PERP,2026-09-01T00:00:00Z,8,0.00008482,9.288
BTC-USDT-PERP,2026-09-01T08:00:00Z,8,0.0001,10.95
Source: Binance
Check the maths on the first row: 0.00008482 x 3 payments a day x 365 x 100 = 9.288%.
Details
Open interest and positioning
GET https://api.marketdata.co/v1/crypto/open-interest
Parameters: symbol, exchange, interval (5m default, 1m on Pro, 1h, 1d), start, end, limit, cursor, format.
| Field | Type | Description |
|---|---|---|
symbol, exchange |
string | Contract and venue |
timestamp |
string | UTC |
open_interest |
number | Open contracts in base units |
open_interest_usd |
number | Open interest in USD |
top_trader_long_short_ratio |
number | Top accounts long / short, where the venue publishes it (optional) |
global_long_short_ratio |
number | All accounts long / short (optional) |
taker_buy_sell_ratio |
number | Taker buy volume / taker sell volume (optional) |
basis_pct |
number | (mark minus index) / index (optional) |
Our free open interest sample, first rows:
symbol,timestamp,open_interest,open_interest_usd,top_trader_long_short_ratio,global_long_short_ratio,taker_buy_sell_ratio
BTC-USDT-PERP,2026-11-01T00:00:00Z,96913.056,7510208385.69,2.73066972,2.57410739,0.370209
BTC-USDT-PERP,2026-11-01T00:05:00Z,96910.742,7510436857.99,2.73116161,2.57473332,0.818188
Source: Binance
Example (Python), funding against open interest change:
import os
import requests
import pandas as pd
H = {"Authorization": f"Bearer {os.environ['MARKETDATA_API_KEY']}"}
base = "https://api.marketdata.co/v1/crypto"
p = {"symbol": "ETH-USDT-PERP", "exchange": "binance", "start": "2026-09-01", "end": "2026-11-01"}
fund = pd.DataFrame(requests.get(f"{base}/funding", headers=H, params=p).json()["results"])
oi = pd.DataFrame(requests.get(f"{base}/open-interest", headers=H, params={**p, "interval": "1h"}).json()["results"])
for df in (fund, oi):
df["timestamp"] = pd.to_datetime(df["timestamp"])
merged = pd.merge_asof(fund.sort_values("timestamp"), oi.sort_values("timestamp"), on="timestamp")
merged["oi_change"] = merged["open_interest_usd"].pct_change()
Details
Liquidations
GET https://api.marketdata.co/v1/crypto/liquidations
Parameters: symbol, exchange (optional; omit for all venues), start, end, min_notional_usd, limit, cursor, format.
Fields: symbol, exchange, timestamp, side (long or short, the position that was closed), price, size, notional_usd.
API
Errors for these endpoints
| HTTP | error.code |
When |
|---|---|---|
| 400 | invalid_symbol_format |
Perpetual without -PERP, e.g. BTCUSDT |
| 403 | plan_required |
Open interest on Free, 1m interval below Pro, liquidations history below Pro |
| 404 | symbol_not_found |
Contract not listed on that venue |
Watch out
Notes and gotchas
- Funding intervals differ by venue and sometimes by contract. Always read
funding_interval_hoursbefore annualising; do not assume 8. - A positive rate means longs pay shorts.
- Predicted rates change until settlement. Backtests should use settled rates only, which is the default.
- Long/short ratios count accounts, not contracts, and each venue defines them its own way. Compare a venue with itself over time, not across venues.
- Liquidation feeds from some venues are throttled to one print per period, so totals are a lower bound.
Keep reading
Next steps
Details
Was this page useful?
[Yes] [No]
Need another venue or contract? Tell us on the custom data form.