Find something... ⌘K

Launch / Test

Sandbox

The sandbox is the same API with nothing real behind it. To use it, change the key, in the API, the SDK and the CLI. The base URL, routes and JSON stay the same. Every answer carries "sandbox": true and the header X-Maxy-Sandbox: true. There is no testnet.

Put your test key in place of mxk_test_….

curlTypeScriptPython
Copy
export BASE=https://whhxyutitykcsdpvdgcd.supabase.co/functions/v1/maxy-api export MAXY_API_KEY=mxk_test_… curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/key"
RealNot real
Prices and quote amounts, routes, JSON, error codes, the 60-second quote, your cap, signed webhooks, signature checksOrders, balances and allowances, transactions, deposit addresses, Bitcoin txids

Nothing can be broadcast. A signature authorizes nothing, a transaction goes to the zero address with gas "1", and a deposit address is a testnet one. Ids start with 53414e44424f58, "SANDBOX" in hex.

Limits. 120 calls a minute, 50 open orders, swaps only. Orders are kept for 7 days. The SDK answers sandbox_refused for a loan, mint or sign-in call, and any other Maxy function answers invalid_api_key for a test key. A real order id read with a test key answers not_found. The sandbox does not enforce the $10 sell minimum, so a smaller sell walks to completed there. Live, POST /orders refuses it.

Test scenarios

Force every outcome your product must handle. Name a scenario on the quote, place the order as usual, and it walks there by itself. A live key ignores it. Name expired_quote to simulate expired quote handling, and so on for each outcome. An order starts when you submit it, or by itself 30 seconds after you place it. The samples use the setup from Get a quote.

curlTypeScriptPython
Copy
curl -sG -H "x-maxy-key: $MAXY_API_KEY" "$BASE/quote" \ --data-urlencode "from=ETH on base" -d to=BTC -d amount=0.01 \ -d fromAddress="$WALLET" -d toAddress="$MY_BTC_ADDRESS" -d scenario=refund_available > quote.json
scenarioWhat happens
refund_availableReaches refundable, then refunded 15 seconds after you ask
order_expired, order_failed, order_cancelledEnds in that state
expired_quote409 quote_expired
over_capissues.orderCap, then 422
too_small422 amount_out_of_range
unfillableliquidityAvailable: false
price_moved409 quote_mismatch
rate_limited429 with Retry-After
insufficient_funds, needs_approvalissues.balance, issues.allowance
simulation_failssimulation.ok: false
underpaidA sell ends expired
webhook_replayEach event arrives twice

POST /sandbox/orders/{id}/advance skips the wait, with { "to": "completed" } or an empty body for the next state. GET /health?scenario=degraded tests your code that skips Maxy when it is degraded.

Then, on mainnet: one buy with $5 of USDC and one with 0.002 ETH. Do not load-test production. To go live, change to mxk_live_…, and work through the launch checklist.