You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to fetch the latest 1min candle for BTC/USD on Bitmex, and am encountering unexpected results if I use the current minute as the argument to since. Code speaks a thousand words, so have a look at this repro:
In this run, I am fetching the candle for 16:49, which is not yet complete, so I would expect the candle as-is depending on the time, which Bitmex provides. Instead, the constant value [[1588610940000, 8816.0, 8816.0, 8816.0, 8816.0, 0.0]] is returned up until we're 16s past the candle. 5s past yields an extra value with a missing Open value (time sync issue?)
However, if I rewind the since param 1 min further into the past (fetching 1 extra candle that I already have) by modifying L13 in the snipped above to:
Hi! Pardon for the long wait. Please, let us know if this does not answer your question: #2254. Feel free to reopen it if needed, or just ask further questions if any.
Hello maintainers,
I'm trying to fetch the latest 1min candle for BTC/USD on Bitmex, and am encountering unexpected results if I use the current minute as the argument to
since
. Code speaks a thousand words, so have a look at this repro:Output:
In this run, I am fetching the candle for 16:49, which is not yet complete, so I would expect the candle as-is depending on the time, which Bitmex provides. Instead, the constant value
[[1588610940000, 8816.0, 8816.0, 8816.0, 8816.0, 0.0]]
is returned up until we're 16s past the candle. 5s past yields an extra value with a missing Open value (time sync issue?)However, if I rewind the
since
param 1 min further into the past (fetching 1 extra candle that I already have) by modifying L13 in the snipped above to:then the output looks like this:
In this case, the latest candle is updating as expected (you can see the volume grow), and there is never a 0-volume result.
Is there a better way to fetch the latest candle other than this workaround?
Log for repro with verbose=True: https://pastebin.com/Gkf6RDcn
OS: Ubuntu 20.04
Python: 3.7.5
CCXT: latest as of today (1.27.20)
Thanks for all your hard work on CCXT!
The text was updated successfully, but these errors were encountered: