Funding rate
SQL API
api.funding_rate
Funding-rate history for perpetual swaps across supported exchanges. Markets are exposed under their universal symbol (e.g. BTC-USD-PERP-INV for the BTC-margined inverse perp, BTC-USDT-PERP for the USDT-margined linear), with the originating exchange and contract type recorded alongside the rate. Inverse perps carry an -INV suffix to keep them distinct from any linear product with the same (base, quote) pair.
The settlement period varies per exchange. Deribit publishes funding hourly with continuous accrual; Binance, OKX, and Bybit publish discrete 8-hour events (some markets settle every 4h or 1h). Consumers should infer the period from the gap between consecutive timestamps for the same (exchange, market) pair.
The REST
/funding-rateendpoint requires bothmarketandexchange. For cross-exchange comparisons in a single query, use the SQL API.
Columns
exchange
LowCardinality(String)
Exchange that published the funding event (binance, bybit, okx, deribit)
contract_type
LowCardinality(String)
LINEAR_PERPETUAL (USDT/USDC-margined) or INVERSE_PERPETUAL (coin-margined)
market
LowCardinality(String)
Universal perpetual symbol (e.g. BTC-USD-PERP-INV, ETH-USDT-PERP)
timestamp
DateTime64(9, 'UTC')
Settlement timestamp
funding_rate
Decimal(76, 20)
Rate that accrued in the period ending at timestamp
Example Queries
1. Latest BTC-USD-PERP-INV funding across exchanges
SELECT
timestamp,
exchange,
contract_type,
funding_rate
FROM api.funding_rate
WHERE market = 'BTC-USD-PERP-INV'
AND timestamp >= now() - INTERVAL 24 HOUR
ORDER BY timestamp DESC, exchange ASC
LIMIT 50Functions used: now.
2. Cross-exchange funding spread
Compare the most recent settled funding rate per exchange for one market:
Functions used: argMax.
3. Realized 24h funding cost on a long position
A long pays funding when funding_rate > 0 and receives it when funding_rate < 0. Multiply by position notional to convert to fiat.
REST API
Funding-rate history for perpetual swaps across supported exchanges.
The settlement period is exchange-specific. Deribit publishes funding hourly (continuous accrual); Binance, OKX, and Bybit publish discrete funding events every 8 hours (sometimes 4h or 1h on select markets). Consumers should infer the period from the gap between consecutive timestamps for the same (exchange, market) pair.
Supported exchange values: binance, bybit, okx, deribit. For cross-exchange queries, use the SQL API.
This endpoint is limited to 10000 records per request.
Required for /ohlcv and /trade endpoints. Pass your API key in the x-api-key header. Public /market/* endpoints do not require authentication.
Koinju canonical perpetual symbol. Inverse perps carry the -INV
suffix (e.g. BTC-USD-PERP-INV for the BTC-margined USD-quoted
perp); linear perps don't (BTC-USDT-PERP). Use /market/future
to enumerate available perpetual symbols.
Exchange to filter by ā one of binance, bybit, okx, deribit.
For cross-exchange queries, use the SQL API.
Window start. Accepts any format parseable by parseDateTime64BestEffort
ā e.g. a plain date (2026-05-01, treated as midnight UTC) or a full
ISO 8601 timestamp (2026-05-01T12:00:00Z).
2026-05-01Window end. Same format as start_datetime. Returned rows satisfy
start_datetime <= timestamp < end_datetime.
2026-05-08OK
Settlement timestamp (UTC)
Exchange that published this funding event
Koinju canonical perpetual symbol
Funding rate that accrued in the period ending at time.
Period varies per exchange (8h for Binance/OKX/Bybit, 1h for Deribit).
GET /funding-rate?market=text&exchange=binance&start_datetime=2026-05-01&end_datetime=2026-05-08 HTTP/1.1
Host: api.koinju.io
x-api-key: YOUR_API_KEY
Accept: */*
OK
[
{
"time": "2026-05-06T00:00:00Z",
"exchange": "binance",
"market": "BTC-USD-PERP-INV",
"funding_rate": -0.0000693
},
{
"time": "2026-05-06T00:00:00Z",
"exchange": "deribit",
"market": "BTC-USD-PERP-INV",
"funding_rate": -0.0000017
},
{
"time": "2026-05-06T01:00:00Z",
"exchange": "deribit",
"market": "BTC-USD-PERP-INV",
"funding_rate": -0.000002
}
]Last updated
Was this helpful?