cyberjunky / 3commas-cyber-bots

3Commas bot helpers, AltRank, GalaxyScore, Watchlists, Auto-Compound, TrailingStopLoss, TakeProfitIncrement
MIT License
211 stars 68 forks source link

Turn off Altrank bot, when Unauthorized API key error occurs #170

Closed Gh61 closed 1 year ago

Gh61 commented 1 year ago

Is your feature request related to a problem? Please describe. I would like to start and test altrank bot once again. As the new Lunarcrush api key is now pretty expensive, I'd like to test if it's worth it. I can get the test api key, that is only valid for like a week. And i want the bot to be automatically turned off when it expires, so it doesn't start any new trade based on outdated altrank.

Describe the solution you'd like Create option, to automatically turn the bot off, when Unauthorized API key error occurs.

Describe alternatives you've considered Doing it manually. IDK

Additional context The Unauthorized API key error message looks like this:

[3C Cyber Bot-Helper altrank]

Fetching LunarCrush data failed with code 401: {"error":"Error: Not authorized (2)"}
Gh61 commented 1 year ago

Ok, so the LunarCrush test key expires in 8 or 9 hours, so there is no point in using it this way. Just to be clear, it's 8-9 hours when not logged. When logged, it appears to be about 7 days.