1
Quote the order
GET /orders/quote with owner, in, out, totalIn, minRate and expiry (plus
sliceIn, interval, startAt, recipient). Returns the order, typedData to sign, the current marketRate, and
permit (Permit2 typed data, or null when the allowance already covers it) and approval, as for
gasless swaps.2
Sign
The owner signs
typedData, and permit.typedData when present.3
Store it
POST /orders with { "order", "signature", "permit": { "message", "signature" }, "erc2612" }.
Returns the order hash.4
Track or cancel
GET /orders?owner= lists orders with their fills. DELETE /orders/<hash>
stops Route filling it.Rules
minRateis output per input in raw units, scaled by 1e18, over each whole slice, with the gas fee included. Leave room for the gas fee when you set it near the market rate, or the keeper will hold the order.- Each slice must be worth at least 20 gas fees. Expiry is at most 365 days out.
- The Permit2 allowance must cover every live order of the owner for that token;
permitis sized for that. DELETEstops Route. A hard cancel iscancel(hash)on RouteOrders from the owner, or a Permit2 lockdown.