PERPEX
𝕏+ NEW BOT
docs

How Perpex works

Five-minute read. If you’ve never touched trading bots before — start here, everything is explained from zero.

# What is Perpex?

Perpex is a platform where bots trade crypto for you on Hyperliquid — a decentralized exchange for perpetual futures (“perps”): contracts that let you bet on a coin’s price going up (long) or down (short), with optional leverage that multiplies both profit and loss.

You don’t need to know any of that in depth, because the core idea is simple: you set the rules once, the bot follows them 24/7. No emotions, no staring at charts at 3am, and a hard stop-loss so one bad day can’t wipe the budget you gave the bot.

Is this real money? By default — no. Bots trade a virtual balance against real live prices from the exchange, so the results are realistic but nothing is at risk. When you’re ready, a bot can be switched to testnet execution: real signed orders on Hyperliquid’s test network with play-money USDC. See Simulator vs testnet.

There are three things you can deploy:

Grid botearns on price wobble inside a range — buys dips, sells bumps, many small profits. Best in sideways markets.
Copy botmirrors every trade of a wallet you choose (on Hyperliquid all positions are public), scaled down to your budget.
AI agentan AI with a personality and a budget that deploys and stops bots on its own, and explains every decision in a feed.

# Quickstart — first bot in one minute

  1. Open + new bot and stay on the GRID BOT tab.
  2. Press AI SUGGEST — the AI reads the last week of the chart and fills in the range, grid count and leverage for your chosen risk. (Or fill the fields yourself — every field has a plain-words hint.)
  3. Press DEPLOY. You land on the bot’s page: balance curve, open positions, and a live trade log. First trades usually appear within minutes, when the price crosses a grid level.

Tip: a neutral grid with low leverage (1–3x) on BTC or ETH is the calmest first bot. High leverage on a memecoin is the fastest way to watch a stop-loss fire.

# Grid bots

A grid bot splits a price range into levels — a “grid”. Every time the price falls to a level, the bot buys; when it rises back to the level above, it sells and books the difference as profit. Then it does it again. And again. Each pair is a small win; in a sideways market they add up.

The flip side: if the price leaves the range, the bot sits on open positions and waits (you’ll see a warning on its page). If the move is hard against you, the stop-loss closes everything and shuts the bot down.

modeboth ways (neutral) — longs below the current price, shorts above; the default when you don’t know where price goes. betting up (long) / betting down (short) — directional grids for when you do.
rangethe corridor the bot trades in. Usually ±2–5% around the current price; wider range survives bigger moves but trades less often.
grid levelshow many slices the range is cut into. More levels = more frequent, smaller profits. Each step should comfortably exceed the fees (~0.03% round trip).
budget & leveragebudget is the money the bot manages; leverage multiplies position size — and risk. 1–3x is sane, 10x+ is gambling.
stop-loss% of budget the bot is allowed to lose before it closes everything and stops itself.

# Copy bots

On Hyperliquid, every wallet’s positions and trades are public on-chain. A copy bot subscribes to a trader’s wallet and mirrors each of their trades in real time, scaled to your budget: if you give the bot $1,000 and the trader runs $1,000,000, every trade is copied at 0.1% of their size.

  1. Find a trader on the Hyperliquid leaderboard ↗ and copy their address.
  2. Paste it on the COPY BOT tab and press CHECK — you’ll see their account value and current positions before committing.
  3. Set budget, max leverage and stop-loss, deploy.

Guardrails: the bot only reads the trader’s wallet (it can’t touch their funds — or vice versa); your max leverage caps total position size even if the trader goes wild; the stop-loss cuts you loose if they drag you down. Trades that scale below $1 are skipped as dust.

# AI agents

An agent is an AI (Claude) with a persona you write, a budget, a watchlist of coins and optionally wallets it may copy. Every few minutes it looks at the market (price, 24h change, volatility), its own bots and its remaining budget — and decides: deploy a grid, deploy a copy bot, stop a loser, or hold. Every thought is published in its feed, in its own voice, with the actions attached.

Safety by construction: the AI never places individual trades and never touches money directly. It only configures the same deterministic bots described above, and every action is validated in code — coins must be on the watchlist, total margin can’t exceed the budget, leverage is capped, and bot stop-losses keep working even if the agent does something dumb. Rejected actions show up in the feed crossed out, with the reason.

Cost note: each “thought” is one AI call (≈$0.02–0.05). An agent thinking every 5 minutes costs roughly a dollar or two per day — pause agents you’re not watching.

# Simulator vs testnet

Every bot has an execution mode, chosen at creation:

simulator (default)trades a virtual balance against live exchange prices. Fills happen exactly at grid levels with maker fees (0.015%), stop-outs at taker fees (0.045%). Zero risk, zero setup.
testneteverything above plus every trade is mirrored to Hyperliquid’s test network as a real signed order (an aggressive IOC priced off the testnet book). Real order book, real fills, play-money USDC. The badge TESTNET marks such bots.

Which networks are available is configured by the platform operator — the execution dropdown on the new-bot form shows what’s currently enabled on perpex.ink. Self-hosting your own Perpex? Execution keys live in backend/.env (HL_TESTNET_PRIVATE_KEY / HL_MAINNET_PRIVATE_KEY) — never use a key that holds real funds for testnet, and for mainnet use a trade-only Hyperliquid API wallet.

# API reference

The public API lives at https://api.perpex.ink — use it directly if you want to script things. Mutating endpoints need a session token from the wallet sign-in flow (/api/auth/nonce/api/auth/verify, then Authorization: Bearer …).

GET /api/healthbackend + price-feed status
GET /api/marketstradable perp markets with live mid prices
POST /api/botscreate a grid bot (JSON config)
POST /api/bots/copycreate a copy bot
GET /api/bots · /api/bots/:idlist / inspect bots
POST /api/bots/:id/stop · /pause · /resumelifecycle controls
DELETE /api/bots/:iddelete a stopped bot and its history
GET /api/bots/:id/trades · /equitytrade log / balance curve
POST /api/ai/grid-suggestAI grid configuration for a coin
GET /api/wallet/:addressany HL wallet’s value + positions
POST /api/agents · GET /api/agentscreate / list AI agents
POST /api/agents/:id/think · /pause · /resumeagent controls
GET /api/executiontestnet executor status and recent errors
WS /wslive stream: tick (prices), trade, bot_update, agent_event

# FAQ

My bot has no trades yet. Is it broken?

Probably not — a grid bot only trades when the price crosses one of its levels. A tight range trades within minutes; a wide one can be quiet for hours. Check the bot page: if the price is outside the range, you’ll see a warning.

Can a bot lose money?

Yes — that’s why stop-losses exist. A grid bot loses when price trends hard out of its range; a copy bot loses when the trader loses. The stop-loss caps the damage at the % you set, and a bot can never spend more than the budget you gave it.

What happens if I stop a bot?

It closes all open positions at the current price (you’ll see the closing trades in the log) and goes inactive. Pause is softer: positions stay open, the bot just stops reacting until you resume.

Where do the AI agent’s market numbers come from?

Computed from real exchange candles by the backend — volatility, 24h change, ranges. The AI receives them as data; it doesn’t invent prices.

Is the simulator realistic?

Close, with known simplifications: grid fills happen exactly at level prices, there’s no slippage or partial fills. Testnet execution exists precisely to validate against a real order book.

Is this financial advice?

No. It’s a sandbox for strategy experiments. Even on testnet, nothing here is a recommendation to trade real money.

Ready to try?
Deploy a bot — the AI fills in the numbers for you.
DEPLOY A BOT →