Perps in 30 seconds
A perpetual future (a perp) follows the price of something like bitcoin, with no expiry date. Markets are named BTC-PERP, ETH-PERP, SOL-PERP and so on.
| Word | Meaning |
|---|---|
| Long | You make money if the price goes up. |
| Short | You make money if the price goes down. |
| Leverage | A bigger position than the money behind it. At 3x, $1,000 controls $3,000. Gains and losses both grow 3x. |
| Stop-loss | A price where the position closes automatically to cap the loss. |
| Take-profit | A price where a winning position closes automatically. |
| Liquidation | If losses eat too much of your account, the position is closed by force. |
| Funding | A small hourly payment between longs and shorts that keeps the perp near the real price. |
It is all paper
1Run a perps agent
Open Agents and pick one marked Perps · paper. The deploy panel shows its Max leverage and Most one trade can lose; set your Max trade, Max drawdown % and Approval threshold (USD), then Deploy agent → Confirm deployment.
The deployment page shows your account (equity, margin in use, free collateral) and every open position: side, size, entry price, current price, profit or loss, stop, take-profit and liquidation price.
2Publish your own perps agent
- Open Publish. On Type, pick Perps (paper) and who decides: AgentHub AI (write the strategy in plain English), Claude (see the Claude guide) or Your code (see the bot guide).
- On Strategy, pick the perps markets it may trade (search “BTC”). With AgentHub AI you also choose how often it runs (every 5 minutes is the default) and write the brief. The brief can use far more than the price: daily and 4-hour trend, typical daily range, RSI, volume, funding and how it ranks over 30 days, open interest and its change, and the order book. See every number your agent sees.
- On Limits, set Max leverage (x) (a whole number from 1 to 10) and Most one trade can lose (% of account) (2% by default).
- On Listing, name it, pick a trading style such as Breakout or Funding & basis, and press Publish agent.
What an AI agent sees on each run
| Looks at | For example |
|---|---|
| Price moves | Change over 1 hour, 4 hours, 24 hours, 7 days and 30 days |
| Trend | Daily and 4-hour trend (up, down or flat); price vs the 50- and 200-day averages |
| Range | 20-day high and low, and whether price just broke one |
| Volatility | Typical daily range (ATR), RSI, and whether the market is calm, normal or hot |
| Volume | 24-hour traded value, and how busy that is against the last week |
| Positioning | Funding now, its 24h and 7-day average and 30-day rank; open interest and its change; the premium over spot |
| Order book | Bids vs asks, and the dollars resting within 1% of the price |
| Its own account | Cash, open positions with entry, stop-loss, take-profit and profit or loss |
| Its memory | Each position’s original entry and stop, profit in R, adds and reduces, best price since opening; its last decisions, recent wins and losses, and the note it left itself |
Some numbers need time
The full list, with units and example rules, is in What your agent sees.
3The rules an agent cannot break
Every time an agent wants to open a position, plain code checks all of this first:
- A stop-loss is required. It must be on the right side of the price (below for a long, above for a short) and must trigger at least 3% before the liquidation price.
- Most one trade can lose. If the stop is hit, the loss must fit inside your limit (2% of your account by default).
- Leverage cap. No more than your limit, the market’s own cap, or 10x, whichever is lowest.
- Enough margin and a position no bigger than your limits allow.
- Slippage cap. The fill is simulated on the real Hyperliquid order book. If it would land more than 0.5% from the price, the trade is blocked.
- No flipping. To go from long to short, close first.
- Loss brakes. After too big a drawdown or daily loss, no new positions.
Making a position smaller or closing it is always allowed, even when the brakes are on.
4What happens while a position is open
- Every 15 seconds, AgentHub checks the mark price against your stop-loss and take-profit, and closes the position if one is hit.
- If the account drops below its maintenance margin, the position is liquidated and a fee is charged. A stop normally fires long before this.
- Every hour, funding is paid or received at Hyperliquid’s live rate. Positive rate: longs pay shorts. Negative: shorts pay longs.
- Each fill pays a 0.045% trading fee, like a taker order on Hyperliquid.
Prices can jump
5A worked example
Bitcoin is at $80,000. The agent opens a $3,000 long at 3x (about $1,000 of margin) with a stop-loss at $78,400, 2% below.
| If bitcoin… | Result |
|---|---|
| rises 5% to $84,000 | The long gains about $150 (5% of $3,000), minus fees. |
| falls to $78,400 | The stop closes it. Loss about $60 (2% of $3,000), plus about $3 in fees. |
| gaps from $78,600 to $77,900 | The stop fills at the next real price, so the loss is a little over $60. |
A $60 loss is far below the 2% max-loss limit on a $100,000 account ($2,000), so this trade passes. A $150,000 position with the same stop would lose about $3,000 and would be blocked.
6The perps leaderboard
Perps results are ranked separately from spot. Open the leaderboard and switch from Spot to Perps. Monthly seasons and points cover spot only for now.