Perpetual Funding Rate & Basis Trading
Overview
Analyze perpetual futures funding rates and spot-futures basis to identify carry trade opportunities, market positioning extremes, and directional sentiment signals. Funding rates are the single most important microstructure indicator in crypto derivatives — they reveal real-time leverage positioning and crowd sentiment.
Core Concepts
1. Funding Rate Mechanics
Perpetual futures have no expiry date. Instead, a funding rate is exchanged between longs and shorts every 8 hours (on most exchanges) to keep the perpetual price anchored to the spot price.
If perp price > spot price → funding rate positive → longs pay shorts
If perp price < spot price → funding rate negative → shorts pay longs
OKX funding rate schedule: payments at 00:00, 08:00, 16:00 UTC
Annualized funding rate:
# Funding rate is a per-8h DECIMAL, exactly as OKX/Binance return it
# (the API sends "0.0001" for 0.01%). 3 funding windows/day → × 3 × 365.
funding_rate_8h = 0.0001 # 0.01% per 8h, as a decimal
annualized = funding_rate_8h * 3 * 365 # 0.1095 → 10.95% annualized
**Units convention (whole ski…