1

I'm trying to get a quote in Jupyter with Python, however it keeps giving me the error: "{'error': 'The route plan does not consume all the input amount, please lower your input amount'}". I've tried a bunch of different amounts but nothings working. The idea is to get the quote of how many tokens i'd get in the desired contract/token with 0.1 SOL.

def quote():
    url = "https://quote-api.jup.ag/v6/quote"

    payload = {
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "tokencontractaddress",
    "amount": "100000000",
    "onlyDirectRoutes": "true"
    }

    headers = {
        'Content-Type': 'application/json',
        'Accept': 'application/json'
    }

    response = requests.get(url, params=payload, headers=headers)

1 Answer 1

1

The coin does not have enough liquidity due to which it occurs. Jupiter basically filters low liquidity coins. Source: enter image description here Link to message (Jupiter official discord): click me

An alternative would be implementing raydium swap, if you are using python... my source code could be helpful or check out the complete raydium sdk in Ts.

2
  • Raydium requires you to pay per month for a Blox account does it not? Or it wont let you query stuff like the swap quote.
    – Steel Hard
    Commented Dec 27, 2023 at 6:13
  • I never heard of that... But in order to swap coins, solscan transaction tells you everything e.g. create ATA, add instructions, close WSOL account... you combine these instructions and then send them through solana http methods e.g. sendTransaction. Regarding querying swap quote is simple, its mentioned in raydium sdk how to compute it and I also have answered my own question in my profile for computing outputs. But remember that the coin pool info must be of a coin/sol pair, e.g. BONK/SOL.
    – kokiez
    Commented Dec 27, 2023 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.