Telegram-Kraken-Bot icon indicating copy to clipboard operation
Telegram-Kraken-Bot copied to clipboard

Retrieving executed trades not working

Open systobe opened this issue 4 years ago • 5 comments

When I'm using the command /trades it shows "Retrieving executed trades..." but no output will apear after that. The log shows following exception:

2021-05-13 21:07:23,482 - ERROR - telegram.ext.dispatcher - An uncaught error was raised while processing the update Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/telegram/ext/dispatcher.py", line 279, in process_update handler.handle_update(update, self) File "/usr/local/lib/python3.6/dist-packages/telegram/ext/conversationhandler.py", line 295, in handle_update new_state = self.current_handler.handle_update(update, dispatcher) File "/usr/local/lib/python3.6/dist-packages/telegram/ext/commandhandler.py", line 171, in handle_update return self.callback(dispatcher.bot, update, **optional_args) File "telegram_kraken_bot.py", line 252, in _restrict_access return func(bot, update) File "telegram_kraken_bot.py", line 1163, in trades_cmd if two.startswith("Z"): AttributeError: 'NoneType' object has no attribute 'startswith'

It would be awesome if someone would get it to work. Basically I'll just need the notification feature when orders are filled. Couldn't find anything else and this seems very promising!

systobe avatar May 13 '21 19:05 systobe

That sounds like you only have Python 2 installed and not Python 3. Or you at least start it with Python 2 i guess. Try with Python 3 and let me know if that worked.

Endogen avatar May 14 '21 01:05 Endogen

Definitely using python 3.6. With python 2 the bot doesn't event start. It seems that everything works fine, only the command /trades does not.

systobe avatar May 14 '21 18:05 systobe

Seems like my logic is not able to identify the second symbol from a trading pair. So if the pair is for example BTC-ETH then "ETH" seems not able to be identified. That's the issue. Not sure why tho. Unfortunately i don't have the time to support this bot anymore

Endogen avatar May 14 '21 21:05 Endogen

You're right. I narrowed it down a bit. I think the API returned the pair like XXBTZEUR earlier, but now only XBTEUR without X and Z. I don't know python, but I will try to fix it.

systobe avatar May 28 '21 11:05 systobe

OK 👍

Endogen avatar May 28 '21 14:05 Endogen