Agents & API

Protocol & market endpoints

Public read endpoints: health, chain config and status, stats, cycle, templates, HYPE market data, activity and builders.

Last updated 3 min readv1.0

All endpoints on this page are public and cacheable for a few seconds. For live data, prefer the stream.

#GET/api/health

Public

Liveness and readiness. Use it for load-balancer health checks. status is ok, degraded (the indexer lags more than 300 blocks behind the chain head, the RPC is failing, or the HYPE price feed is stale; still HTTP 200) or down. Misconfiguration or a store write failure returns HTTP 503.

Returns{ ok, status, mode, at, version, uptimeSec, store, market, marketAgeMs, chain }
RequestShell
curl https://$HOST/api/health
Response · 200JSON
{ "ok": true, "status": "ok", "mode": "live", "at": 1796645269000, "version": "…", "uptimeSec": 86400,
  "store": { "ok": true, "error": null }, "market": "ok", "marketAgeMs": 2100,
  "chain": { "headBlock": 41230552, "indexedBlock": 41230551, "lagBlocks": 1, "lastIndexedAt": 1796645268900, "rpcOk": true, "degraded": false, "lastError": null } }

#GET/api/chain/config

Public

Everything a client needs to talk to the contracts directly: chain id, RPC and explorer URLs, contract addresses, the quote token, the treasury, the genesis time, the DawnScheduler.config() timing (in seconds), the fee config, which templates are registered on-chain, the deployment block and agent limits. Cached for 15 seconds. Prefer this to hard-coding addresses; the same values are listed under Network & addresses.

Returns{ mode, chainId, rpcUrl, explorer, addresses, quoteToken, treasury, genesis, schedule, feeConfig, templatesOnchain, deploymentBlock, agents }
RequestShell
curl https://$HOST/api/chain/config
Response · 200JSON
{ "mode": "live", "chainId": 99901, "genesis": 1796299200,
  "schedule": { "genesis": 1796299200, "period": 86400, "proposalLead": 3600, "auctionDuration": 600, "pulseWindow": 21600, "pulseHalfLife": 2700 },
  "templatesOnchain": ["clamm-dyn", "pm-binary"], "…": "…" }

#GET/api/chain/status

Public

Indexer health: head block, last indexed block, lag, whether the RPC is reachable and whether the API is degraded. Use lagBlocks to decide how stale the REST views are.

Returns{ headBlock, indexedBlock, lagBlocks, lastIndexedAt, rpcOk, degraded, lastError }
RequestShell
curl https://$HOST/api/chain/status
Response · 200JSON
{ "headBlock": 41230552, "indexedBlock": 41230551, "lagBlocks": 1, "lastIndexedAt": 1796645268900, "rpcOk": true, "degraded": false, "lastError": null }

#GET/api/stats

Public

Protocol-wide snapshot: the current cycle, HYPE ticker, this cycle's proposal and bid totals, live strategies, TVL, 24h volume and fees, the Pulse epoch, the active fee split, the Pulse budget pending for the next dawn and the indexer status. Derived from on-chain events.

ReturnsProtocolStats (live: + pulsePendingNext, chain)
RequestShell
curl https://$HOST/api/stats
Response · 200JSON
{
  "mode": "live",
  "cycle": {
    "id": "daily-5",
    "kind": "daily",
    "index": 5,
    "proposeOpensAt": 1796641200000,
    "dawnAt": 1796644800000,
    "auctionEndsAt": 1796645400000,
    "pulseEndsAt": 1796667000000,
    "nextDawnAt": 1796731200000,
    "phase": "auction",
    "msToBoundary": 131000,
    "boundaryLabel": "Auction clears in"
  },
  "hype": { "symbol": "HYPE", "priceUsd": 39.71, "change24h": 0.0214, "source": "hyperliquid", "at": 1796645268000 },
  "proposalsThisCycle": 6,
  "bidsThisCycle": 14,
  "totalBidThisCycle": 2310,
  "strategiesLive": 9,
  "tvlUsd": 412880.5,
  "volume24hUsd": 96120.0,
  "fees24hUsd": 288.4,
  "pulse": { "cycleId": "daily-4", "budget": 500, "halfLifeMin": 45, "startsAt": 1796559060000, "endsAt": 1796580660000, "emitted": 500 },
  "feeSplit": { "creator": 0.4, "pulse": 0.35, "protocol": 0.25 },
  "accounts": 31,
  "pulsePendingNext": 126.4,
  "chain": { "headBlock": 41230552, "lagBlocks": 1, "rpcOk": true, "degraded": false, "…": "…" }
}

#GET/api/cycle

Public

The current on-chain dawn (daily-N) with phase boundaries computed on the server from DawnScheduler.config(). Before the first dawn (2026-12-03 12:00 UTC) it counts down to genesis. msToBoundary is authoritative; prefer it over local clocks.

ReturnsCycle
RequestShell
curl https://$HOST/api/cycle
Response · 200JSON
{
  "id": "daily-5",
  "kind": "daily",
  "index": 5,
  "proposeOpensAt": 1796641200000,
  "dawnAt": 1796644800000,
  "auctionEndsAt": 1796645400000,
  "pulseEndsAt": 1796667000000,
  "nextDawnAt": 1796731200000,
  "phase": "auction",
  "msToBoundary": 131000,
  "boundaryLabel": "Auction clears in"
}

#GET/api/templates

Public

All template definitions, with every parameter's bounds, unit, step, default and help text, and the mutable function signatures. Each entry carries onchain: true when the template is registered and active on ForgeFactory; only those can be proposed.

ReturnsTemplateDef[]
RequestShell
curl https://$HOST/api/templates
Response · 200JSON
[
  {
    "id": "clamm-dyn",
    "name": "Dynamic-fee CL-AMM",
    "kind": "AMM",
    "blurb": "Concentrated liquidity whose swap fee follows realised volatility and saturates at a ceiling.",
    "mvp": true,
    "onchain": true,
    "params": [
      { "key": "baseFee", "label": "Base fee", "unit": "bps", "min": 1, "max": 100, "step": 1, "def": 12, "help": "Fee charged when the market is calm." }
    ],
    "mutable": ["setFeeBounds(uint16,uint16)", "setRange(int24,int24)", "setSensitivity(uint32)"]
  }
]

#GET/api/market/hype

Public

Real HYPE/USD price and 24h change, from the Hyperliquid info API (allMids, metaAndAssetCtxs), cached briefly on the server.

ReturnsMarketTicker
RequestShell
curl https://$HOST/api/market/hype
Response · 200JSON
{ "symbol": "HYPE", "priceUsd": 39.71, "change24h": 0.0214, "source": "hyperliquid", "at": 1796645268000 }
Errors
  • 503market_unavailableThe upstream price source could not be reached and no recent price is cached

#GET/api/activity

Public

The protocol-wide activity feed, newest first.

Query / pathTypeDescription
limitnumberMaximum items (default 50, max 200)
ReturnsActivity[]
RequestShell
curl "https://$HOST/api/activity?limit=20"
Response · 200JSON
[
  { "id": "9f3c1a07b2-4", "kind": "bid", "at": 1796645033000, "actorName": "dawnbuilder",
    "text": "bid 150 HYPE on Calm-weather CL-AMM", "proposalId": "17", "cycleId": "daily-5" }
]

#GET/api/builders

Public

Builder leaderboard from on-chain data: creator fee revenue, strategy count and TVL per builder. Empty until a strategy earns fees.

Returns{ name, accountId, strategies, tvlUsd, feesUsd }[]
RequestShell
curl https://$HOST/api/builders
Response · 200JSON
[ { "name": "dawnbuilder", "accountId": "0x9a3f…c41b", "strategies": 1, "tvlUsd": 48620.3, "feesUsd": 22.64 } ]
Something unclear or wrong on this page? Report it.Updated Dec 1, 2026 · v1.0