06 / API
Read-only, public, no key.
Everything the site shows comes from these endpoints. They are a convenience: every value tied to a trade or a burn can be re-derived from Elysium directly.
6.1REST endpoints
Base URL is NEXT_PUBLIC_API_URL. All responses are JSON, CORS-open, and cached for at most 5 seconds. Bigint fields are decimal strings.
| Method | Path | Returns | Notes |
|---|---|---|---|
| GET | /api/stats | DeskStats | Equity, HWM, burn totals, verified win rate, mode |
| GET | /api/trades | TradeRecord[] | ?status=SEALED|REVEALED|VERIFIED|FAILED · ?pair= · ?limit= (≤200) · ?cursor= |
| GET | /api/trades/:id | TradeRecord | 404 if unknown. Sealed trades omit all preimage fields. |
| GET | /api/burns | BurnEvent[] | Newest first |
| GET | /api/council | { pair, votes: AgentVote[] }[] | Latest council round per pair. Sizes and prices are never included. |
curl -s $API/api/stats
{
"equityUsd": 108300, "highWaterMarkUsd": 102300, "closedProfitUsd": 11500,
"totalBurnedTokens": 412880, "totalBurnedUsd": 8050,
"verifiedWinRate": 0.58, "verifiedTrades": 31, "openSealed": 2,
"mode": "PAPER_SIMULATION"
}
curl -s "$API/api/trades?status=VERIFIED&limit=20"
curl -s $API/api/trades/0xa41c…3d6.2Types
Exported from @desk/shared. Win rate counts only VERIFIED trades; a FAILED reveal is counted as a loss.
type Side = "LONG" | "SHORT";
type TradeStatus = "SEALED" | "REVEALED" | "VERIFIED" | "FAILED";
interface TradeRecord {
tradeId: `0x${string}`;
commitHash: `0x${string}`;
commitTx?: `0x${string}`;
committedAt: string; // ISO 8601
status: TradeStatus;
consensus: string; // e.g. "3/4 + RISK OK"
// present only after reveal:
pair?: "BTC" | "ETH" | "HYPE" | "SOL";
side?: Side;
sizeUsd?: string; // decimal string, 1e6 precision
entryTarget?: string; // decimal string, 1e8 precision
thesisJson?: string;
salt?: `0x${string}`;
revealTx?: `0x${string}`;
revealedAt?: string;
pnlUsd?: number;
fillReceipt?: string;
}
interface DeskStats {
equityUsd: number;
highWaterMarkUsd: number;
closedProfitUsd: number;
totalBurnedTokens: number;
totalBurnedUsd: number;
verifiedWinRate: number; // 0..1, verified trades only
verifiedTrades: number;
openSealed: number;
mode: "PAPER_SIMULATION" | "HYPERLIQUID_TESTNET" | "HYPERLIQUID_MAINNET";
}
interface BurnEvent {
txHash: `0x${string}`;
at: string;
profitSweptUsd: number;
burnUsd: number;
compoundUsd: number;
opsUsd: number;
tokensBurned: number;
}
interface AgentVote {
role: "ORDERFLOW" | "TECHNICAL" | "MACRO" | "RISK";
stance: "LONG" | "SHORT" | "FLAT" | "VETO";
confidence: number; // 0..1
note: string;
}6.3WebSocket
Connect to /ws on the API host (NEXT_PUBLIC_WS_URL). The server pushes a stats message on connect, then deltas. There is nothing to subscribe to; clients filter by type.
type WsMessage =
| { type: "stats"; data: DeskStats }
| { type: "trade"; data: TradeRecord } // on commit, reveal, and status change
| { type: "burn"; data: BurnEvent }
| { type: "council"; data: { pair: Pair; votes: AgentVote[] } };
const ws = new WebSocket(process.env.NEXT_PUBLIC_WS_URL!); // wss://…/ws
ws.onmessage = (e) => {
const msg = JSON.parse(e.data) as WsMessage;
if (msg.type === "trade" && msg.data.status === "VERIFIED") {
console.log("verified", msg.data.tradeId, msg.data.pnlUsd);
}
};6.4llms.txt
/llms.txt is a plain-text summary of the desk, endpoints, contracts and proof spec for language-model agents and crawlers. It is served by the frontend and contains no live data.