PhoenixDocs

API reference

Phoenix's public JSON routes. Same-origin, read-only, cached server-side. Every response carries `at` (ms epoch of the underlying data) and `source`.

3 min readUpdated 2026-12-05Page 25 / 27

01Conventions#

  • All routes are GET and return JSON.
  • Success: { ok: true, at, source, … }. Error: { ok: false, error } with a 4xx/5xx status.
  • Responses are cached server-side (see each route) to respect Hyperliquid rate limits. Polling faster than the cache returns the same at.
  • Types below are copied from src/lib/types.ts, the contract the routes implement.

02GET /api/markets#

GET/api/marketscache 15 s

Every Hyperliquid perp with live mark, 24 h change, open interest, funding and pricing volatility.

Request
curl -s "/api/markets"
Response type
type Market = {
  coin: string;
  markPx: number;
  change24h: number;      // fraction, e.g. -0.031
  oiUsd: number;
  volume24hUsd: number;
  funding1h: number;      // fraction per hour
  maxLeverage: number;
  vol: number | null;     // annualized realized vol, 168 hourly closes, NOT tail-adjusted
};
type MarketsRes = { ok: true; at: number; source: "Hyperliquid"; markets: Market[] };
Live response
GET /api/markets
Press "Send request" to call the route from this page.

03GET /api/scan#

GET/api/scan?address=0x…cache 5 s

A wallet's open Hyperliquid perp positions with live risk numbers.

address0x… (40 hex)Hyperliquid account. Required.
Request
curl -s "/api/scan?address=0x…"
Response type
type ScanPosition = {
  coin: string; side: "long" | "short";
  size: number; entryPx: number; markPx: number;
  liqPx: number | null; leverage: number;
  marginType: "cross" | "isolated";
  positionValueUsd: number; marginUsd: number; unrealizedPnlUsd: number;
  distancePct: number | null;
  vol: number | null;                                   // annualized, not tail-adjusted
  survival: { h24: number; h72: number; d7: number } | null;
};
type ScanRes = { ok: true; at: number; source: "Hyperliquid"; address: string;
  accountValueUsd: number; withdrawableUsd: number; positions: ScanPosition[] };

04GET /api/ashes#

GET/api/ashes?limit=100cache 10 s

Recent Hyperliquid liquidations Phoenix has observed, with 24 h stats and an honest coverage note.

limitintegerMax rows (default 100).
Request
curl -s "/api/ashes?limit=100"
Response type
type Ash = { id: string; time: number; coin: string; side: "long" | "short";
  user: string; sizeCoins: number; px: number; notionalUsd: number;
  method: "market" | "backstop"; marginType: "cross" | "isolated" | "unknown"; hash: string };
type AshesRes = { ok: true; at: number; source: "Hyperliquid fills"; coverage: string;
  stats24h: { count: number; notionalUsd: number; largestUsd: number;
    byCoin: { coin: string; count: number; notionalUsd: number }[] };
  ashes: Ash[] };
Live response
GET /api/ashes?limit=5
Press "Send request" to call the route from this page.

05GET /api/radar#

GET/api/radar?limit=50cache 60 s

Open positions closest to liquidation among tracked large accounts, plus per-coin liquidation heat bands.

limitintegerMax rows (default 50).
Request
curl -s "/api/radar?limit=50"
Response type
type RadarRow = { user: string; coin: string; side: "long" | "short";
  positionValueUsd: number; leverage: number; markPx: number; liqPx: number;
  distancePct: number; pLiq24h: number };
type RadarRes = { ok: true; at: number; source: "Hyperliquid"; coverage: string; rows: RadarRow[];
  heat: { coin: string; markPx: number; bands: { px: number; longUsd: number; shortUsd: number }[] }[] };
Live response
GET /api/radar?limit=5
Press "Send request" to call the route from this page.

06GET /api/candles#

GET/api/candles?coin=BTC&interval=1h&hours=168cache 30 s

Passthrough of Hyperliquid candles.

coinstringPerp name, e.g. BTC.
intervalstringHyperliquid interval, e.g. 1m, 15m, 1h, 1d.
hoursintegerLookback in hours.
Request
curl -s "/api/candles?coin=BTC&interval=1h&hours=168"
Response type
type Candle = { t: number; o: number; h: number; l: number; c: number; v: number };
type CandlesRes = { ok: true; at: number; source: "Hyperliquid"; coin: string; interval: string; candles: Candle[] };
Live response
GET /api/candles?coin=BTC&interval=1h&hours=6
Press "Send request" to call the route from this page.

07GET /api/status#

GET/api/statuscache 15 s

Live chain and protocol status: Elysium block, Hyperliquid reachability, contract addresses, launch state.

Request
curl -s "/api/status"
Response type
type StatusRes = { ok: true; at: number;
  elysium: { ok: boolean; block: number | null; chainId: number };
  hyperliquid: { ok: boolean };
  contracts: { cover: string; nest: string; oracle: string; token: string };
  live: boolean; version: string };
Live response
GET /api/status
Press "Send request" to call the route from this page.

08Errors#

400 responsejson
{ "ok": false, "error": "invalid address" }