curl --request POST \
--url https://raptor-beta.solanatracker.io/swap \
--header 'Content-Type: application/json' \
--data '
{
"userPublicKey": "<string>",
"quoteResponse": {
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"slippageBps": 123,
"routePlan": [
{
"programId": "<string>",
"dex": "<string>",
"pool": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"percent": 123
}
],
"contextSlot": 123,
"timeTaken": 123,
"swapUsdValue": "<string>",
"priorityFee": {
"recommended": 123,
"level": "<string>",
"levels": {
"min": 123,
"low": 123,
"medium": 123,
"high": 123,
"veryHigh": 123,
"unsafeMax": 123
}
},
"platformFee": {
"feeBps": 123,
"feeAccount": "<string>"
}
},
"wrapUnwrapSol": true,
"txVersion": "v0",
"computeUnitPriceMicroLamports": 123,
"computeUnitLimit": 123,
"priorityFee": "<string>",
"maxPriorityFee": 123,
"tipAccount": "<string>",
"tipLamports": 123,
"feeAccount": "<string>",
"feeBps": 123,
"feeFromInput": false,
"chargeBps": 123
}
'{
"swapTransaction": "<string>",
"lastValidBlockHeight": 123,
"contextSlot": 123,
"prioritizationFeeLamports": 123
}Build a complete swap transaction from a quote
curl --request POST \
--url https://raptor-beta.solanatracker.io/swap \
--header 'Content-Type: application/json' \
--data '
{
"userPublicKey": "<string>",
"quoteResponse": {
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"minAmountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"slippageBps": 123,
"routePlan": [
{
"programId": "<string>",
"dex": "<string>",
"pool": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"amountIn": "<string>",
"amountOut": "<string>",
"feeAmount": "<string>",
"priceImpact": 123,
"percent": 123
}
],
"contextSlot": 123,
"timeTaken": 123,
"swapUsdValue": "<string>",
"priorityFee": {
"recommended": 123,
"level": "<string>",
"levels": {
"min": 123,
"low": 123,
"medium": 123,
"high": 123,
"veryHigh": 123,
"unsafeMax": 123
}
},
"platformFee": {
"feeBps": 123,
"feeAccount": "<string>"
}
},
"wrapUnwrapSol": true,
"txVersion": "v0",
"computeUnitPriceMicroLamports": 123,
"computeUnitLimit": 123,
"priorityFee": "<string>",
"maxPriorityFee": 123,
"tipAccount": "<string>",
"tipLamports": 123,
"feeAccount": "<string>",
"feeBps": 123,
"feeFromInput": false,
"chargeBps": 123
}
'{
"swapTransaction": "<string>",
"lastValidBlockHeight": 123,
"contextSlot": 123,
"prioritizationFeeLamports": 123
}User's wallet public key
Show child attributes
Automatically wrap/unwrap SOL
Transaction version
legacy, v0 Priority fee in microlamports
Compute unit limit
Priority fee mode or microlamports
Maximum priority fee cap
Tip account pubkey
Tip amount in lamports
Platform fee recipient
Platform fee in basis points
Take fee from input
Extra charge on positive slippage
Was this page helpful?