We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I’ve been working on integrating Jupiter’s API to build a trading bot and have successfully implemented the following:
Successfully retrieved valid quotes from the /v6/quote endpoint using Postman and my application code.
Example response from /v6/quote:
{ "inputMint": "So11111111111111111111111111111111111111112", "inAmount": "100000000", "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "outAmount": "19299219", "routePlan": [ { "swapInfo": { "ammKey": "5zvhFRN45j9oePohUQ739Z4UaSrgPoJ8NLaS2izFuX1j", "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "inAmount": "100000000", "outAmount": "19268051", "feeAmount": "10000", "feeMint": "So11111111111111111111111111111111111111112" }, "percent": 100 } ] }
I am attempting to execute a swap using the /v6/swap endpoint with the routePlan provided by the quote API.
Problem Statement
Despite following the documentation, I am encountering the following error when attempting to call /v6/swap:
{ "error": "Failed to deserialize the JSON body into the target type" }
Current Setup
Here’s the payload I’m sending to /v6/swap:
{ "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "amount": "100000000", "slippageBps": 50, "userPublicKey": "CzecDkTumsPDkRfksDeXGvinCd3P4aTFUSt7UpktFjoL", "routePlan": [ { "ammKey": "5zvhFRN45j9oePohUQ739Z4UaSrgPoJ8NLaS2izFuX1j", "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB", "inAmount": "100000000", "outAmount": "19268051", "feeAmount": "10000", "feeMint": "So11111111111111111111111111111111111111112" } ] }
Key Details:
Headers Used:
{ "Content-Type": "application/json", "Accept": "application/json" }
Environment: Mainnet
Libraries Used: Postman for testing and Node.js (with axios for HTTP requests).
Steps Taken to Debug:
Verified the JSON payload using JSONLint to ensure it is properly formatted.
Cross-checked the payload against the /v6/swap documentation.
The routePlan field was directly extracted from the /v6/quote response.
Confirmed that inputMint, outputMint, and ammKey are valid Solana addresses.
The same error occurs when testing with Postman, confirming the issue is not specific to my application.
Removed routePlan and sent only required fields to see if the error changes. The same error persists.
Request for Assistance
Could you please help me identify:
If there are any known issues or specific formatting requirements for the routePlan or the entire payload that I might have missed?
If additional headers, authentication tokens, or other parameters are required?
Any specific debugging tools or techniques recommended for this endpoints?
Thank you in advance!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello,
I’ve been working on integrating Jupiter’s API to build a trading bot and have successfully implemented the following:
Successfully retrieved valid quotes from the /v6/quote endpoint using Postman and my application code.
Example response from /v6/quote:
{
"inputMint": "So11111111111111111111111111111111111111112",
"inAmount": "100000000",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outAmount": "19299219",
"routePlan": [
{
"swapInfo": {
"ammKey": "5zvhFRN45j9oePohUQ739Z4UaSrgPoJ8NLaS2izFuX1j",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"inAmount": "100000000",
"outAmount": "19268051",
"feeAmount": "10000",
"feeMint": "So11111111111111111111111111111111111111112"
},
"percent": 100
}
]
}
I am attempting to execute a swap using the /v6/swap endpoint with the routePlan provided by the quote API.
Problem Statement
Despite following the documentation, I am encountering the following error when attempting to call /v6/swap:
{
"error": "Failed to deserialize the JSON body into the target type"
}
Current Setup
Here’s the payload I’m sending to /v6/swap:
{
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"amount": "100000000",
"slippageBps": 50,
"userPublicKey": "CzecDkTumsPDkRfksDeXGvinCd3P4aTFUSt7UpktFjoL",
"routePlan": [
{
"ammKey": "5zvhFRN45j9oePohUQ739Z4UaSrgPoJ8NLaS2izFuX1j",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
"inAmount": "100000000",
"outAmount": "19268051",
"feeAmount": "10000",
"feeMint": "So11111111111111111111111111111111111111112"
}
]
}
Key Details:
Headers Used:
{
"Content-Type": "application/json",
"Accept": "application/json"
}
Environment: Mainnet
Libraries Used: Postman for testing and Node.js (with axios for HTTP requests).
Steps Taken to Debug:
Verified the JSON payload using JSONLint to ensure it is properly formatted.
Cross-checked the payload against the /v6/swap documentation.
The routePlan field was directly extracted from the /v6/quote response.
Confirmed that inputMint, outputMint, and ammKey are valid Solana addresses.
The same error occurs when testing with Postman, confirming the issue is not specific to my application.
Removed routePlan and sent only required fields to see if the error changes. The same error persists.
Request for Assistance
Could you please help me identify:
If there are any known issues or specific formatting requirements for the routePlan or the entire payload that I might have missed?
If additional headers, authentication tokens, or other parameters are required?
Any specific debugging tools or techniques recommended for this endpoints?
Thank you in advance!
The text was updated successfully, but these errors were encountered: