What is a funding rate? Perpetual futures funding, explained

The funding rate is the mechanism that keeps a perpetual futures contract tethered to the spot price — and the cost that quietly bleeds leveraged trading bots. Unlike a traditional future, a perpetual never expires, so exchanges use a periodic payment between longs and shorts to pull its price back toward spot. If you hold a leveraged position through enough funding intervals on the wrong side, the recurring fee can erode your account even when the price barely moves. This guide explains exactly how funding works, why it matters for bots, and how to read it in code.

On this page
  1. What a funding rate is
  2. Why perpetuals need it
  3. How the payment works
  4. How it drains a bot
  5. Reading funding in code
  6. Trading the funding rate
  7. FAQ

What a funding rate is

A funding rate is a small periodic payment exchanged directly between long and short holders of a perpetual swap, usually every eight hours. When the rate is positive, longs pay shorts; when negative, shorts pay longs. It is not a fee the exchange keeps — it is a transfer between traders, engineered to keep the perpetual’s price close to spot.

Why perpetuals need funding

A normal future expires and converges to spot at settlement. A perpetual never expires, so it needs another anchor. Funding is that anchor: if the perpetual trades above spot (too many eager longs), positive funding makes holding a long expensive, nudging the price back down. If it trades below spot, negative funding rewards longs and penalises shorts, pulling it back up.

spot perp > spot: longs pay shorts perp < spot: shorts pay longs
Funding transfers from the crowded side to the other, pulling the perpetual price back toward spot.

How the payment works

Funding is charged only on positions held at the funding timestamp (e.g. 00:00, 08:00, 16:00 UTC). The amount is the funding rate times your position’s notional value — and on a leveraged position, the notional is your margin times the leverage, so funding is amplified by leverage just like everything else in margin trading.

How funding quietly drains a bot

The cost of being on the crowded side

In a strong bull market, funding stays positive for days, so a leveraged long pays the fee every eight hours — a steady bleed even if the price goes nowhere. A bot that ignores funding can hold a “winning” position whose funding cost quietly outpaces its gains. Always account for funding in any futures bot, and prefer spot when you can.

Reading the funding rate in code

python · funding.pyimport ccxt
ex = ccxt.binanceusdm()          # USDT-M futures
fr = ex.fetch_funding_rate('BTC/USDT:USDT')
print(fr['fundingRate'], fr['fundingTimestamp'])

if fr['fundingRate'] > 0.0005:   # expensive to be long
    print('funding high — long carry costly')

Trading the funding rate

Some advanced bots run a delta-neutral “funding farm”: long spot, short the perpetual, collecting positive funding while hedged against price. It is a real strategy but carries execution, liquidation and exchange risk — closer to arbitrage than directional trading. For most bots, the right move is simply to subtract funding from expected returns and avoid the crowded side.

Not financial advice. This content is educational. Automated and algorithmic trading carries a real risk of financial loss. Never trade money you cannot afford to lose. Review the SEC investor.gov and CFTC resources before trading.

Frequently asked questions

What is a funding rate in crypto?

A funding rate is a small periodic payment, usually every eight hours, exchanged directly between long and short holders of a perpetual futures contract. When the rate is positive, longs pay shorts; when negative, shorts pay longs. It is a transfer between traders, not an exchange fee, designed to keep the perpetual price close to spot.

Why do perpetual futures have a funding rate?

Because perpetuals never expire, they lack the settlement that pulls a normal future toward spot. Funding is the substitute anchor: when the perpetual trades above spot, positive funding makes holding a long expensive and nudges the price down; when it trades below spot, negative funding rewards longs and pulls the price back up.

How does funding drain a trading bot?

Funding is charged on positions held at each funding timestamp, scaled by notional value and therefore amplified by leverage. In a strong trend the rate stays one-sided for days, so a leveraged position on the crowded side pays the fee every interval — a steady bleed even if the price barely moves. Bots that ignore funding can lose on winning positions.

Can you make money from funding rates?

Yes, with a delta-neutral funding farm: hold long spot and short the perpetual to collect positive funding while hedged against price moves. It is a real strategy but carries execution, liquidation and exchange risk, and is closer to arbitrage than directional trading. For most bots, the practical step is simply to subtract funding from expected returns.

MB

Mustafa Bilgic

Algorithmic trading practitioner · Founder, AITradingBot.us

Mustafa builds and backtests automated trading systems and writes about them without the hype. Every tool on this site is free and runs entirely in your browser.