-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected timeouts while using jup.ag swap api in NodeJS #13
Comments
For me it helped to wait 5 seconds and use another way to validate the transaction:
|
An even better addition:
|
I'm facing the exact same issue. If I try to swap a less busy token - it works almost every time, however, with busier tokens it rarely succeeds. Did you ever find a solution to the problem? |
You are a life saver, thank you very much! Everything works now! |
Yes, as zerotop pointed out, you have to add the while loop, that basically retries to executing the transaction. |
Hi guys, I just started to use the Jupiter APIs, but I have one problem with them. It is terribly slow. The code does work, it will swap, but 9 out of 10 times it will time out and I don't know why. I tried to find out where the code gets stuck and it is on the following code:
await connection.confirmTransaction(txid);
Why could that be? I have also used different RPC endpoints, for example the Helius one, and it was still super slow. I have also made a "race" between trying to swap in in the Jupiter GUI using my custom Helios RPC endpoint and my code with the same Helios RPC endpoint and the GUI was significantly faster. What am I missing please?This is the code:
Thank you for you time!
The text was updated successfully, but these errors were encountered: