boyan-soubachov / tastyworks_api

An unofficial, reverse-engineered Python API for tastyworks.
Apache License 2.0
209 stars 79 forks source link

Is there a way to specify a time range for get_history? #45

Closed arn314 closed 4 years ago

arn314 commented 4 years ago

First of all, thank you for building this reverse engineered unofficial API for tastyworks! Much appreciated!

I was trying to use TradingAccount.get_history and it seems it returns transactions for about a month's worth of history. I was wondering if there's a way to specify a time range when querying the main Tastyworks API?

boyan-soubachov commented 4 years ago

I haven't had the time or chance to develop this for a while now so I'm not aware unfortunately :)

There might or might be an endpoint served by tastyworks to do that but I would have to investigate. It's a fair assumption though that if none of their clients support it, then the endpoint won't be there.

arn314 commented 4 years ago

I see. The clients do have a way to specify a time window. What tools do you use to investigate the endpoints?

boyan-soubachov commented 4 years ago

Hmm, then there should be an endpoint and it should be possible. There are several ways to do this but you basically have to peek into the traffic between the client (phone, desktop or website) and the server. There are multiple tools out there to do this :)

arn314 commented 4 years ago

Thanks! I'll look into it when I get some time.

mattypiper commented 3 years ago

extended history available in this PR (does not have a date range, just extends the range and demonstrates how to adjust the dates)

https://github.com/boyan-soubachov/tastyworks_api/pull/56