Skip to content

Allow accessing older historical data#273

Draft
DGChahin wants to merge 2 commits intotastyware:masterfrom
DGChahin:master
Draft

Allow accessing older historical data#273
DGChahin wants to merge 2 commits intotastyware:masterfrom
DGChahin:master

Conversation

@DGChahin
Copy link
Copy Markdown

@DGChahin DGChahin commented Oct 4, 2025

Description

The existing implementation of subscribe_candle did not allow for setting toTime and it also didn't account for the unknown limitation that DxFeed/DxLink has: setting tho=True messes with the amount of available data via the feed (they told me via email).

NOTE: I have NOT gone through the pre-merge checklist yet. I will try to go through it on Monday.

Pre-merge checklist

  • Code formatted correctly (check with make lint)
  • Code implemented for both sync and async
  • Passing tests locally (check with make test, make sure you have TT_REFRESH, TT_SECRET, and TT_ACCOUNT environment variables set)
  • New tests added (if applicable)

Please note that, in order to pass the tests, you'll need to set up your Tastytrade credentials as repository secrets on your local fork. Read more at CONTRIBUTING.md.


EDIT: Apparently the toTime setting doesn't work with the Websocket, despite working with the web service. Will see if I find a way to make it work, because otherwise there's no way to get past the 8000 candle limit.

@DGChahin DGChahin marked this pull request as draft October 4, 2025 16:10
Copy link
Copy Markdown
Member

@Graeme22 Graeme22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to support this but removed it as it looked to be broken! Good to know it's still possible to set an end date. You may also want to look at #198 and how the code looked before:

async def subscribe_candle(

Comment thread tastytrade/streamer.py Outdated
Comment thread tastytrade/streamer.py Outdated
Comment thread tastytrade/streamer.py
Comment thread tastytrade/streamer.py
@Graeme22
Copy link
Copy Markdown
Member

Graeme22 commented Oct 4, 2025

Hmm that's interesting, maybe try the streamer with dxfeed_tos_compliant=False?

@DGChahin
Copy link
Copy Markdown
Author

DGChahin commented Oct 4, 2025

Tried with dxfeed_tos_compliant=False but it still doesn't work. I'll get in contact with Tasty and see if they can help. Otherwise it's impossible to get historical data for smaller time aggregations.

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

Successfully merging this pull request may close these issues.

2 participants