pystore icon indicating copy to clipboard operation
pystore copied to clipboard

how to update exist data ?

Open lookis opened this issue 4 years ago • 1 comments

the latest stock bar data may change due to not finished the timeframe. for example:

>>> datetime.now()
datetime.datetime(2019, 12, 5, 15, 48, 46, 595878)
>>> exchange.fetch_ohlcv(symbol='BTC/USDT', limit=3)
[[1575531960000, 7297.07, 7300.0, 7296.36, 7299.49, 15.150618], [1575532020000, 7299.16, 7304.13, 7299.16, 7303.65, 25.041672], [1575532080000, 7303.68, 7307.73, 7302.76, 7307.7, 18.090149]]
>>> datetime.now()
datetime.datetime(2019, 12, 5, 15, 48, 52, 243378)
>>> exchange.fetch_ohlcv(symbol='BTC/USDT', limit=3)
[[1575531960000, 7297.07, 7300.0, 7296.36, 7299.49, 15.150618], [1575532020000, 7299.16, 7304.13, 7299.16, 7303.65, 25.041672], [1575532080000, 7303.68, 7308.97, 7302.76, 7308.97, 19.671468]]

notice that the data at 1575532080000 is not finish at 15:48, so the close value will keep changing when i fetch the data between 15:48:00 to 15:48:59

is there any way to update data after i write the old one into store?

lookis avatar Dec 05 '19 07:12 lookis

Hi @lookis , for information, I have started an alternative lib, oups that has some similarities with pystore. Please, beware this is my first project, but I would gladly accept any feedback on it.

@ranaroussi, I am aware this post may not be welcome and I am sorry if it is a bit rude. Please, remove it if it does.

yohplala avatar Jan 18 '22 09:01 yohplala