Funding rate
Series details
The funding rate of the perpetual contract you trade, at each funding time, as the exchange publishes it: positive when longs pay shorts, negative when shorts pay longs.
Source: The exchange you trade on
Markets: perp
Use in workbenchCoverage
First stored dates describe the database, not a guarantee of complete history for every market.
- The exchange you trade on · Perpetual futures · History varies by contract and candle window · Any · With the candles
Check a funding payment on one candle
Candle alignment
Code samples the latest funding observation at or before the candle close. Before the first observation, or after the permitted age for that funding interval, the value is unavailable.
A funding-rate input and the funding cost applied to a perpetual position are separate uses of the data. Inspect the report before adding the cost again.
Python example
funding = market_data.funding
trend = indicator.ema(close, 50)
# Funding below zero: shorts are paying to hold their positions.
def enter_long():
return funding < 0 and close > trend
def exit_long():
return funding > 0.0003 or close < trend
Open in workbenchPine example
//@version=6
strategy("Trend with negative funding", initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent, commission_value=0.1)
funding = market_data.funding
trend = ta.ema(close, 50)
// Funding below zero: shorts are paying to hold their positions.
if funding < 0 and close > trend
strategy.entry("Long", strategy.long)
if funding > 0.0003 or close < trend
strategy.close("Long")
Open in workbenchLLM prompt example
Check {market_data.funding}. Funding well above zero means longs are crowded and pay to stay in: be careful going long into that. Negative funding while {candles} trend up favours a long.Open in workbenchCheck market support, historical coverage and timeframe alignment before comparing a backtest with current robot inputs. Missing data is not a zero observation.
Data coverage and backtest windows
Reload this page if interactive controls could not load.