Confirm Transaction Fails

Hi Everyone, I’m trying to make a bot using QuickNode. I’m using the one provided by them as a basic structure, before building on top of it I wanted to test the bot on a wallet where I have a small amount of SOL, but the SWAP between SOL and USCD get stucked here:

const confirmation = await this.solanaConnection.confirmTransaction({signature: txid,blockhash, lastValidBlockHeight}, 'confirmed');

The Error launched is Unable to execute swap . I have configured the right METIS_ENDPOINT, I have created the Add-On on QuickNode and pasted the address. I have the Solana Endpoint which is the one given by the Free Plan Endopoint I have created on QuickNode.

The private key is correct and already given in the right format. Sometimes the error does not come and it just blocks there, sometimes instead the error is launched.

I did different debugs, red the documentations but I don’t see where is the problem. If someone had the same or knows how to fix this, I would be extremely grateful.

Have a wonderful day everybody !

Hard to diagnose without any code examples or stack traces, but something I’ve seen a lot of recently has been not adding a priority fee with your transaction, which can cause your transaction to get dropped.

We have an API for it, along with a guide here.

guide: How to Use Priority Fees on Solana | QuickNode

API: Solana Priority Fee API - QuickNode Marketplace