bilix-software / solana-pump-fun

Facilitates the execution and simulation of buy and sell transactions for pump.fun on the Solana blockchain.
https://viper.bot
MIT License
93 stars 43 forks source link

Rate Limited by API #9

Closed ghost closed 2 months ago

ghost commented 2 months ago

Hi, great library!

Inside api.ts your library calls this Pumpfun API https://frontend-api.pump.fun/coins/${mintStr}. The problem is I get rate limited a lot by it. I'm using the pumpFunBuy function which internally calls that API.

My needs are specific and I want to solve this without adding time delays between requests.

I see you are using this data from API to buy with pumpFunBuy:

I believe this data is available to get onchain right? If yes, is there a reason why you use the API versus getting this data onchain?

bilix-software commented 2 months ago

You could implement something where it fetches the price on-chain for coins after it has already fetched them through the api once. You’ll need to do it once to get the bonding curve address though, or figure out another way to get that.

I haven’t implemented anything like that since rate limiting has never been an issue while testing. I assume you’re doing a lot of swaps/volume botting that you’re having issues with rate limiting.

ghost commented 2 months ago

Thanks for response!

That makes sense. I think I'll just slow down the requests and should work with your library.