Deribit perpetual funding
Query
WITH
'2025-06-01' AS start_date,
'2026-05-01' AS end_date,
monthly AS (
SELECT
formatDateTime(timestamp, '%Y-%m') AS month,
exchange,
sum(toFloat64(funding_rate)) * 100 AS funding_pct
FROM api.funding_rate
WHERE market = 'BTC-USD-PERP'
AND exchange IN ('deribit', 'binance')
AND timestamp >= toDateTime64(start_date, 9, 'UTC')
AND timestamp < toDateTime64(end_date, 9, 'UTC')
GROUP BY month, exchange
)
SELECT
month,
sumIf(funding_pct, exchange = 'deribit') AS deribit_funding_pct,
sumIf(funding_pct, exchange = 'binance') AS binance_funding_pct,
sumIf(funding_pct, exchange = 'binance')
- sumIf(funding_pct, exchange = 'deribit') AS spread_pct
FROM monthly
GROUP BY month
ORDER BY monthOutput (2025-06 → 2026-04, BTC-USD-PERP)
month
deribit_pct
binance_pct
spread_pct
Extending it
Last updated
Was this helpful?