Strategy guide
Run a funding-rate strategy with an AI agent
A funding-rate strategy, sometimes called funding arbitrage, pairs a spot position with an opposite perpetual-futures position. The pair aims to remain close to delta neutral while the account pays or receives funding on the perpetual. On Hyperliquid, funding is paid every hour and can change sign, so a positive rate observed now is not a promised return.
Fensory can read Hyperliquid spot, perpetual-futures markets, predicted funding, account state, orders and fills through MCP. It can also prepare both orders. The legs execute sequentially rather than atomically, which means price, spread and exposure can change between the first fill and the second. The workflow below keeps the analysis read-only until the user confirms one exact leg at a time.
Copy this prompt
Use the Fensory tools to evaluate a small funding-rate strategy on BTC. Stay read-only first. Call get_spot_metadata, get_market, get_predicted_fundings, get_orderbook for both the spot and perpetual markets, get_spot_account_state, get_account_state, get_open_orders and get_user_fees.
Identify the exact spot token and perpetual-futures contract. State that UBTC is a wrapped HyperCore spot token and that BTC perpetual futures use margin and can be liquidated. Report current spot and perp prices, their percentage difference, current and predicted funding, spread, visible depth, fees, balances, open orders, current positions, market allow-list, access expiry and per-order cap.
If predicted funding is positive, model a long-spot and short-perpetual pair with no more than $25 notional per leg. If predicted funding is zero, negative or inconsistent across the returned venues, stop after the analysis. Show the size, limit price, estimated fees and what must happen if only one leg fills. Do not describe the rate as yield or annualize one observation into an expected return.
Do not submit either leg during this request. If I later confirm the exact spot leg, place only that leg, read its order status and fills, then recalculate the required perpetual leg from the actual filled size and current market. Ask for a separate confirmation before the perpetual order. Stop if the markets do not match, either quote is stale, depth is insufficient or an account limit cannot be verified.Who this is for
This guide is for an eligible non-US user who already understands spot and perpetual futures and wants an assistant to calculate, prepare and audit a small, market-neutral funding workflow under explicit account limits.
What it is not
It is not a yield promise, a recommendation to collect funding, or an unattended arbitrage system. A funding rate can reverse, one leg can fail, the basis can widen and a margined short can be liquidated before the intended offset works.
What you need
A matching spot and perpetual market
The spot token and perpetual future must reference the same underlying exposure. UBTC spot and BTC perpetual futures are the clearest documented example, but UBTC is a wrapped HyperCore token rather than native bitcoin in a wallet.
Enough balance for both legs
The spot purchase and perpetual-futures margin draw from different account states. Size from the smaller available capacity and leave room for fees, spread, funding and margin movement.
A leg-risk rule
Decide what the assistant must do if only one leg fills. The account controls can reject an oversized or disallowed order, but they do not guarantee that both legs execute together.
What the agent does
01
Verify the two instruments
The assistant identifies the spot token and perpetual-futures contract before comparing prices. A shared BTC label does not make UBTC native bitcoin, and a perpetual future is a derivative rather than a token balance.
Tools: get_spot_metadata · get_market
02
Read funding, basis and liquidity
Current and predicted funding answer who may pay whom at the next interval. Spot and perpetual prices show the basis. Both order books are required because a theoretical rate can be smaller than spread and slippage.
Tools: get_predicted_fundings · get_orderbook
03
Read both account states
The assistant checks balances, positions, resting orders, fees and Fensory account controls before sizing anything. An existing BTC position or order changes the net exposure of the proposed pair.
Tools: get_spot_account_state · get_account_state · get_open_orders · get_user_fees
04
Prepare two equal-notional legs
The analysis prepares a spot buy and an opposite perpetual-futures position of similar notional value. It does not call either write tool in the first request. The user reviews each exact leg separately.
Tools: place_hl_spot_order · place_perps_order
05
Execute sequentially and reconcile
After the user confirms one leg, the assistant verifies its actual fill before recalculating the second. This exposes leg risk rather than implying that two MCP calls form an atomic trade.
Tools: get_order_status · get_fills · get_open_orders
Failure modes and limits
Funding changes sign
Funding is recalculated and paid hourly on Hyperliquid. A positive observation can shrink or turn negative while the position remains open, changing the economics without changing the two position sizes.
Only one leg fills
A filled spot order with an unfilled short leaves outright long exposure. A filled short with no spot offset leaves a leveraged directional position. The prompt requires a predefined stop rule and a fresh calculation after the first fill.
The basis moves
Spot and perpetual prices can diverge further before converging. Closing both legs at an unfavorable basis can outweigh funding received, even when the position was directionally balanced.
Fees exceed funding
The workflow pays spread and trading fees on entry and exit and may pay funding instead of receiving it. Compare the actual costs with the funding payments recorded by the account rather than an annualized headline rate.
Margin is liquidated
The perpetual leg remains margined. A large basis move or insufficient collateral can liquidate it while the spot leg remains, breaking the intended offset.
Read the result in the terminal
- Spot balance
- Confirm the token, filled size and average price. The spot record establishes the actual amount the perpetual leg should offset.
- Perpetual position
- Read side, size, entry, mark, funding, margin and liquidation price. Similar notional value does not mean both legs carry the same operational risk.
- Fills and funding payments
- Use the fill records for entry and exit costs and the funding ledger for what the position actually paid or received. Predicted funding is not a substitute for the account history.
Runs on
The client list comes from the same release record as the MCP page. Every verified client has its own setup guide.
Questions people ask
- What is a funding-rate strategy?
- It pairs opposite spot and perpetual-futures exposure and attempts to receive funding while reducing directional exposure. It still carries basis, execution, funding, margin and venue risk.
- Does positive funding guarantee profit?
- No. The rate can change, the basis can move, one leg can fail, and fees or liquidation can exceed funding received.
- Can Fensory place both legs atomically?
- No atomic two-leg action is claimed. The agent submits separate spot and perpetual-futures orders, so each leg must be confirmed, filled and reconciled separately.
- Why not annualize the current funding rate?
- Annualizing one observation assumes that the rate persists. Hyperliquid recalculates funding and pays it hourly, so the resulting figure can misrepresent what the position will receive.
- Can the per-order cap limit the whole strategy?
- No. It limits each order. Two legs, repeated replacements and the eventual exit are separate actions, and total losses are not capped by one order limit.