Quote stock holdings → USDC (all legs needed; all-or-nothing submit)
POST/quote/sell
Plans the optimal sequence of swap legs across the user's current holdings.
Every returned leg must be signed and submitted together at /trade/submit.
Request
Responses
- 200
- 400
- 401
- 403
- 410
- 422
- 429
- 502
- 503
OK
Invalid request body, slippage out of range, unknown ticker, zero amount, a payout_chain the request cannot reach (its wallet missing, or nothing in scope can pay out there; see payout_chain), or (pinned execution: "user_operation") a wallet not delegated to Modular Account v2.
Ownership-proof failure.
A wallet on the request was flagged by sanctions screening. Permanent; do not retry with the same wallet.
Quote stale (upstream price moved past expiry mid-build).
No fillable routes returned by the planner, or insufficient holdings
for the requested share amount. With payout_chain, holdings that
cover the amount but cannot pay out there are no_routes with
reason: payout_route_unavailable, never holdings_insufficient.
Sliding window exceeded: per-IP or per-(IP, wallet), plus a per-organisation bucket (shared across all of your keys) whenever a valid X-API-Key is presented. Retry-After header carries delta-seconds.
Upstream provider failed or rate-limited us.
screening_unavailable: sanctions screening could not be completed and the request was
rejected (fail-closed). Transient; back off and retry.
integrator_fee_misconfigured (with an X-API-Key): your configured fee schedule no longer
fits a venue Treasures routes through. A Treasures-side configuration issue that retrying
soon won't clear; contact Treasures, or send integrator_fee_bps: 0 to quote without your fee.