Drakkar-Software / OctoBot

Open source crypto trading bot
https://www.octobot.cloud
GNU General Public License v3.0
3.44k stars 778 forks source link

Binance.us errors out websocket connection #2740

Open KhryptorGraphics opened 2 months ago

KhryptorGraphics commented 2 months ago

Binance.us does not seem to be using websockets correctly. 2024-09-02 16:07:34,331 ERROR ConfigurationWebInterfaceModel Error when checking binanceus exchange credentials: binanceus 418 I'm a teapot {"code":-1003,"msg":"Way too much request weight used; IP banned until 1725311678994. Please use WebSocket Streams for live updates to avoid bans."} (error: DDoSProtection)

GuillaumeDSM commented 2 months ago

Hello @KhryptorGraphics, Thanks for reporting this issue. To fix this error, i'll need to understand your bot configuration. Can you share here which symbol you are trading on binance.us please ?

KhryptorGraphics commented 2 months ago

BTC/USDC, BTC/USDT, DOGE/BTC, DOGE/USDT, ETH/BTC, ETH/USDC, ETH/USDT, LTC/BTC, LTC/USDT, MATIC/BTC, MATIC/ETH, MATIC/USDT, RENDER/USDT, SHIB/USDT, XEC/USDT was the currencies. It seems to be working now though. I changed nothing. I have another issue though, i will start another thread.

DrBlackross commented 3 weeks ago

i actually know this riddle with binance.us (before georgia basically banned binance.us)... it has to do with your api polling time. when dealing with one or two pairs, its ok. BUT, when pulling a bunch of pairs, it hammers the api url and i think binance sees it as a flood, and itll throttle your access.

had this problem with freqtrade, it was easier to adjust the api query times in freqtrade... but i cant find it in the binance.us exchange plugin, right now.

but in freqtrade you just played around with the api polling times, that way it wouldn't be seen like your "hammering" the api for data.

frequi/src/shared/apiService.ts (i think it was in there in the freqtrade source)

either way i reduced the pairs i watched, it went away... and coinbase (which is legal in georgia, go figure) doesnt have this issue, but then again, yes im back to trading two pairs.

BUT, the main suggestion i would say to try is pick two pairs and see if it goes away, then gradually increase. also it might have went away, because it polled the data over a day, working through the pairs.