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.
The previous /quote, /swap, and /swap-instructions model has been deprecated. All imperative trading flows now use the /order endpoint.

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:
FieldTypeNotes
inputMintstringBase58 input mint
outputMintstringBase58 output mint
amountintegerInput amount (scaled integer)
userPublicKeystringWallet; includes transaction in response
slippageBpsinteger | "auto"Max allowed slippage
predictionMarketSlippageBpsinteger | "auto"Slippage for prediction orders
Routing controls:
FieldTypeNotes
dexesstringComma-separated include list
excludeDexesstringComma-separated exclude list
onlyDirectRoutesbooleanForce single-leg routes
maxRouteLengthintegerMax legs (ignored if onlyDirectRoutes)
onlyJitRoutesbooleanForce JIT routes
forJitoBundlebooleanRoutes compatible with Jito bundles
Execution controls:
FieldTypeNotes
allowSyncExecbooleanAllow sync execution
allowAsyncExecbooleanAllow async execution
restrictRevertMintbooleanInput must be revert mint for async
Fees and accounts:
FieldTypeNotes
platformFeeModeenumFee collected from input/output
platformFeeBpsintegerPlatform fee in bps
platformFeeScaleintegerPrediction market fee scale (3 decimals)
feeAccountstringToken account for platform fees
referralAccountstringReferral account for fee account creation
positiveSlippageFeeAccountstringAccount for positive slippage
positiveSlippageLimitPctintegerCap on positive slippage fee
sponsorstringSponsor wallet (gasless)
destinationTokenAccountstringOutput token account
destinationWalletstringOutput wallet (ATA if needed)
revertWalletstringRevert wallet for async orders
Transaction configuration:
FieldTypeNotes
wrapAndUnwrapSolbooleanUse native SOL if true
prioritizationFeeLamportsinteger | enumPriority fee or level
computeUnitPriceMicroLamportsintegerCU price (mutually exclusive)
dynamicComputeUnitLimitbooleanSimulate to determine CU limit
includeJitoSandwichMitigationAccountboolean | stringJito mitigation
Prediction market parameters:
FieldTypeNotes
predictionMarketInitPayerstringPays market init if uninitialized
outcomeAccountRentRecipientstringRent recipient on close

Order Response (OrderResponse)

FieldTypeNotes
inputMintstringBase58 input mint
inAmountstringMax input amount (scaled integer)
outputMintstringBase58 output mint
outAmountstringExpected output amount (scaled integer)
otherAmountThresholdstringMin output after fees
minOutAmountstringSame as otherAmountThreshold
slippageBpsintegerMax slippage in bps
predictionMarketSlippageBpsintegerPrediction order slippage
priceImpactPctstringEstimated price impact
contextSlotintegerSlot at evaluation time
executionModeenumsync or async
routePlanarrayRoute legs (sync and known routes)
platformFeeobject | nullPlatform fee if applied
initPredictionMarketCostintegerLamports to init market
predictionMarketInitPayerMustSignbooleanInit payer signature required
revertMintstringRevert mint for async orders
transactionstringBase64 tx to sign/send
lastValidBlockHeightintegerLast valid block height
computeUnitLimitintegerCompute unit limit
prioritizationFeeLamportsintegerPriority fee in lamports
prioritizationTypeobjectPriority fee type

Route Leg (RoutePlanLeg)

Each leg is either a DynamicRoutePlanLeg or SingleMarketRoutePlanLeg. Common fields:
FieldTypeNotes
venuestringVenue for the leg
marketKeystringMarket key for venue
inputMintstringInput mint
outputMintstringOutput mint
inAmountstringMax input amount
outAmountstringExpected output amount
inputMintDecimalsintegerInput decimals
outputMintDecimalsintegerOutput decimals
datastringPresent only on dynamic legs