I am going to swap tokens on Jupiter as legacy transaction not versioned transaction in python.
I used v4 jupiter api but after running below code I am not sure about the reason of error but decode json error caused.
`input_mint = "So11111111111111111111111111111111111111112" # SOL
output_mint = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" # USDC
amount = 100000000 # 0.1 SOL in lamports
slippage_bps = 50 # 0.5% slippage
quote_url = f"https://quote-api.jup.ag/v4/quote?inputMint={input_mint}&outputMint={output_mint}&amount={amount}&slippageBps={slippage_bps}"
requests.get(quote_url).json()`
If you have any idea or opinion for above code please let me know.
Also if you have source code to perform the legacy jupiter swap transaction in python, please share your experience with me.
Thanks