HyperLiquid Paper Trading

Execution with
real prices.

1:1 mapped with HL APIs.

Point your bot at HyPaper instead of HyperLiquid. Same requests, same responses, same WebSocket protocol. Your bot sees no difference. Your wallet does.

api.hypaper.xyz
LIVE
$ curl -X POST /exchange \
   # limit buy 0.1 BTC @ $83,000
{"status":"ok","response":{"type":"order",
  "data":{"statuses":[{"filled":{
    "totalSz":"0.1","avgPx":"82,994.20","oid":4821}}]}}
}
$ curl -X POST /info \
   # check clearinghouseState
{"crossMarginSummary":{
  "accountValue":"100,048.60",
  "totalMarginUsed":"414.97"}}
No wallet signing — VWAP from L2 book
Capabilities

Everything your bot needs.
Nothing it doesn't.

Built to mirror the HyperLiquid API exactly. Switch between paper and live with a single URL change.

01
Live Price Matching
Streams HyperLiquid's live feed and fills paper orders off real mid prices with L2 VWAP slippage.
wss://api.hyperliquid.xyz/ws
02
📋
Full Order Suite
Limit, IOC, ALO, stop loss, and take profit with the same order model your HL bot already expects.
POST /exchange
03
💰
Exact PnL Engine
Realized and unrealized PnL stay precise, with weighted entries and balance updates on fills.
decimal.js precision
04
🔄
Real-time WebSocket
Subscribe to `allMids`, `l2Book`, `orderUpdates`, and `userFills` over an HL-compatible `/ws` protocol.
ws://localhost:3000/ws
Skills

Plug agents into
HyPaper fast.

Open the HyPaper skills folder and hand your agent a machine-readable starting point for discovery, execution, and account workflows.

Agent skills folder GitHub
skills/hypaper-api

- machine-readable API context
- account and order workflows
- ready for agent ingestion
API Reference

Drop-in compatible.
Zero code changes.

Every request you send to HyperLiquid works on HyPaper. Paper-specific controls live on their own endpoint.

POST
/exchangeorder, cancel, cancelByCloid, updateLeverage — mirrors HL exactly
POST
/infoallMids, clearinghouseState, openOrders, userFills, orderStatus, activeAssetCtx
POST
/hypaperresetAccount, setBalance, getAccountInfo — paper-only controls
WS
/wsallMids, l2Book, orderUpdates, userFills — subscribe/unsubscribe
GET
/healthHealth check with timestamp
PROXY
/info → HLmeta, metaAndAssetCtxs, candleSnapshot, fundingHistory, l2Book — cached with TTL
Place a limit orderJSON
// POST /exchange
{
  "wallet": "0xYourBot",
  "action": {
    "type": "order",
    "grouping": "na",
    "orders": [
      { "a": 0, "b": true, "p": "83000", "s": "0.1", "r": false }
    ]
  }
}
Switch from live to paperPython
# Before (real HL)
base_url = "https://api.hyperliquid.xyz"

# After (HyPaper)
base_url = "http://localhost:3000"
# That's it. Same requests, same responses.
Quick startBash
$ git clone https://github.com/GigabrainGG/HyPaper.git
$ cd hypaper-backend && cp .env.example .env
$ docker compose up -d
# server at http://localhost:3000
# ws at ws://localhost:3000/ws
Get Started

Ship your bot.
Without blowing up.

Clone the repo, set your balance, and run Docker Compose. Your paper environment is live in minutes.

$ git clone https://github.com/GigabrainGG/HyPaper.git && docker compose up -d