Closed sdmiami closed 3 years ago
I've dug into this as well. Seems like it's a thing with TD Ameritrade. They do not offer historical futures data through the api. See this thread below. https://www.reddit.com/r/algotrading/comments/be113n/td_ameritrade_api_emini_symbol/
I've also scoured the web myself looking for this info. Best I can do is scrape and store yourself from the streaming dataset.
You should be able to get chart history for futures try doing this
TDStreamingClient.chart_history_futures(symbol=['/ES'],frequency='d1',end_time=end,start_time=start)
also make an edit to the func to make sure the symbol can accept list. this is becasue there is a bug further down where it only accepts position 0 so it will submit "/" instead of the whole string /ES
def chart_history_futures(self, symbol: [str], frequency: str, start_time: str = None, end_time: str = None, period: str = None) -> None:
you can optionally remove the need of it being a list but this bug should be fixed
@wouldayajustlookatit Though you get the data from Streaming, their API does not allow to place order for Futures /ES? am i wrong or is there a way to place orders for /ES through their API ?
That’s correct, only options and equities are supported through the API.
On Wed, Jul 8 2020 at 10:28 PM, TheMindfulTrader < notifications@github.com > wrote:
@wouldayajustlookatit ( https://github.com/wouldayajustlookatit ) Though you get the data from Streaming, their API does not allow to place order for Futures /ES? am i wrong or is there a way to place orders for /ES through their API ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub ( https://github.com/alexgolec/tda-api/issues/42#issuecomment-655858633 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AGSYSEO3JOCIKBASRLKJ3YDR2UTLTANCNFSM4OJMFI6Q ).
thanks Alex! if you remember i was following up with TDA team and sent you their email response few months back as well :-) i got greedy incase if they started to support /ES !! thanks Alex!
@wouldayajustlookatit Though you get the data from Streaming, their API does not allow to place order for Futures /ES? am i wrong or is there a way to place orders for /ES through their API ?
not that am aware of but I have yet to try to make that kind of request
@alexgolec Keep in mind that we might need to find work around large size data too.
f"Uncompressed payload length exceeds size limit (? > {max_size} bytes)" websockets.exceptions.PayloadTooBig: Uncompressed payload length exceeds size limit (? > 1048576 bytes)
Is your feature request related to a problem? Please describe. No
Describe the solution you'd like Same like other method via streamer, Only Futures chart history is available via Streamer Server.
Additional context Link to official API page --> https://developer.tdameritrade.com/content/streaming-data#_Toc504640594