I am using the swap api to execute swap trades on solana tokens.
Most of the time the swap api works well, however way too often the transaction fails. The suspected culprit for this is slippage but I have increased slippage to over 30% and the transaction still fails. Then, when I execute the same transaction through the UI it completes with 0.5% slippage.
Please can anyone help me understand what is going on here? Is the API itself unstable? Is are something I am missing or doing wrong?
Also, is there a way to get more detail on the failed tx and the reason, maybe a traceback or something?
I am using the swap api to execute swap trades on solana tokens.
Most of the time the swap api works well, however way too often the transaction fails. The suspected culprit for this is slippage but I have increased slippage to over 30% and the transaction still fails. Then, when I execute the same transaction through the UI it completes with 0.5% slippage.
Please can anyone help me understand what is going on here? Is the API itself unstable? Is are something I am missing or doing wrong?
Also, is there a way to get more detail on the failed tx and the reason, maybe a traceback or something?
{'quoteResponse': {'inputMint': '3ag1Mj9AKz9FAkCQ6gAEhpLSX8B2pUbPdkb9iBsDLZNB', 'inAmount': '1110252197432', 'outputMint': 'So11111111111111111111111111111111111111112', 'outAmount': '48617665', 'otherAmountThreshold': '43755899', 'swapMode': 'ExactIn', 'slippageBps': 1000, 'platformFee': None, 'priceImpactPct': '0.007981763744257982803141058', 'routePlan': [{'swapInfo': {'ammKey': 'BZivKpJWgQvrA3yYe3ubomufeGVouoYoUhosmBEdqF9y', 'label': 'Raydium', 'inputMint': '3ag1Mj9AKz9FAkCQ6gAEhpLSX8B2pUbPdkb9iBsDLZNB', 'outputMint': 'So11111111111111111111111111111111111111112', 'inAmount': '1107476549121', 'outAmount': '48617665', 'feeAmount': '2775630493', 'feeMint': '3ag1Mj9AKz9FAkCQ6gAEhpLSX8B2pUbPdkb9iBsDLZNB'}, 'percent': 100}], 'contextSlot': 245664909, 'timeTaken': 0.086242568}, 'userPublicKey': '', 'wrapAndUnwrapSol': True, 'prioritizationFeeLamports': {'autoMultiplier': 1}}