Skip to main content
Use this page as a reference for the key objects returned by the /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, if userPublicKey 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: SOL
Output mint: USDC
Flow:
  1. Call GET /order with inputMint, outputMint, and amount.
  2. Inspect priceImpactPct, routePlan, and executionMode.
  3. If transaction is returned, sign it and send it to Solana.
  4. 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.
Transaction configuration:

Order Response (OrderResponse)

Route Leg (RoutePlanLeg)

Each leg is either a DynamicRoutePlanLeg or SingleMarketRoutePlanLeg. Common fields: