Categories
Solana

Hi i’m trying to swap with jupitor after getting the quote but i’m getting this error :

{“error”:”Failed to deserialize the JSON body into the target type”}

import requests import json url = "https://quote-api.jup.ag/v6/swap" payload = json.dumps({ "userPublicKey": "My-wallet-key", "wrapAndUnwrapSol": True, "useSharedAccounts": True, "feeAccount": "My-wallet-key", "trackingAccount": "My-wallet-key", "computeUnitPriceMicroLamports": 0, "prioritizationFeeLamports": 0, "asLegacyTransaction": False, "useTokenLedger": False, "destinationTokenAccount": "My-wallet-key", "dynamicComputeUnitLimit": True, "skipUserAccountsRpcCalls": True, "quoteResponse": { "inputMint": "So11111111111111111111111111111111111111112", "inAmount": "2000000", "outputMint": "LzgtUEUEfSFSycua5BAsooY3iwKLR2cfzVd7oVLpump", "outAmount": "4690527798311", "otherAmountThreshold": "4667075159320", "swapMode": "ExactIn", "slippageBps": 50, "platformFee": None, # Explicitly setting to None "priceImpactPct": "0.0033106284921812213000767428", "routePlan": [ { "swapInfo": { "ammKey": "6sRHZZ2tgYMBDG7oi8eG8oauMHeAYi7GGZTZaCYnqw5e", "label": "Raydium", "inputMint": "So11111111111111111111111111111111111111112", "outputMint": "LzgtUEUEfSFSycua5BAsooY3iwKLR2cfzVd7oVLpump", "inAmount": "2000000", "outAmount": "4690527798311", "feeAmount": "5000", "feeMint": "So11111111111111111111111111111111111111112" }, "percent": 100 } ], "contextSlot": 281213564, "timeTaken": 0.478512348 } }) headers = { 'Content-Type': 'application/json', 'Accept': 'application/json' } response = requests.post(url, headers=headers, data=payload) print(response.text) 

submitted by /u/PapaRic0
[link] [comments]

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more!

https://t.me/smashbotcommunity

Start Trading Now:

SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Join The SmashBotAI Telegram Community Now! Get trade alerts, smashable token trade ideas, and more! https://t.me/smashbotcommunity

Start Trading Now:
SmashBotAI Telegram Bot

Claim Your $SMASH Airdrop Now!

Categories