Find something... ⌘K

User flows and examples / Status tracking

Order states

Every route reports one state, from nine values. Branch on state; rawStatus is for support. Then match what happened against your own books.

stateMeaningWho actsFinal
pendingPlaced; no solver has committedsolverno
awaiting_depositSelling: payout locked, user sends BTCuserno
in_progressThe solver is fillingsolverno
completedBuying: BTC sent. Selling: payout releasednobodyyes
refundableBuying: no solver filled in timeuserno
refundedThe coins went backnobodyyes
cancelledCancelled before anything movednobodyyes
expiredSelling and Solana: window closednobodyyes
failedSelling, Solana and coin to coin: see rawStatusMaxy supportyes

An order is done for the user when their funds arrive. A buy's Bitcoin payment replaced after completed arrives as an order.payment_replaced event, and btcConfirmations says when it is final. A buy, EVM or Solana, reads completed the moment btcTxId is set. A settlement is the settler paying the solver back: nothing waits for it, and if it fails the swap still reads completed. Before the payment confirms, the solver may speed it up: same amount and address, a new btcTxId. Show the latest.

To cancel while pending: POST /orders/{id}/cancel?chainId=8453 answers the call for the wallet to send. After a solver commits, it answers 409 order_state.

For routers: substatus and receiving

Beside state, every status answer and webhook carries substatus, with fixed meanings a router maps to its own states, and receiving, the transaction that delivers what the user asked for ({ chain, txHash, asset, amount }).

substatusMeaningRouter state
WAITING_FOR_COMMITOpen; nothing has moved to the user yetPENDING
BITCOIN_SENTThe Bitcoin is broadcast, not yet confirmedPENDING
CONFIRMEDWhat the user asked for has arrivedDONE
REFUND_AVAILABLEEnded without a fill; the escrow can be taken backFAILED
REFUNDEDThe user's coins went backREFUNDED
FAILEDEnded with nothing to take back; see failureReasonFAILED

Reconcile

GET /orders lists the orders placed with your key, newest first. format=csv gives a spreadsheet.

curlTypeScriptPython
Copy
curl -s -H "x-maxy-key: $MAXY_API_KEY" "$BASE/orders?from=2026-11-01&to=2026-12-01"
  • Up to 100 a page, or 1,000 in a CSV. Follow nextCursor with cursor=.
  • Filter by state, wallet, externalId or externalCustomerId.
  • Send your own ids on POST /orders. Maxy stores them as given.
  • An order stays listed for 30 days after it ends, so export monthly.

A month as a statement, in JSON, CSV or PDF: GET /statements?month=2026-11.

At month-end, export the month and join on orderId:

  1. 01 completed: btcTxId is the payment. Match the amount you showed.
  2. 02 refunded, refundable, failed: no BTC was paid.
  3. 03 In your books but not the export: look it up with GET /status?txHash=. That finds any Maxy order. If it answers 404, Maxy has no such order.

To add an order placed another way: POST /orders/watch.