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

Candles: Start and End Time - Wrong Object Call #52

Open
SHAHRUKH-KHAN opened this issue Aug 10, 2024 · 0 comments
Open

Candles: Start and End Time - Wrong Object Call #52

SHAHRUKH-KHAN opened this issue Aug 10, 2024 · 0 comments

Comments

@SHAHRUKH-KHAN
Copy link

SHAHRUKH-KHAN commented Aug 10, 2024

The _epoch_millis(start) or _epoch_millis(end) method calls will throw and is throwing attribute error
image

This happens because the documentation says that start and end should be an integer.
image

Two Fixes

  1. Either Send a datetime object in the
    candles = bitvavo.candles('BTC-EUR', '1h', start = datetime(2024, 8, 10, 9, 30), end = datetime(2024, 8, 10, 9, 40))

  2. Just update the _epoch_millis(dt) to return dt*1000 instead of return dt.datetime()*1000. If one sends an integer, this function will always throw an error as mentioned above.

@SHAHRUKH-KHAN SHAHRUKH-KHAN changed the title Candles: Start and End Time - Wrong Object. Candles: Start and End Time - Wrong Object Call Aug 10, 2024
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

1 participant