Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving executed trades not working #34

Open
systobe opened this issue May 13, 2021 · 5 comments
Open

Retrieving executed trades not working #34

systobe opened this issue May 13, 2021 · 5 comments

Comments

@systobe
Copy link
Contributor

systobe commented May 13, 2021

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!

@Endogen
Copy link
Owner

Endogen commented May 14, 2021

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.

@systobe
Copy link
Contributor Author

systobe commented May 14, 2021

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.

@Endogen
Copy link
Owner

Endogen commented May 14, 2021

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

@systobe
Copy link
Contributor Author

systobe commented May 28, 2021

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.

@Endogen
Copy link
Owner

Endogen commented May 28, 2021

OK 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants