CyberPunkMetalHead / gateio-crypto-trading-bot-binance-announcements-new-coins

This is a crypto trading bot that scans the Binance Annoucements page for new coins, and places trades on Gateio
MIT License
1.21k stars 302 forks source link

Validate status_code when retrieving announcements #140

Closed Linus045 closed 2 years ago

Linus045 commented 2 years ago

This prevents a crash when an invalid status code is received when pulling announcements from binance or kucoin. We make sure the status code is 200 (OK) and otherwise log an error.

iamtodor commented 2 years ago

@Linus045 perhaps we can extract only one general method which we can call something like get_coin_announcement instead of duplicate it? The context of my suggestion is the following: https://deviq.com/principles/dont-repeat-yourself

Linus045 commented 2 years ago

yeah i was thinking about refactoring that as well but didn't want to change so much for a quick bugfix.