API

Three read-only JSON endpoints, served by this site, CORS open. Every value is read from the chain at request time (cached for a few seconds).

GET /api/markets

Every market with its live midpoint, and the batch clock.

curl -s https://<this site>/api/markets
{
  "contract": "0x8a33Ab1Ea5B3f4376227ae10F68c728a9822b2E8",
  "clock": { "batch": number, "phase": "commit" | "reveal", "l1Block": number, "secondsLeft": number, ... },
  "markets": [ { "id": number, "symbol": string, "quote": "USDG" | "ETH", "midRaw": string, "mid": number, "guardBps": number, ... } ]
}

midRaw is quote raw units per 1e18 base raw units (USDG has 6 decimals, ETH 18).

GET /api/batches?n=6

Order counts and statuses of the last n batches (at most 24), per market. Counts are public once orders are revealed.

GET /api/tape

Settled and void batches and filled deals, newest first, with sizes rounded to buckets (under $10, $10 to $100 and so on). Exact figures are in the transactions.

Settlement

A scheduled job runs every minute: during the reveal window it calls revealFor for stored reveal-for-me messages and pokes markets that have orders; after it, it settles every book with revealed orders and collects forfeited bonds. Settlement is permissionless, so a stalled operator key never locks funds: anyone can settle, and a book left unsettled for 26 L1 blocks settles as void, returning every order.