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

Date Format Issue with Data Providers. #97

Open
mwbrulhardt opened this issue Jul 7, 2019 · 0 comments
Open

Date Format Issue with Data Providers. #97

mwbrulhardt opened this issue Jul 7, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@mwbrulhardt
Copy link
Contributor

When trying to use the ExchangeDataProvider class, there is an exception when trying to use the next_ohlcv method. The issue is with giving the "since" parameter a string for the datetime. Instead of a string it wants the timestamp of that date passed as an integer.
This code produces an HTTPError.
`
import dateutil.parser

dp = ExchangeDataProvider()

since = '2018-01-01T00:00:00Z'
dp.exchange.fetchOHLCV(symbol=dp.symbol_pair, timeframe=dp.time_frame,
since=since, limit=1)
This code executes fine.
import dateutil.parser

dp = ExchangeDataProvider()

since = int(dateutil.parser.parse('2018-01-01T00:00:00Z').timestamp())
dp.exchange.fetchOHLCV(symbol=dp.symbol_pair, timeframe=dp.time_frame,
since=since, limit=1)
`

@notadamking notadamking added the bug Something isn't working label Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants