๐Ÿงช Hyperliquid API Tester

Interactive testing tool for Hyperliquid DEX API endpoints. Test public endpoints instantly or learn how to use trading endpoints with proper authentication.

๐Ÿš€ Quick Test - Public Endpoints

Test public API endpoints that don't require authentication. Results appear instantly!

๐Ÿ“š Example Requests

๐Ÿ”น Get All Mid Prices

{"type": "allMids"}

๐Ÿ“Š Get L2 Order Book

{
  "type": "l2Book",
  "coin": "BTC",
  "nSigFigs": 5
}

๐Ÿ“ˆ Get Candle Data

{
  "type": "candleSnapshot",
  "req": {
    "coin": "BTC",
    "interval": "15m",
    "startTime": ${Date.now() - 86400000},
    "endTime": ${Date.now()}
  }
}

โ„น๏ธ Get Market Metadata

{"type": "meta"}

๐Ÿ’ฑ Get Spot Metadata

{"type": "spotMeta"}

๐Ÿ“‹ Get User's Open Orders

{
  "type": "openOrders",
  "user": "0x0000000000000000000000000000000000000000"
}

๐Ÿ” Trading Endpoints (Requires Signature)

โš ๏ธ Important: Trading operations require EIP-712 signatures. These cannot be generated in the browser without your private key. Use the official SDKs for production trading.
๐Ÿ’ก Recommended Approach:
  • Use the Python SDK for automated trading
  • Use the TypeScript SDK for web applications
  • SDKs handle signing, nonces, and all complexity automatically

Example: Place Order (Python SDK)

from hyperliquid.exchange import Exchange

# Initialize with your private key
exchange = Exchange(private_key="YOUR_PRIVATE_KEY")

# Place a limit order
result = exchange.order(
    coin="BTC",
    is_buy=True,
    sz=0.01,
    limit_px=50000.0,
    order_type={"limit": {"tif": "Gtc"}}
)

print(result)

Example: Place Order (TypeScript SDK)

import { Hyperliquid } from 'hyperliquid';

// Initialize with your private key
const sdk = new Hyperliquid('YOUR_PRIVATE_KEY');

// Place a limit order
const result = await sdk.exchange.placeOrder({
  coin: 'BTC',
  is_buy: true,
  sz: 0.01,
  limit_px: 50000.0,
  order_type: { limit: { tif: 'Gtc' } }
});

console.log(result);

๐Ÿ“– Additional Resources