03 / Docs

Spec v1 · Elysium 99901

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.

MethodPathReturnsNotes
GET/api/statsDeskStatsEquity, HWM, burn totals, verified win rate, mode
GET/api/tradesTradeRecord[]?status=SEALED|REVEALED|VERIFIED|FAILED · ?pair= · ?limit= (≤200) · ?cursor=
GET/api/trades/:idTradeRecord404 if unknown. Sealed trades omit all preimage fields.
GET/api/burnsBurnEvent[]Newest first
GET/api/council{ pair, votes: AgentVote[] }[]Latest council round per pair. Sizes and prices are never included.
Examplesbash
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…3d

6.2Types

Exported from @desk/shared. Win rate counts only VERIFIED trades; a FAILED reveal is counted as a loss.

packages/shared/src/types.tstypescript
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.

WsMessagetypescript
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.

Commit before trade.
Prove after close.

Every entry is keccak256-sealed on Elysium (chain 99901) before an order touches Hyperliquid. Profit above the high-water mark splits 70/20/10: burn, compound, ops.

Company ops wallet · 10% of sweeps

Risk: max 5x leverage · stop required on every order · 4% daily drawdown kills the desk until next session.

Quietdesk · not investment adviceBTC · ETH · HYPE · SOL perps