API v1.0Hyperliquid Compatible

API Reference

PaperExchange's Hyperliquid API is 100% compatible with the original. Use the same request format with your PaperExchange API key.

Base URL

PaperExchange uses a unified API with exchange-specific paths. For Hyperliquid:

https://api.paperx.co/v1/exchanges/hyperliquid

Global endpoints (auth, billing) use: https://api.paperx.co/v1/auth and https://api.paperx.co/v1/billing

Authentication

All trading endpoints require authentication via API key in the X-API-Key header.

curl -X POST https://api.paperx.co/v1/exchanges/hyperliquid/info \
  -H "Content-Type: application/json" \
  -H "X-API-Key: pe_your_api_key" \
  -d '{"type": "clearinghouseState"}'

Trading Endpoints (Hyperliquid Compatible)

These endpoints mirror Hyperliquid's API exactly. Your existing Hyperliquid code works with just a URL change.

EndpointMethodDescription
/v1/exchanges/hyperliquid/infoPOSTMarket data, prices, order book, account state
/v1/exchanges/hyperliquid/exchangePOSTPlace/cancel orders, update leverage, TWAP orders

POST /v1/exchanges/hyperliquid/info - Request Types

TypeDescription
allMidsAll mid prices for all assets
metaExchange metadata (assets, decimals)
metaAndAssetCtxsMeta + funding rates, open interest
clearinghouseStateAccount state, positions, margin
openOrdersAll open orders
userFillsRecent trade fills
userFundingFunding payment history
l2BookOrder book for a coin
candleSnapshotOHLCV candle data

POST /v1/exchanges/hyperliquid/exchange - Action Types

ActionDescription
orderPlace limit/market orders
cancelCancel orders by order ID
cancelByCloidCancel orders by client order ID
modifyModify existing order
batchModifyBatch modify multiple orders
updateLeverageSet leverage (1-50x)
updateIsolatedMarginAdd/remove isolated margin
twapOrderPlace TWAP order
twapCancelCancel TWAP order
scheduleCancelDead man's switch

Account & Auth Endpoints

PaperExchange-specific endpoints for account management.

EndpointMethodAuthDescription
/v1/auth/registerPOSTNoneCreate account (3-day trial, $10k balance)
/v1/auth/loginPOSTNoneLogin, returns JWT token
/v1/auth/meGETJWTGet current user profile
/v1/auth/api-keysPOSTJWTCreate API key (max 5 basic, 10 pro)
/v1/auth/api-keysGETJWTList all API keys
/v1/auth/api-keys/{id}DELETEJWTRevoke API key
/v1/auth/account/resetPOSTJWT/KeyTop up balance (when < $100)
/v1/auth/forgot-passwordPOSTNoneRequest password reset email
/v1/auth/reset-passwordPOSTNoneReset password with token

Dashboard Endpoints

Endpoints for the trading dashboard. All require JWT or API key authentication.

EndpointMethodDescription
/v1/exchanges/hyperliquid/account/overviewGETFull account overview with positions, PnL, stats
/v1/exchanges/hyperliquid/account/positionsGETAll open positions
/v1/exchanges/hyperliquid/account/ordersGETOrder history (filter by status)
/v1/exchanges/hyperliquid/account/orders/openGETOpen orders only
/v1/exchanges/hyperliquid/account/fillsGETTrade fill history
/v1/exchanges/hyperliquid/account/analyticsGETTrading analytics (win rate, PnL, volume)
/v1/exchanges/hyperliquid/account/equity-curveGETEquity curve data for charts
/v1/exchanges/hyperliquid/account/resetPOSTFull account reset (deletes all data)
/v1/exchanges/hyperliquid/account/set-balancePOSTSet custom starting balance ($1k-$10M)

Billing Endpoints

EndpointMethodDescription
/v1/billing/subscriptionGETCurrent subscription status
/v1/billing/plansGETAvailable plans and pricing
/v1/billing/subscribePOSTCreate payment invoice
/v1/billing/invoicesGETInvoice history
/v1/billing/discount/applyPOSTApply discount code

Rate Limits

Basic Plan ($20/mo)

  • • 200 requests/minute
  • • 5 API keys
  • • $10,000 virtual balance
  • • 30 days history

Pro Plan ($30/mo)

  • • 500 requests/minute
  • • 10 API keys
  • • $100,000 virtual balance
  • • 90 days history

Rate Limit Headers

X-RateLimit-Limit: 200
X-RateLimit-Remaining: 195
X-RateLimit-Reset: 1700000060

Trading Engine

Our trading engine simulates Hyperliquid's behavior with real mainnet data:

  • Fees: Maker 0.015%, Taker 0.045% (matches Hyperliquid base tier)
  • Leverage: 1x to 50x (cross or isolated margin)
  • Slippage: Realistic order book walking for market orders
  • Liquidations: Uses Hyperliquid's exact liquidation formula
  • Funding: Real funding rates applied every 8 hours
  • Assets: 130+ perpetual contracts (all Hyperliquid assets)

Error Codes

CodeDescription
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid/missing API key)
403Forbidden (subscription expired, trial ended)
429Rate limit exceeded
500Internal server error