-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Streaming Historical Data... "End time no longer supported" #198
Comments
It used to work, but I believe it doesn't anymore. You can try manually changing the SDK to allow the |
From my own interaction with TT api support - "known issue" with dxfeed. I "handle" it by inspecting the candle |
Please note you can get historical data, however! You just can't set an ending date for the range. |
Thank you both for your replies. I think part of my confusion was also that data comes in "backwards" (most recent to least recent). For posterity, I have posted the solution I implemented below. @militantwalrus I assume your solution looks similar? async def download_hisorical_data(session: Session,
symbol: str,
internval: str,
start: datetime,
end: datetime = datetime.now()) -> list[dict]:
data = []
async with DXLinkStreamer(session) as streamer:
await streamer.subscribe_candle([symbol],
internval,
start_time=start,
extended_trading_hours=True)
async for candle in streamer.listen(Candle):
# Candles will com in *backwards* (most recent to least recent)
# Ignore data until it is past the specified end_time
if candle.time >= end.timestamp() * 1000:
continue
elif candle.time == start.timestamp() * 1000:
break
else:
data.append(candle.model_dump())
return data
# example usage
data = asyncio.run(download_hisorical_data(session, future.streamer_symbol, '5m', start, end)) |
Now that 'end time' is no longer supported, it seems like we can only receive the last x count of candles (usually 8000), regardless of how many additional candles DXFeed stores |
Probably the only way to get this resolved is to reach out to Tasty and get them to fix it. |
Similar, except that I do Also beware candles with |
I am trying to use
DXLinkStreamer
to download historical data. My code looks something like this:When I run this, I am met with
tastytrade.utils.TastytradeError: End time no longer supported
. The tastytrade api supports historical candles as documented here. Is historical data not yet implemented in this wrapper?The text was updated successfully, but these errors were encountered: