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

Client.py line 1230 -- stream_bars_back #6

Open
eyesuk opened this issue Apr 25, 2021 · 1 comment
Open

Client.py line 1230 -- stream_bars_back #6

eyesuk opened this issue Apr 25, 2021 · 1 comment

Comments

@eyesuk
Copy link

eyesuk commented Apr 25, 2021

Hello Mr Reed
As always thank you very much for your work on these APIs they are nothing short of awesome.
While trying to obtain historical data using stream_bars_back I received a datetime error.
Error:
'datetime.datetime' has no attribute 'datetime'

After some troubleshooting I changed the following lines and it fixed the issue:

Line 16
from datetime import datetime
was changed to:
import datetime

Line 1230
url='stream/barchart/{symbol}/{interval}/{unit}/{bar_back}/{last_date}'
was changed to:
url='stream/barchart/{symbol}/{interval}/{unit}/{bar_back}/{last_date_iso}'

Seems like this fix also fixed others stream_bars_* functions

@akopdev
Copy link

akopdev commented Jul 10, 2021

@eyesuk here is PR for that #10

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