Hyperliquid Funding Rate Arbitrage: Spot Long + Perp Short, With a Free Bot
Table of Contents
- How Hyperliquid Funding Works
- Live Funding Rates (pulled 21 November 2026, 17:35 UTC)
- The Trade, Step by Step
- What You Earn and What You Pay
- A Worked Break-Even Example
- Which Perps Offer the Best Opportunities?
- The Risks That Are Not Funding
- Our Open-Source Funding Arbitrage Bot
- Run It on Testnet First
- Before You Put Real Money In
Funding rate arbitrage is the most common "arbitrage" people mean when they search for it on Hyperliquid. You hold a spot token, short the same dollar size on that token's perpetual market, and let the perp's funding payments accrue to you. The price of the token goes up or down and your two positions mostly offset each other. What you keep, if anything, is funding minus costs.
It sounds like free money and it is not. This guide walks through how Hyperliquid funding works, the actual math of the trade with a worked break-even, the risks that sit outside funding, and how to run our open-source bot on testnet. Live funding figures were pulled on 21 November 2026.
How Hyperliquid Funding Works
Funding is a peer-to-peer payment between longs and shorts. Hyperliquid takes no cut. The Hyperliquid funding docs describe it like this:
- Paid every hour. The formula produces an 8-hour rate, and each hour pays one eighth of it.
- Positive funding means longs pay shorts. Negative means shorts pay longs.
- The rate is a premium plus an interest component. The interest component is fixed at 0.01% per 8 hours, or 0.00125% per hour, which the docs describe as about 11.6% APR paid to the short. Simple hourly x 24 x 365 math gives 10.95%. The premium part moves with the gap between the perp and the spot oracle price.
- Capped at 0.5% per hour. The docs say the cap does not depend on the asset.
- Payment = position size x oracle price x funding rate. It uses the spot oracle price, not the mark price.
For the full formula and the HIP-3 differences, see our funding rates explained guide. For this trade you only need one number: the hourly rate from the API. The metaAndAssetCtxs info call returns it as the funding field for each perp, and annualizing is hourly x 24 x 365.
Live Funding Rates (pulled 21 November 2026, 17:35 UTC)
| Perp | Hourly funding | Simple APR |
|---|---|---|
| HYPE | +0.00125% | +10.95% |
| ZEC | +0.00125% | +10.95% |
| BTC | +0.000658% | +5.76% |
| ETH | +0.000217% | +1.91% |
| SOL | -0.001414% | -12.39% |
Two things stand out. First, a lot of markets sat at exactly 0.00125% per hour, the interest component from the docs. Second, SOL was negative: a spot-long, perp-short pair would have been paying funding, not earning it. The highest rate among perps trading over $5M a day was VVV at about 78.6% APR, but when we checked, VVV had no USDC-quoted spot pair, so it cannot be hedged this way on Hyperliquid spot. These figures are one snapshot. For the current numbers, use the live funding rates table.
The Trade, Step by Step
- Check funding. Look for a perp whose hourly funding is positive and, ideally, has been for a while.
- Buy spot. Buy the token on its spot market with USDC.
- Short the perp, same size. Match the token quantity, not just the dollar amount, so the legs offset as the price moves.
- Collect funding each hour while it stays positive.
- Close both legs when funding drops below what the position is worth to you.
What You Earn and What You Pay
You earn the hourly funding rate times your short's notional. You pay trading fees on four fills: buy spot, sell perp (to open), then sell spot and buy back the perp (to close). From the fee reference, the base tier is:
| Fill | Taker | Maker |
|---|---|---|
| Spot | 0.070% | 0.040% |
| Perp | 0.045% | 0.015% |
Volume tiers, HYPE staking and referral discounts bring these down. You also cross the spread on any taker fill, which is cost on top of the fee.
A Worked Break-Even Example
Take $1,000 of HYPE on each leg at the funding rate we pulled, 0.00125% per hour, and assume it stays there (it will not).
- Funding earned: $1,000 x 0.0000125 = $0.0125 per hour, or $0.30 per day.
- Fees with all four fills as taker: spot 0.070% ($0.70) + perp 0.045% ($0.45) = $1.15 to open, and another $1.15 to close. Total $2.30.
- Break-even on fees: $2.30 / $0.30 = about 7.7 days of funding at that rate, before slippage.
- Fees with all four fills as maker: (0.040% + 0.015%) x 2 = 0.11%, or $1.10, which breaks even in about 3.7 days. Maker orders can sit unfilled, though, and an unfilled leg leaves you unhedged.
- Return on capital: 30 days at that rate pays $9.00. You tie up the $1,000 for the spot leg plus margin for the short. With $200 of margin (5x on the perp) that is $1,200 in total, so the same 10.95% rate works out to about 9.1% a year on your capital, before fees and before any rate change.
That rate is the interest-component baseline, not a windfall. When funding is closer to BTC's 5.76%, break-even stretches to weeks. If it flips negative while you are holding, you are paying to wait.
Which Perps Offer the Best Opportunities?
Most people ask which perp pays the most. The more useful question is which perps you can actually hedge.
1. It needs a spot pair. Many Hyperliquid perps have no USDC-quoted spot market. HIP-3 perps, which include stock and commodity markets, have no spot leg at all. For native perps, the spot token is often wrapped and carries a "U" prefix: the BTC perp pairs with UBTC on spot, ETH with UETH, SOL with USOL, while HYPE keeps its plain name. Our spot trading guide covers how spot markets and token names work.
2. Spot liquidity limits your size. Using the same 24-hour snapshot, HYPE had about $135M of spot volume and UBTC about $210M, but UZEC had about $15M against roughly $525M on the ZEC perp, and the ENA spot pair had about $0.2M against about $14M on its perp. A deep perp with a thin spot book is a trap for anything beyond small size, because the spot leg is the one that moves the price against you.
3. Funding has to last. A rate that is 78% for one hour and 5% for the next hundred does not pay. Look at funding history, not just the current print. Our funding rates guide shows where to find it, and the live funding table shows the current rate for every market.
4. Fee tier matters more than it looks. Your tier decides the break-even. See Hyperliquid fees explained and what Hyperliquid perps actually cost over 90 days, market by market.
The Risks That Are Not Funding
"Delta-neutral" describes the price exposure on paper. These are the ways the position can still lose money.
- Funding flips. Funding is variable. If it turns negative while you hold, the short leg pays longs. The bot's exit threshold exists for this, but an exit costs two more fills.
- Basis and spread risk. The perp tracks an oracle price while spot trades on its own order book. If the two drift apart when you open or close, that drift lands in your P&L. Wide spreads on thin spot books make it worse.
- Slippage on four fills. Taker fills pay the spread. On a thin spot pair it can exceed the fee.
- Liquidation on the short. A rising price loses money on the short even though the spot leg gains. How well the spot gain protects the short depends on your account type. In a Unified Account, perps are collateralized by USDC only, so the spot token does not back the short unless you use Portfolio Margin. See our unified accounts guide. Lower leverage and isolated margin leave more room. Read liquidation explained and isolated vs cross margin before sizing the short.
- Standard (Manual) accounts keep spot and perp balances apart. You need USDC in the spot balance to buy the token and separate margin in the perp balance. A Unified Account shares the USDC between the two.
- Capital is tied up on both sides. The yield is on the total you commit, not on the notional of one leg.
- Execution can fail halfway. If one leg fills and the other does not, you hold a directional position. The bot below buys spot first and checks the fill before it sends the short.
This is not tax advice. Funding payments and spot trades both generate records, so see our tax reporting guide and talk to a professional.
Our Open-Source Funding Arbitrage Bot
We publish a free, MIT-licensed starter bot in the hyperliquid-starter-bots repository, in bots/funding_arb.py. It is part of the /build page's set of bots. It is a teaching file, short enough to read in a sitting, built on the official Python SDK. We read it to write this section, so this is what it does.
What it does, each loop (every 30 seconds by default):
- Reads the hourly
fundingrate frommeta_and_asset_ctxsand converts it to APR withhourly x 24 x 365. - Finds the spot pair for the perp's base token. It tries the plain name first and then the "U" prefix (BTC becomes UBTC), and keeps the USDC-quoted pair. If there is none, it exits with a message.
- Reads both legs from your account, so a restart picks up where it left off.
- If it is flat and funding APR is at or above
--min-apr, it buys spot first. The order is an immediate-or-cancel order priced within 1% of the mid. It sends the perp short only if the spot buy filled, sized to what you actually got. If the short fails, it sells the spot back. - If it is hedged and funding falls below
--exit-apr, it sells the spot and closes the short with a reduce-only order. - On exit (Ctrl+C or
--run-seconds), it cancels open orders but leaves positions as they are.
What it refuses or checks:
- Coins with a colon in the name, which are HIP-3 markets, are rejected because they have no spot leg.
- If the account is short of spot USDC, it logs that the spot leg cannot fill instead of sending a rejected order.
- It skips an entry if the smallest tradable lot is well above your order size.
- A loss limit (
--max-loss-usd) stops the bot if equity drops that much, and order sizes are capped around 125% of--order-usd.
Arguments:
| Flag | Default | Meaning |
|---|---|---|
--coin | BTC | Perp base name with a spot token, e.g. BTC, ETH, HYPE |
--min-apr | 15 | Enter when annualized funding is at least this many percent |
--exit-apr | 5 | Exit when it falls below this |
--order-usd | 15 | Notional per leg (minimum $10) |
--max-loss-usd | 15 | Stop when equity falls by this much |
--dry-run | off | Log orders instead of sending them |
--run-seconds | 0 | Stop after this many seconds, 0 means run until Ctrl+C |
Entry looks at the current rate only. It does not include fees in the entry test, it pays taker fees on both legs, and it does not rebalance if the legs drift. The file's own notes list those as things to build on.
Run It on Testnet First
You need Python 3.10+ and a wallet that has made a mainnet deposit, which the testnet faucet requires. Then:
git clone https://github.com/Hyperliquidguide/hyperliquid-starter-bots
cd hyperliquid-starter-bots
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# Get testnet USDC at https://app.hyperliquid-testnet.xyz/drip, then create an API wallet
python -m scripts.setup_wallet
# Watch the bot decide without sending orders
python -m bots.funding_arb --coin HYPE --min-apr 20 --dry-run
Once the dry run reads sensibly, drop --dry-run to trade on testnet. Our trading bot setup guide and API guide cover API wallets and the endpoints it uses.
Warning
No returns are promised. This is a starting point, not a strategy with a proven edge. Real money can be lost, quickly. Run it on testnet, keep sizes small, and read the repository's DISCLAIMER.md before you point it at mainnet.
Info
Referral disclosure. On mainnet, if your account has no referrer yet, the bot applies our referral code (CONCEPT211). That gives you 4% off trading fees on your first $25M of volume, and we receive a share of the fees you pay. It never replaces an existing referrer, it skips testnet, and HL_REFERRAL=off in your .env opts out.
Open a Hyperliquid Account for Spot and Perps
Sign up through our link for 4% off fees on your first $25M of volume. Fees decide the break-even on a four-fill trade.
Join HyperliquidBefore You Put Real Money In
- Check funding history, not one reading. One hourly value says little about the next week.
- Include fees and slippage in your break-even. Compute it with your own tier, as in the example above.
- Know your account type. Unified, Portfolio Margin and Manual handle collateral differently, which changes liquidation risk on the short. See the unified accounts guide.
- Size the spot book, not just the perp. Your hedge is only as good as the thinner side.
- Start with a dry run, then testnet, then a small mainnet position.
Funding arbitrage also sits next to other bot strategies. Our Hyperliquid trading strategies guide compares it with market making and trend following, and the market making guide covers the fee side from the maker's view. If you are new here, how to trade on Hyperliquid is the place to begin.
Check Live Funding Before You Trade
See the current funding rate for every Hyperliquid perp, then run the numbers with your own fee tier.
Join HyperliquidFrequently Asked Questions
You buy a spot token and short the same size on its perpetual market. The two positions cancel each other's price exposure, so what is left is the funding payment. When funding is positive, longs pay shorts, so the short leg earns it every hour. Your result is the funding you collect minus trading fees and any drift between the spot and perp prices.
The perp needs a spot market you can buy, so start there. Many Hyperliquid perps have no USDC-quoted spot pair, and some that do have thin spot books. Among markets that qualify, look for funding that stays positive for days, not one hour, on a spot book deep enough for your size. The live funding table on this site shows the current rate for every perp. Rates change hour to hour, so check before you trade.
No. Funding can turn negative and cost you, the spot and perp prices can drift apart, four fills' worth of fees have to be earned back, and the perp short can be liquidated if the price rises sharply while margin is thin. Delta-neutral means the price exposure is mostly hedged, not that the position cannot lose money.
At the base fee tier, a taker fill costs 0.070% on spot and 0.045% on perps, and a maker fill costs 0.040% on spot and 0.015% on perps. Opening and closing means four fills. Using taker orders for all four costs 0.23% of the position size per leg, before slippage. Higher volume tiers, HYPE staking and the referral discount lower these rates.
No. The bot in the hyperliquid-starter-bots repository is a teaching starting point with no proven edge, and no returns are promised. It buys spot first, shorts the perp only if the spot buy filled, and exits when funding drops. Run it on testnet with --dry-run first.
Independent resource: Hyperliquid Guide is an independent, third-party resource operated by Concept211. It is not affiliated with, produced by, reviewed by or endorsed by Hyper Foundation, Hyperliquid Labs or any other Hyperliquid-ecosystem entity. "Hyperliquid" and related names and marks belong to their respective owners and are used here only to identify the platform this site documents. Read the full disclaimer.
Not advice: Nothing on this site is legal, tax, financial or investment advice. Descriptions of regulatory status, tax treatment and market availability are general information that varies by jurisdiction and changes over time. Confirm anything that matters to you with a qualified professional and against primary sources. Trading perpetual futures involves substantial risk of loss, and past performance does not indicate future results.
Disclosure: this site contains referral links. Signing up through the 4% fee discount link earns us a share of the trading fee Hyperliquid already charges, at no extra cost to you.
Ready to Start Trading?
Join Hyperliquid with our referral link and get a 4% fee discount on your first $25M of volume. No KYC, no email - just connect your wallet and trade.
Start Trading - Save 4%