Prerequisites

Step 1: Verify Your API Key

Test your key by listing available providers:
curl -s -H "X-API-Key: $API_KEY" \
  https://api.perps.studio/v1/providers | jq
You should see Hyperliquid, Aster, and Polymarket listed with their supported verticals.

Step 2: List Perpetual Markets

Fetch all available markets from Hyperliquid:
curl -s -H "X-API-Key: $API_KEY" \
  https://api.perps.studio/v1/perps/hyperliquid/markets | jq '.[0:3]'
Example response:
[
  {
    "symbol": "BTC",
    "name": "Bitcoin",
    "pricePrecision": 1,
    "sizePrecision": 5,
    "minSize": "0.001",
    "maxLeverage": 50,
    "makerFee": "0.0001",
    "takerFee": "0.00035"
  }
]

Step 3: Get an Orderbook

Fetch the BTC orderbook with 10 levels of depth:
curl -s -H "X-API-Key: $API_KEY" \
  "https://api.perps.studio/v1/perps/hyperliquid/markets/BTC/orderbook?depth=10" | jq

Step 4: Stream Real-Time Data

Connect to the WebSocket for live orderbook updates:
const ws = new WebSocket(
  `wss://api.perps.studio/ws/v1/perps?apiKey=${API_KEY}`
);

ws.onopen = () => {
  ws.send(JSON.stringify({
    event: "subscribe",
    data: {
      provider: "hyperliquid",
      channel: "orderbook",
      params: { symbol: "BTC" },
    },
  }));
};

ws.onmessage = (event) => {
  const msg = JSON.parse(event.data);
  console.log(`[${msg.channel}]`, msg.data);
};

What’s Next?

Place Your First Trade

Set up wallet signing and execute your first order.

API Reference

Explore the full endpoint reference for all verticals.

Prediction Markets

Trade event outcomes on Polymarket.

Build a Bot

Follow our market-making bot recipe.