API reference / Routes
System routes
The routes around the swap: health and the status page, the order explorer, the sandbox's own controls, hosted checkout's link check, and the routes anyone may post to. Most need no key, so a router or a monitor can call them before it has one. The samples use BASE and MAXY_API_KEY from Get a price, and ORDER_ID from Track the order; the answers are real, trimmed.
| Route | Key | What it does |
|---|---|---|
GET / | none | Every route, whether it takes a key, and the command that gets a test key |
GET /openapi.json | none | This API as OpenAPI 3.1: OpenAPI document |
GET /health | none | The solver, Bitcoin and each chain's verifier, with a degraded flag |
GET /system/status | none | Each component now, open incidents, upcoming maintenance |
GET /system/history | none | Each component per day: ?days=90 at most |
GET /system/incidents | none | Incidents, with their notes and postmortems |
GET /system/maintenance | none | The maintenance calendar |
GET /system/verified | none | The last end-to-end run through every failure branch on the sandbox |
GET /system/feed.xml | none | Incidents as RSS |
POST /system/subscribe | none | Status notices: { "kind": "webhook" | "email", "target" } |
GET /system/confirm, GET /system/unsubscribe | none | Confirm an email subscription, or stop notices: ?token= |
GET /explorer/{query} | any | One order by order id, intent hash, chain transaction or Bitcoin txid |
POST /sandbox/keys | none | A test key and a test publishable key, with no sign-up |
GET /sandbox/scenarios, GET /sandbox/rates | test | The outcomes you can force; the sandbox's BTC, ETH and USDC prices |
POST /sandbox/orders/{id}/advance | test | Move a sandbox order on now |
GET /checkout/verify | none | Hosted checkout: is this signed link what the partner signed |
POST /feedback | none | Docs feedback: { page, helpful, comment } |
POST /security-reports | none | Report a security issue: { summary, details, replyTo }. A person reads every report |
The status page at maxy.co/status reads the /system/* routes.
GET /health
Always 200. Read it at most every 30 seconds: the answer is shared per server for that long. degraded is true when the solver does not answer, Bitcoin's tip cannot be read, or a verifier is more than 3 Bitcoin blocks behind. A router skips Maxy as a source while it is true. Without a key it reads the live system; a test key gets the sandbox's simulated health, and ?scenario=degraded makes it degraded so you can test your skip.
curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/health"
{ "status": "ok", "degraded": false, "checkedAt": "2026-11-20T01:24:20.000Z", "components": { "api": { "status": "ok" }, "quotes": { "status": "ok", "latencyMs": 120 }, "solver": { "status": "ok", "latencyMs": 120, "priceAgeSeconds": 2 }, "bitcoin": { "status": "ok", "tipHeight": 900000 }, "verifiers": [{ "chainId": 8453, "chain": "Base", "status": "ok", "height": 900000, "lagBlocks": 0 }, "…"] }, "sandbox": true }
GET /system/verified
Every night the server walks one order through each failure branch on the sandbox. This is the last run.
curl -s "$BASE/system/verified"
{ "verified": true, "at": "2026-11-19T03:17:04.268206+00:00", "source": "server", "passed": 11, "total": 11, "results": [ { "name": "buy with ETH: quote, order, completed", "ok": true, "ms": 846, "detail": null, "requestId": "da95f6ab-e6d6-4a73-bc1a-dc2998848b71" }, "…" ] }
GET /explorer/{query}
Everything public about one order in one place: its status, its states with times, and a link for each transaction. Paste any id or hash of the order. A sandbox order's links are empty, because its transactions exist nowhere.
curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/explorer/$ORDER_ID"
{ "query": "0x53414e44424f5845214f892f02543514eece7072438b6cbc02ca63cc636be6a2", "sandbox": true, "order": { "orderId": "0x53414e44424f5845214f…", "state": "pending", "rawStatus": "SANDBOX_PENDING", "…": "…" }, "chainId": 8453, "timeline": [{ "state": "pending", "rawStatus": "SANDBOX_PENDING", "at": "2026-11-20T01:24:22.000Z" }], "links": [] }
POST /sandbox/keys
A test key and a test publishable key at once, with no sign-up. Both are shown once. The body is optional: a name, and origins for the publishable key. Five keys an hour from one address; more answers 429 rate_limited with Retry-After.
curl -s -X POST "$BASE/sandbox/keys" -H "content-type: application/json" \ -d '{ "name": "my project", "origins": ["http://localhost:3000"] }'
{ "secretKey": "mxk_test_…", "publishableKey": "mxk_pk_test_…", "origins": ["http://localhost:3000"], "orderCapUsd": 100, "note": "Test keys: the sandbox only, nothing real moves. Shown once; Maxy keeps only a hash. Unused for 30 days, they are revoked." }
POST /sandbox/orders/{id}/advance
Test keys only. Moves a sandbox order to its next state now, with an empty body, or to a later state on its walk with { "to": "completed" }. On a buy, { "to": "confirmed" } also brings in its Bitcoin payment's first confirmation (btcConfirmations 1, isComplete true), and the webhook for it. It answers the order as GET /status reads it, with advanced: true. A state the order's scenario never reaches answers 409 order_state. Scenarios: Test scenarios.
curl -s -X POST "$BASE/sandbox/orders/$ORDER_ID/advance" -H "x-maxy-key: $MAXY_API_KEY" -H "content-type: application/json" -d '{ "to": "completed" }'
{ "orderId": "0x53414e44424f5845214f892f02543514eece7072438b6cbc02ca63cc636be6a2", "route": "evm-btc-escrow", "state": "completed", "rawStatus": "SANDBOX_COMPLETED", "isComplete": true, "btcTxId": "53414e44424f58be003e5d5f3f90cdb9ce9c04d5174e2e7b9d5e476ed18cabd3", "txs": [{ "label": "btc_payout", "hash": "53414e44424f58be003e5d5f3f90cdb9ce9c04d5174e2e7b9d5e476ed18cabd3" }], "failureReason": null, "sandbox": true, "scenario": "success", "advanced": true }
GET /checkout/verify
Hosted checkout calls this with the query string of the link you signed on your server. It answers the verified parameters and the origins that may frame the page, or 403: checkout_signature_invalid when the link was changed or its key revoked, checkout_expired past its exp.
Routes not run here
POST /feedback, POST /security-reports and POST /system/subscribe write to Maxy's live records whatever key you hold, so this page documents them from the OpenAPI document only. Each answers 201.
A status webhook must answer the subscription.challenge POST with 2xx and {"challenge":"…"} within 5 s. At most 3 webhooks per host and 10 subscriptions a day per caller.
Errors
| HTTP | code | When |
|---|---|---|
| 400 | invalid_input | A malformed body, or an explorer query that is not an id or hash |
| 403 | checkout_signature_invalid, checkout_expired | A changed, revoked or expired checkout link |
| 404 | not_found | No order has that id or transaction |
| 409 | order_state | A state the sandbox order does not reach |
| 429 | rate_limited | Over the limit: 120 calls a minute per address without a key, five test keys an hour |