Skip to content
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

raydiumSdk routeSwap with 429 Too Many Requests #55

Open
mianshenglee opened this issue Nov 23, 2024 · 0 comments
Open

raydiumSdk routeSwap with 429 Too Many Requests #55

mianshenglee opened this issue Nov 23, 2024 · 0 comments

Comments

@mianshenglee
Copy link

i'm using raydiumSdk to do routeSwap like the demo :https://github.com/raydium-io/raydium-sdk-V2-demo/blob/master/src/trade/routeSwap.ts, but when the program exec raydiumSdk.tradeV2.fetchSwapRoutesData, it will cause this error: Server responded with 429 Too Many Requests. Retrying after 500ms delay..., at last throw this exception : Error: failed to get info for multiple accounts, RPC_ERROR, 429 Too Many Requests.

since my rpc is paid , so i think the sdk do calling rpc too many times some way.

i check out the sdk source and find getMultipleAccountsInfo function, this :await Promise.all(_batch.map(async (i) => await (connection as any)._rpcBatchRequest(i))). it will call rpc many times .... why the sdk do that ?

any one can help me out how to solve this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant