Closed inanisvitae closed 1 month ago
The parameter to subscribe_candle
is start_time
not start_date
, and should be a datetime
object.
Hi,
It is datetime
object
I'm just using the example in https://github.com/tastyware/tastytrade/blob/master/tests/test_streamer.py
The last candle's timestamp is 1728864000000 which is October 14 instead of October 20. The last Monday.
Ah my bad! You were indeed using it correctly. I ran it and got the latest week's data just fine. I think your problem is you're throwing away the most recent data with this line:
_ = await streamer.get_event(Candle)
Right! Thanks a lot.
Describe the bug When I run this on weekend like Sunday,
somehow it doesn't return the latest weekly data,
eventSymbol='GOOG{=w,tho=true}' eventTime=0 eventFlags=0 index=7425414339231744000 time=1728864000000 sequence=0 count=860998 open=Decimal('164.91') high=Decimal('169.09') low=Decimal('164.37') close=Decimal('165.06') volume=Decimal('47603566.0') vwap=Decimal('166.1442368957657') bidVolume=Decimal('23371380.0') askVolume=Decimal('24232186.0') impVolatility=Decimal('0.3523') openInterest=None
is the latest candle. 1728864000000 is 2 weeks ago instead of the most recent Monday. Same issue also exists with daily timeframe. Thanks in advance. How to reproduce Post your code so the source of the problem can be identified.