The Jupiter Developer Platform is live. Previous portal users keep their rate limits for free until 30 June 2026 — set up billing on the new platform before then. See the Migration Guide for details.
curl --request POST \
--url https://api.jup.ag/swap/v1/swap-instructions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userPublicKey": "<string>",
"quoteResponse": {
"inputMint": "<string>",
"inAmount": "<string>",
"outputMint": "<string>",
"outAmount": "<string>",
"otherAmountThreshold": "<string>",
"swapMode": "ExactIn",
"slippageBps": 1,
"priceImpactPct": "<string>",
"routePlan": [
{
"swapInfo": {
"ammKey": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"inAmount": "<string>",
"outAmount": "<string>",
"label": "<string>",
"feeAmount": "<string>",
"feeMint": "<string>"
},
"percent": 123,
"bps": 123
}
],
"platformFee": {
"amount": "<string>",
"feeBps": 123
},
"contextSlot": 123,
"timeTaken": 123,
"mostReliableAmmsQuoteReport": {
"info": {}
}
},
"payer": "<string>",
"wrapAndUnwrapSol": true,
"useSharedAccounts": true,
"feeAccount": "<string>",
"trackingAccount": "<string>",
"prioritizationFeeLamports": {
"priorityLevelWithMaxLamports": {
"priorityLevel": "medium",
"maxLamports": 123,
"global": false
}
},
"asLegacyTransaction": false,
"destinationTokenAccount": "<string>",
"nativeDestinationAccount": "<string>",
"dynamicComputeUnitLimit": false,
"skipUserAccountsRpcCalls": false,
"dynamicSlippage": false,
"computeUnitPriceMicroLamports": 123,
"blockhashSlotsToExpiry": 123
}
'{
"computeBudgetInstructions": [
{
"programId": "ComputeBudget111111111111111111111111111111",
"accounts": [],
"data": "AsBcAA=="
}
],
"setupInstructions": [
{
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"accounts": [
{
"pubkey": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
"isSigner": true,
"isWritable": true
}
],
"data": ""
}
],
"swapInstruction": {
"programId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
"accounts": [
{
"pubkey": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
"isSigner": true,
"isWritable": true
}
],
"data": "3Dc2AAAAAAA..."
},
"cleanupInstruction": null,
"otherInstructions": [],
"addressLookupTableAddresses": [
"GxS6FiQ9RbErBB48mE34U4Jv13MdEJov4R1e5KgFzRFY"
]
}Request for swap instructions that you can use from the quote you get from /quote
curl --request POST \
--url https://api.jup.ag/swap/v1/swap-instructions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"userPublicKey": "<string>",
"quoteResponse": {
"inputMint": "<string>",
"inAmount": "<string>",
"outputMint": "<string>",
"outAmount": "<string>",
"otherAmountThreshold": "<string>",
"swapMode": "ExactIn",
"slippageBps": 1,
"priceImpactPct": "<string>",
"routePlan": [
{
"swapInfo": {
"ammKey": "<string>",
"inputMint": "<string>",
"outputMint": "<string>",
"inAmount": "<string>",
"outAmount": "<string>",
"label": "<string>",
"feeAmount": "<string>",
"feeMint": "<string>"
},
"percent": 123,
"bps": 123
}
],
"platformFee": {
"amount": "<string>",
"feeBps": 123
},
"contextSlot": 123,
"timeTaken": 123,
"mostReliableAmmsQuoteReport": {
"info": {}
}
},
"payer": "<string>",
"wrapAndUnwrapSol": true,
"useSharedAccounts": true,
"feeAccount": "<string>",
"trackingAccount": "<string>",
"prioritizationFeeLamports": {
"priorityLevelWithMaxLamports": {
"priorityLevel": "medium",
"maxLamports": 123,
"global": false
}
},
"asLegacyTransaction": false,
"destinationTokenAccount": "<string>",
"nativeDestinationAccount": "<string>",
"dynamicComputeUnitLimit": false,
"skipUserAccountsRpcCalls": false,
"dynamicSlippage": false,
"computeUnitPriceMicroLamports": 123,
"blockhashSlotsToExpiry": 123
}
'{
"computeBudgetInstructions": [
{
"programId": "ComputeBudget111111111111111111111111111111",
"accounts": [],
"data": "AsBcAA=="
}
],
"setupInstructions": [
{
"programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
"accounts": [
{
"pubkey": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
"isSigner": true,
"isWritable": true
}
],
"data": ""
}
],
"swapInstruction": {
"programId": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
"accounts": [
{
"pubkey": "BQ72nSv9f3PRyRKCBnHLVrerrv37CYTHm5h3s9VSGQDV",
"isSigner": true,
"isWritable": true
}
],
"data": "3Dc2AAAAAAA..."
},
"cleanupInstruction": null,
"otherInstructions": [],
"addressLookupTableAddresses": [
"GxS6FiQ9RbErBB48mE34U4Jv13MdEJov4R1e5KgFzRFY"
]
}Documentation Index
Fetch the complete documentation index at: https://dev.jup.ag/docs/llms.txt
Use this file to discover all available pages before exploring further.
Get API key via https://developers.jup.ag/portal
Show child attributes
platformFeeBps is passed in /quote, the feeAccount must be passed as well/swap-instructions to add both at the same timeauto, but preferred to use priorityLevelWithMaxLamports as it may be more accurate when accounting local fee marketprioritizationFeeLamports parameterShow child attributes
asLegacyTransaction in /quote, otherwise the transaction might be too largedestinationTokenAccount and nativeDestinationAccount are mutually exclusivedestinationTokenAccount and nativeDestinationAccount are mutually exclusiveslippageBps parameter in the quote response.computeUnitLimit (1400000) * computeUnitPriceMicroLamportsprioritizationFeeLamports and dynamicComputeUnitLimit instead of passing in your own compute unit priceSuccessful response
prioritizationFeeLamports parameter, you will see a custom tip instruction to Jito here.Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?