Skip to main content
POST
Quote and swap in one request

Body

application/json
userPublicKey
string
required

Wallet that signs and pays for the swap

inputMint
string
required

Mint of the token you sell

outputMint
string
required

Mint of the token you buy

amount
integer
required

Amount to sell, in the input token's smallest unit

slippageBps
string
default:50

Slippage in basis points, or dynamic

dexes
string

Only route through these DEXes (comma-separated)

pools
string

Only route through these pools (comma-separated)

maxHops
integer
default:4
Required range: 1 <= x <= 4
onlyDirectRoutes
boolean
default:false
jitRouting
enum<string>
default:auto
Available options:
auto,
true,
false
searchMode
enum<string>
default:fast
Available options:
fast,
deep
wrapUnwrapSol
boolean
default:true
txVersion
enum<string>
default:V0

Case-sensitive. LEGACY and V1 need jitRouting: false.

Available options:
V0,
LEGACY,
V1
asLegacyTransaction
boolean
default:false

Same as txVersion: "LEGACY"

priorityFee
string

A level (min, low, medium, auto, high, veryHigh, turbo, unsafeMax) or a total fee in lamports as a string. Default auto.

maxPriorityFee
integer

Cap on the compute unit price, in micro-lamports

computeUnitPriceMicroLamports
integer
computeUnitLimit
integer
tipAccount
string
tipLamports
integer
destinationTokenAccount
string

Send the output to this token account instead of the wallet's associated token account

feeAccount
string
feeBps
integer
feeFromInput
boolean
default:false
chargeBps
integer

Response

Quote and unsigned transaction

quote
object
required

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

swapTransaction
string
required

Unsigned transaction, base64

lastValidBlockHeight
integer
required
contextSlot
integer
prioritizationFeeLamports
integer

Priority fee included, in lamports