/order endpoint and where each one appears in the request/response flow.
This page focuses on imperative trades.
We recommend using the
/order endpoint for new integrations. The /quote, /swap, and
/swap-instructions endpoints are still available but /order is the preferred approach.High-Level Model
You request an Order, which returns a Quote and, ifuserPublicKey is
provided, a Transaction to sign and submit. The response may include a
routePlan (one or more legs) and an executionMode (sync or async).
Example (Trade SOL → USDC)
Input mint: SOLOutput mint: USDC Flow:
- Call
GET /orderwithinputMint,outputMint, andamount. - Inspect
priceImpactPct,routePlan, andexecutionMode. - If
transactionis returned, sign it and send it to Solana. - For async execution, poll
GET /order-status.
Entity Reference
Order Request (Query Parameters)
Core parameters:
Routing controls:
Execution controls:
Fees and accounts:
In
POST /swap, if you set destinationTokenAccount.address and want native SOL output, pass the wallet address (owner) instead of the wallet’s WSOL associated token account address.