Max: the best position for a trade
Searches for the best position, not just the best route. A normal order already goes at the best route (each market priced alone and a split, the cheapest taken); Max also looks at what to do with the order: take the best route now, or rest on the QX book at the touch for a better price (with how often QX traded there in the last day), or both; the size where one more unit starts to cost more; an arbitrage between QX and QSwap sized to the wallet; and, for a sale, what it returns against what the units cost. Each pick is a short list of ordinary actions (a market order at the best route or on one market, a limit order) with what it should give. Prices move: quote and check every action again before signing. Nothing is signed or sent. The wallet's numbers (balanceQu, heldQty, avgCostQu) come from the caller and are used only to size the plan. For agents a plan costs 100 QU: from a prepaid key's balance (POST /v1/keys, GET /v1/topup, POST /v1/topup/claim, then send x-api-key) or free inside an x402 session (GET /v1/x402). Without either the answer is a 402 with the price. The website's own Max is free.
Request
- Base URL: https://qmax.exchange/api
- URL: https://qmax.exchange/api/v1/max
- Auth: none declared
Query parameters
Asset id from /v1/assets
The amount asked for. Without it Max plans for all the wallet can buy (needs balanceQu) or all it holds (needs heldQty).
QU in the wallet: what a buy or an arbitrage may spend.
Units the wallet can sell here.
What each held unit cost, for the profit of an exit.
Response
{ asset, side, qty, baseline, picks, recommendedId, arbitrage, searched, cut, quotesUsed }
Changes
No recorded changes to this operation across all 1 revision of this API.