List crypto derivative positioning metrics
curl --request GET \
--url https://api.darvas.app/v1/crypto/derivatives \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/derivatives"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/derivatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT-SWAP",
"exchange": "okx",
"metric": "funding-history",
"period": "1H",
"points": [
{
"time": "2026-11-28T12:00:00.000Z",
"instId": "BTC-USDT-SWAP",
"fundingRate": 0.00012,
"realizedRate": 0.00011
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Crypto Derivatives
Crypto Funding Rate, Open Interest & Basis API
Query historical crypto perpetual funding rates, open interest, basis, long-short ratios and taker volume across OKX, Binance, Bybit and Hyperliquid.
List crypto derivative positioning metrics
curl --request GET \
--url https://api.darvas.app/v1/crypto/derivatives \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.darvas.app/v1/crypto/derivatives"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.darvas.app/v1/crypto/derivatives', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"ticker": "BTC-USDT-SWAP",
"exchange": "okx",
"metric": "funding-history",
"period": "1H",
"points": [
{
"time": "2026-11-28T12:00:00.000Z",
"instId": "BTC-USDT-SWAP",
"fundingRate": 0.00012,
"realizedRate": 0.00011
}
]
}{
"error": "VALIDATION_ERROR",
"message": "Send ticker or cik"
}{
"error": "UNAUTHORIZED",
"message": "The API key is not valid"
}{
"error": "PLAN_REQUIRED",
"message": "The account of this key has no active data API plan"
}{
"error": "NOT_FOUND",
"message": "No company has this ticker or CIK"
}{
"error": "RATE_LIMITED",
"message": "Too many requests"
}{
"error": "INTERNAL_ERROR",
"message": "Something went wrong"
}{
"error": "UNAVAILABLE",
"message": "The data service is unavailable"
}Overview
This endpoint returns perpetual and futures positioning time series across OKX, Binance USD-M, Bybit linear, and Hyperliquid perpetuals: funding rate history, open interest, stored contract open interest snapshots (oi-snapshots), futures-spot basis (basis), global long and short account ratios, top-trader positioning, and taker buy and sell volume. Observations return in points, newest first.
| Coverage | Details |
|---|---|
| Exchanges | okx (default), binance (USD-M perpetuals), bybit (linear perpetuals), and hyperliquid (perpetuals) |
| Metrics | funding-history (default), oi-volume, long-short, top-trader, taker-volume, basis, and oi-snapshots |
| Default ticker | BTC-USDT-SWAP on OKX, perpetual:BTCUSDT on Binance and Bybit, BTC-USDC-SWAP on Hyperliquid |
| Periods | 5m, 15m, 30m, 1H (default), 4H, and 1D |
| Window and limit | lookback_hours from 1 to 720 (default 72); limit from 1 to 500 (default 100) |
| MCP tool | list_crypto_derivatives on the data API MCP server |
Metric support and point fields
Not every venue publishes every positioning series. Requesting an unsupported exchange and metric pair returns400. Every observation carries an ISO 8601 UTC time field alongside its metric fields.
metric | okx fields | binance fields | bybit fields | hyperliquid fields |
|---|---|---|---|---|
funding-history | instId, fundingRate, realizedRate, fundingTime | ts, funding_rate | ts, funding_rate | ts, funding_rate, optional premium |
oi-volume | ts, oi, vol | ts, open_interest, open_interest_usd | ts, open_interest | Returns 400 |
long-short | ts, longRatio, shortRatio, ratio | ts, long_short_ratio, long_share, short_share | ts, long_share, short_share | Returns 400 |
top-trader | ts, longRatio, shortRatio, ratio | ts, long_short_ratio, long_share, short_share | Returns 400 | Returns 400 |
taker-volume | ts, buyVol, sellVol | ts, buy_sell_ratio, buy_volume, sell_volume | Returns 400 | Returns 400 |
basis | ts, futures_price, index_price, basis, basis_bps | Returns 400 | Returns 400 | Returns 400 |
oi-snapshots | ts, open_interest_contracts, open_interest_base, open_interest_usd | Returns 400 | Returns 400 | Returns 400 |
- Ticker formats. Pass OKX contract IDs such as
BTC-USDT-SWAPorETH-USDT-SWAP. On Binance and Bybit, passperpetual:BTCUSDT, bareBTCUSDT, orBTC-USDT(answers normalize toperpetual:<SYMBOL>, and spot tickers return400). On Hyperliquid, passBTC-USDC-SWAP, bareBTC, orkPEPE-USDC-SWAP(answers normalize to<COIN>-USDC-SWAP). - Basis and stored OI snapshots. On OKX,
metric=basisreturns historical contract versus index spread (basis = futures_price - index_price) andbasis_bps(basis points relative toindex_price, rounded to four decimal places).metric=oi-snapshotsreads Darvas’s stored per-contract open interest snapshots in contracts, base units, and USD overlookback_hours. - Venue history and caps. OKX positioning series roll up from 5-minute stored observations. Binance futures statistics keep 30 days of history. Bybit
oi-volumeandfunding-historyreturn at most 200 observations per call even whenlimitis higher. Hyperliquid returns hourly settledfunding-historypoints. - Related endpoints. For a single-call live snapshot of current and predicted funding, settlement countdown, live open interest, mark price, index price, and basis across all four venues, see
/crypto/derivatives/snapshot. For the full live Hyperliquid perpetual directory, see/crypto/hyperliquid/markets. For forced liquidations, see/crypto/liquidations. For taker order flow and candles, see/crypto/order-flow,/crypto/prices, and/crypto/tickers.
Examples
import os
import requests
headers = {"X-API-KEY": os.environ["DARVAS_API_KEY"]}
resp = requests.get(
"https://api.darvas.app/v1/crypto/derivatives",
headers=headers,
params={
"exchange": "okx",
"ticker": "BTC-USDT-SWAP",
"metric": "basis",
"period": "1H",
"lookback_hours": 48,
"limit": 24,
},
).json()
print(resp["exchange"], resp["ticker"], resp["metric"])
for point in resp["points"][:5]:
print(point["time"], "futures:", point["futures_price"], "index:", point["index_price"], "basis bps:", point["basis_bps"])
# Hyperliquid hourly BTC perpetual funding history over the last 72 hours
curl -H "X-API-KEY: $DARVAS_API_KEY" \
"https://api.darvas.app/v1/crypto/derivatives?exchange=hyperliquid&ticker=BTC-USDC-SWAP&metric=funding-history&lookback_hours=72&limit=72"
Authorizations
apiKeybearerKey
Query Parameters
Response
List crypto derivative positioning metrics: one page.
The answer of GET /crypto/derivatives.