Skip to main content
GET
Get swap quote

Query Parameters

inputMint
string
required

Mint address of the token you sell. Use So11111111111111111111111111111111111111112 for SOL.

outputMint
string
required

Mint address of the token you buy.

amount
integer
required

Amount to sell, in the input token's smallest unit (for SOL, lamports: 1000000000 = 1 SOL).

Required range: x >= 1
slippageBps
string
default:50

Maximum slippage in basis points (50 = 0.5%), or dynamic to let Raptor choose based on volatility and route.

dexes
string

Only route through these DEXes. Comma-separated, case-insensitive. A family name such as raydium matches all its pool types; use raydium-clmm, meteora-dlmm and so on for one type.

pools
string

Only route through these pool addresses. Comma-separated.

maxHops
integer
default:4

Maximum number of hops in the route.

Required range: 1 <= x <= 4
onlyDirectRoutes
boolean
default:false

Only use single-hop routes. Same as maxHops=1.

jitRouting
enum<string>
default:auto

Just-in-time routing. auto uses it when it improves execution, true always uses it, false turns it off. See JIT routing.

Available options:
auto,
true,
false
searchMode
enum<string>
default:fast

deep searches more routes and takes longer.

Available options:
fast,
deep
feeAccount
string

Wallet that receives your platform fee. Required when feeBps is set.

feeBps
integer
default:0

Platform fee in basis points (max 1000 = 10%).

Required range: 0 <= x <= 1000
feeFromInput
boolean
default:false

Take the platform fee from the input token instead of the output token.

chargeBps
integer
default:0

Extra fee, in basis points, taken only from positive slippage (output above the quote).

Required range: x >= 0
wrapUnwrapSol
boolean
default:true

Quote for native SOL. Use the same value you will send to /swap.

userPublicKey
string

Wallet that will run the swap. Optional; quotes do not check balances.

Response

Quote

Quote returned by GET /quote. Send it back unchanged as quoteResponse.

inputMint
string
required

Mint of the token sold

outputMint
string
required

Mint of the token bought

amountIn
string
required

Amount sold, in the input token's smallest unit

amountOut
string
required

Expected amount received, in the output token's smallest unit

minAmountOut
string
required

Least amount the swap will accept after slippage. The transaction fails rather than fill below this.

priceImpact
number
required

Price impact in percent (0.25 = 0.25%)

slippageBps
integer
required

Slippage used, in basis points

routePlan
object[]
required

Steps of the route, in order

contextSlot
integer
required

Slot the quote was computed at

timeTaken
number
required

Time to compute the quote, in seconds

feeAmount
string

Pool fees for the route, when reported

swapUsdValue
string

USD value of the input amount

platformFee
object

Your platform fee settings, as applied to the quote

tokenTransfers
object

Present only when the input or output token charges a Token-2022 transfer fee. Amounts are strings in the token's smallest unit.

jitRouting
boolean

true when the quote uses a just-in-time route

quoteId
string

Reference to the stored execution plan. Expires after a few seconds.

searchMode
enum<string>

Search mode used

Available options:
fast,
deep