{"openapi":"3.1.0","info":{"title":"Pa1m Hyperliquid","version":"1.0.0","description":"Real-time Hyperliquid perpetuals data for AI agents.","x-guidance":"Pa1m Hyperliquid provides Hyperliquid on-chain data as a pay-per-call API. Pay in USDC on Base via x402 or MPP/Tempo — no API key or account needed. For current prices use /prices ($0.001). For funding rate analysis before opening positions use /funding ($0.003). For funding arbitrage use /predicted-funding ($0.003) — unique endpoint not available elsewhere. For wallet portfolio use /portfolio/{address} ($0.003). All coin params use Hyperliquid ticker format e.g. BTC, ETH, SOL."},"paths":{"/top":{"get":{"summary":"Top 5 Perp Prices (Free)","description":"Live mid prices for BTC, ETH, SOL, BNB, XRP. Free, no payment required. Cached 5s. 20 req/min per IP.","x-free":true,"responses":{"200":{"description":"Map of coin to mid price"}}}},"/prices":{"get":{"summary":"All Perp Mid Prices","description":"Returns mid prices for all ~170 Hyperliquid perpetual assets. Cheapest way to get current prices — $0.001.","responses":{"200":{"description":"Map of coin → mid price string"}}}},"/meta":{"get":{"summary":"Asset Metadata","description":"Returns asset universe with max leverage tiers and margin table IDs.","responses":{"200":{"description":"Metadata object"}}}},"/orderbook/{coin}":{"get":{"summary":"L2 Order Book","description":"Returns bid/ask order book snapshot (up to 20 levels per side) for a specific coin.","parameters":[{"name":"coin","in":"path","required":true,"schema":{"type":"string"},"example":"BTC"}],"responses":{"200":{"description":"L2 order book object"}}}},"/candles/{coin}":{"get":{"summary":"OHLCV Candles","description":"Returns historical candle data. interval: 1m,5m,15m,1h,4h,1d. lookback: number of candles (max 5000).","parameters":[{"name":"coin","in":"path","required":true,"schema":{"type":"string"},"example":"ETH"},{"name":"interval","in":"query","schema":{"type":"string","default":"1h"}},{"name":"lookback","in":"query","schema":{"type":"integer","default":100}}],"responses":{"200":{"description":"Array of OHLCV candles"}}}},"/funding":{"get":{"summary":"Funding Rates + Open Interest","description":"Returns current funding rates and open interest for all perps. Use before opening a position to evaluate carry cost.","responses":{"200":{"description":"Array of asset contexts with funding rate and OI"}}}},"/predicted-funding":{"get":{"summary":"Predicted Next Funding","description":"Returns predicted funding rates for the next period across venues. Unique endpoint — not available elsewhere in x402 ecosystem. Use for funding arbitrage strategies.","responses":{"200":{"description":"Predicted funding data"}}}},"/portfolio/{address}":{"get":{"summary":"Wallet Positions","description":"Returns open perpetual positions and margin summary for a wallet address.","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"example":"0xabc123..."}],"responses":{"200":{"description":"Clearinghouse state with positions and margin"}}}},"/history/{address}":{"get":{"summary":"Trade Fill History","description":"Returns up to 2000 most recent trade fills for a wallet address.","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"example":"0xabc123..."}],"responses":{"200":{"description":"Array of fill objects"}}}},"/open-orders/{address}":{"get":{"summary":"Open Orders","description":"Returns all open orders (pending, resting) for a wallet address.","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string"},"example":"0xabc123..."}],"responses":{"200":{"description":"Array of open order objects"}}}},"/leaderboard":{"get":{"summary":"Trading Leaderboard","description":"Returns top traders by PnL. window: day, week, month, allTime.","parameters":[{"name":"window","in":"query","schema":{"type":"string","default":"day"}}],"responses":{"200":{"description":"Leaderboard entries with address, PnL, volume"}}}}}}