mehtadone / CryptoGramBot

A simple telegram bot that sends your balance updates from coinigy, send trade notifications from Poloniex and Bittrex and creates you a trade export for your own spreadsheet magicary.
MIT License
105 stars 41 forks source link

Feature Request: Add timeout between api requests #52

Closed s0r0s closed 6 years ago

s0r0s commented 6 years ago

CryptoGram Bot makes frequent requests. In conjunction with gunbot requests it causes IP ban by exchanges (Binance). Something like "BOT_DELAY" in config file will solve this issue.

rsix08 commented 6 years ago

agreed,I turned off the bot for now

rigide commented 6 years ago

In the last 12 hours, Binance has definitely restricted their max api requests per minute. Just in the bot startup time between getting the 24h balance and the first trade check, you get ip banned 15min. Requesting open orders makes it worse with even more requests. We definitely need a minimum "BOT_DELAY" setting for ALL combined api requests (24h balance, trades, open orders, daily notifications, hourly updates, etc)

nnation commented 6 years ago

Yeah, this is a big one. Needed urgently, it would be best to implement in a way that we can go to the config and change it at will.

snahsiub commented 6 years ago

I would like this as well, because of this one, my buy/sell orders (from tradingview and entered via API using a bot) also didnt go through.

BobWatson commented 6 years ago

Please don't do this with a delay - please use websockets instead (maybe after a slow-roll on getting the initial trades, if needed) as they do not have the rate limit issue, and remove the requirement to poll.

rigide commented 6 years ago

"siwtom" has hard coded the timeout to 2mins and recompiled. Seems to be working..

https://github.com/siwtom/CryptoGramBot https://github.com/siwtom/CryptoGramBot/releases

siwtom commented 6 years ago

I have just make two new builds, first for 2mins limited 800 request, and 1min limited 10 request. Not yet tested!

rigide commented 6 years ago

I noticed the change on your github page but it didn't make it into your release. Still checks every 1 minute although I didn't get IP banned before noticing. Turned it back off for now.

nnation commented 6 years ago

@siwtom I still say its best to place this in a config file and read it. And @BobWatson if the frequent poll are removed, how will solution now if a buy or sell was executed in a timely manner?

snahsiub commented 6 years ago

How can i use that hardcoded version?

rigide commented 6 years ago

@siwtom please compile with 2 minute rate limit so we can use it :)

snahsiub commented 6 years ago

Yes please, I feel crippled without Binance. And, can you add Bitfinex as well? :)

BobWatson commented 6 years ago

@nnation the same info is available via websockets, which don’t have a rate limit. People run more than one app - the more apps using ws (esp. for info that is better ‘pushed’, like a trade), the less contention between them.

rsix08 commented 6 years ago

Is there a new version out somewhere