API

Status & config

The engine's heartbeat and the protocol's configuration.

GET /status

Is the database connected, is the engine running, and in which mode. Works without a database. Cache: 2 s.

ts
interface StatusResponse {
  time: string;
  database: boolean;
  engine: {
    online: boolean;              // heartbeat updated less than 30 s ago
    mode: "paper" | "live" | null;
    lastBeat: string | null;
    startedAt: string | null;
    version: string | null;
    killSwitch: boolean;
    killReason: string | null;
    feeds: Record<string, { ok: boolean; ageMs: number | null }>;   // "hyperliquid", "montra"
  };
}

Example, with no database connected:

json
{
  "time": "2026-12-01T23:37:08.622Z",
  "database": false,
  "engine": { "online": false, "mode": null, "lastBeat": null, "startedAt": null, "version": null,
              "killSwitch": false, "killReason": null, "feeds": {} }
}

The app's status badge is derived from this: No engine data (no database), Engine not started (database but no heartbeat yet), Engine offline (heartbeat older than 30 s), Halted (kill switch), Paper or Live.

GET /config

Chain, contracts, markets and strategies. Works without a database. Cache: 60 s.

ts
interface ConfigResponse {
  chain: { id: number; name: string; rpc: string; explorer: string };
  contracts: { treasury: string; feeSplitter: string; prizePool: string;
               swapAdapter: string | null; navReporter: string | null };
  montra: { api: string; app: string; hook: string; quoter: string };
  hyperliquid: { account: string | null; network: "mainnet" | "testnet"; app: string };
  motion: { token: string | null; launched: boolean; standInToken: string | null };
  markets: MarketInfo[];
  strategies: Array<{ id: string; name: string; venue: string; summary: string }>;
}
  • swapAdapter, navReporter and hyperliquid.account come from the site's environment (SWAP_ADAPTER_ADDRESS, NAV_REPORTER_ADDRESS, HL_ACCOUNT); null unless set to a valid address.
  • motion.launched is true once MOTION_TOKEN is set; standInToken is then null.
  • markets lists the four markets with display names (HYPE/USDC, HYPE-PERP, UNSEEN/HYPE…) and, for the pool, the token's symbol, name and image from Montra (cached 10 minutes).