Skip to main content

Runtime Proof

Firmament exposes read-only runtime state so reviewers can see what the backend is tracking.

Inventory

GET /v1/runtime/state includes configured quoteable thresholds, observed inventory events, drift status, RFQ counters, Gateway state, and rebalance counters.

Ledger

GET /v1/runtime/ledger returns derived ledger balances. It includes account type, asset, raw balance, decimals, display amount, entry count, and a health flag. Use account_type to filter:
curl 'http://127.0.0.1:5050/v1/runtime/ledger?account_type=working_custody'

Trades

GET /v1/runtime/trades returns global recent trade summaries, newest first. It includes total, active, successful, refunded, and failed counts; input/output amounts; settlement status; current-run markers; and trade-bound signatures. Background rebalance signatures are excluded from trade rows. Trade summaries and active wallet-settlement recovery state are backed by SQLite. Terminal trades and resumable active settlements can survive a backend restart. The Runtime tab uses this global feed, while the swap page’s wallet history drawer calls the same endpoint with wallet=<address> to show connected-wallet attributed trades from the browser flow.

Events

GET /v1/runtime/events returns recent runtime events. Categories include quote, settlement, swap, Gateway, risk, inventory, reconciliation, and system. The event stream is an operational trail. It does not expose private keys, wallet secrets, or admin routes.