API
The engine's REST and WebSocket API. The site proxies REST at /api/engine/v1; the WebSocket is opened directly at the URL /api/engine-url returns.
Base URL
The engine publishes its current public URL on chain in the Endpoint contract (url()). The site reads it every 30 seconds. Use the site proxy for REST:
curl https://<this site>/api/engine/v1/markets
curl https://<this site>/api/engine-url # { "url": "https://...", "ws": "wss://.../v1/ws" }Prices are in 1e6 USDC units, sizes in 1e6 base units. Account values are USDC micro-units as strings. When the engine is down, the proxy answers 503 with {"error":"Engine unreachable"}.
REST
| Endpoint | Returns |
|---|---|
GET /v1/markets | id, symbol, oracleKind, feed, maxLeverage, takerBps, makerBps, deployerShareBps, mark, lastPx, bestBid, bestAsk, longOi, deployer |
GET /v1/book/:market?depth=20 | market, seq, bids and asks as px, sz, n |
GET /v1/trades/:market?limit=50 | seq, px, sz, takerSide, time (ms), batchId, tx |
GET /v1/account/:addr | collateral, equity, imr, mmr, positions, openOrders |
POST /v1/order | body { order, sig } with px, sz, nonce, expiry as decimal strings; returns id, status, reason, events |
POST /v1/cancel | body { cancel: { trader, market, nonce }, sig }; returns status |
GET /v1/stats | match latency percentiles, orders per second, uptime, settlement lag, bench figures |
GET /v1/log/:market?from=1&limit=1000 | market, head, records with seq, cmd, events, hash |
GET /v1/batches?limit=50 | batchId, tx, fills, logHead, at |
GET /v1/eip712 | domain and types |
GET /v1/universe | every listable HyperCore perp: index (the feed), coin, name, dex, assetClass, maxLeverage, szDecimals, markPx, prevDayPx, markets already live on it |
POST /v1/mark/request | body { index }; pushes a fresh mark for that feed through MarkProbe. status fresh, pushing, limited (with retryAfter) or unavailable |
GET /v1/mark/request/:index | state and HyperEVM tx of the last requested push for that feed |
GET /v1/burns | every $PERP and KNTQ buy-and-burn, newest first, with its transactions |
WebSocket
> {"op":"sub","channel":"book","market":1}
> {"op":"sub","channel":"trades","market":1}
> {"op":"sub","channel":"account","account":"0x..."}
< {"channel":"book","market":1,"data":{"bids":[...],"asks":[...],"seq":812}}
< {"channel":"trades","market":1,"data":[{"seq":813,"px":25100000,"sz":2000000,"takerSide":"Buy","time":1764400000000,"batchId":null,"tx":null}]}
< {"channel":"account","data":{...}}
< {"channel":"stats","data":{...}} // every second, to every client