Thank you for these videos I am trying to make my own tdameritrade program in python(novice) and got started with your first three videos. Now I see you have made a lot more and your project on github looks great. I really appreciate the effort you have put in and it has taught me a lot already.
@SigmaCoding4 жыл бұрын
Definitely has been a work in progress, I just released a new update yesterday for a data pipeline process. That way you can use the streaming API and grab data as it's sent back.
@siddzz4 жыл бұрын
@@SigmaCoding can you provide some info on data pipeline.. how can we grab the data as it is sent back
@mateostyle2 жыл бұрын
Sigma, many thanks for this tutorial. Incredible help for me to delve into a multi year desire to link python to trading! Will def visit your Patreon link.
@charleslupton20234 жыл бұрын
I've been working with your code for a while now. First, thank you. Second, to take one less step out of the initial login process, you could instead use "import webbrowser" and call "webbrowser.open_new(self.state['authorization_url'])" then they only have to login and paste the callback URL(only saves a few seconds, but trying to automate process for my final application).
@jeffreydiehl87633 жыл бұрын
Any direction on how to wind down the streaming listeners cleanly?
@jonathanorrego61994 жыл бұрын
Hi! About the NEWS_HEADLINE... i asked TDA to turn on the streamingnews flag. I suscribed to about 450 stocks, but no news are comming, in trade ideas they appear, and in TOS they appear too, but i dont receive a message using your sample (the other things work fine). Does it works for you? The only message i get is the first one with a lot of news all together but not for upcomming news. I only see the heartbeats messages. Thanks a lot for your great work!.
@christiankreske31304 жыл бұрын
Hey Sigma, your videos are exactly what I need. Keep it up, man. Question, when attempting to use the stream client. I get one successful connection response and two heartbeat timestamps. Then i get a notify dictionary that has as 'msg' : 'Stop streaming due to empty subscription'. I can't seem to figure out why this is happening. Any assistance would be greatly appreciated.
@GuitarLover484 жыл бұрын
I'm having the exact same issue.. stuck there.. If you get a solution please let us know.. TY
@michaelpeck49094 жыл бұрын
I'm having the same issue as well. It seems as though there's an issue with instantiating services, but I'm having trouble figuring out where in the process things are going wrong. I can't thank you enough for putting this together!
@christiankreske31304 жыл бұрын
He just updated his code on his GitHub (github.com/areed1192/td-ameritrade-python-api). If you download the zip directly from there that should have the fix. He mentions the fix here (github.com/areed1192/td-ameritrade-python-api/issues/76)
@michaelpeck49094 жыл бұрын
@@christiankreske3130 Good loooks
@gabeflagg53304 жыл бұрын
Thanks for doing these videos Sigma. I was just getting ready to start trying to connect to Ameritrade data when I see that you are all over this with Python. I'm using Python. I'm having trouble connecting to the local host token API to create an app. Can you do a short video to explain that to people that are new to this stuff? I did get Python to connect to a database and convert to Pandas data frame which is just the start of my playground here but I'm having trouble getting connected to the streaming data. Thanks!
@peterprivon3 жыл бұрын
I'm running into an issue after the td_stream_client.stream() command is executed where I receive this message in the console: "AttributeError: module 'websockets' has no attribute 'client'". I tried doing a "pip uninstall websocket" and "pip uninstall websocket-client" and then re-installing the websocket-client "pip install web socket" and am still receiving the AttributeError message. For reference I installed websocket-client version 0.59.0. Has anyone else run into this same issue?
@peterprivon3 жыл бұрын
FYI I found a workaround - in the stream.py file in the td-ameritrade-python-api library underneath "import websockets" I added the line "from websockets import client" and was able to proceed with running a stream.
@masiddique7864 жыл бұрын
Great work! what is the pip command to install the python class?
@SigmaCoding4 жыл бұрын
pip install td-ameritrade-python-api
@lightless3 жыл бұрын
can you explain what is meant by credentials path and whats inside of it because there is no documentation on what to put in there, thanks :D
@futurestrad3r3074 жыл бұрын
Great video, Sigma. I sporadically have issues where I'm attempting to stream data, but it seems the request to subscribe is being sent (or received) before the request to login. Have you experienced this error?
@SigmaCoding4 жыл бұрын
I personally have not experienced that error, and it seems to be a limited number of people who do. Right now, it looks like what might be causing that issue is that there isn't a long enough pause between the login event and subscription event. I'm in discussions with some individuals who are proposing a workaround, and once we land on a solution, I'll be integrating it into the library. Additionally, I did make some relatively large modifications to the streaming client over the weekend. If you haven't already, please update the package to version 0.2.5. There might be a few changes to the regular TDClient, regarding the initialization process but that it's. Hopefully, regarding the regular TD Client, any changes going forward won't impact how you write the code but only enhance the existing functionality or add new functionality. For the streaming client, you can now build a data pipeline where you grab data as it flows in and handle it in your own function. That was a highly requested enhancement, so I wanted to get a working version out there.
@skimdt14 жыл бұрын
I recall in one of your videos, that I needed to disable Advanced Features to get all api functionality to work properly. Is that under "My Profile" section of tdameritrade website?
@SigmaCoding4 жыл бұрын
Yes it is, I show how to navigate to it in the TD Orders Part 1 video if you want to see how to get there.
@lawrencetruong20824 жыл бұрын
Does anyone know if TD Ameritrade API support Futures by now? It seems their online documentation shows you can call data streaming but nothing on order entry.
@SigmaCoding4 жыл бұрын
Nope, futures are still not able to be traded using the API.
@ubaobasi8766 Жыл бұрын
Hello thanks for the video and hope with options time sales data? Has anyone been able to figure it out?
@ibwibowo4 жыл бұрын
Thank you for putting together the API and video instruction. This is really helpful. When I tried to stream data (coded exactly as you showed here) I did not get any data back. I was successfully login and receive the response from ADMIN service with code = 0 (successful login) but then there is no data received. The next thing I got is the "heartbeat" notification twice and then the third one is {'notify': [{'service': 'ADMIN', 'timestamp': 1594235394495, 'content': {'code': 30, 'msg': 'Stop streaming due to empty subscription'}}]}.Have you seen/heard about this issue?
@mdada114 жыл бұрын
I am having an issue where I am able to stream the data, but the file it is supposed to write to is empty. Do you know of anything that could be causing this? Thanks for all the help!
@mdada114 жыл бұрын
Actually the issue is that the data is only written to the file once the streaming loop closes!
@SigmaCoding4 жыл бұрын
The writing behavior has gone through numerous improvements, so it's changed a lot since this video was made. Are you using the latest version of the library?
@mdada114 жыл бұрын
@@SigmaCoding Yes I am! Is there something new that I need to do to enable writing during streaming? Thanks again!
@robertocannella18813 жыл бұрын
Any luck with TIMESALE_OPTIONS? I'm not having any luck receiving data after successful subscription...Thanks for posting the videos.
@ubaobasi8766 Жыл бұрын
Where you able to figure it out? I need help too
@robertocannella1881 Жыл бұрын
@@ubaobasi8766 they don’t provide that data anymore. They turned that feature off. Not sure why.
@ubaobasi8766 Жыл бұрын
@@robertocannella1881 Thanks for responding, the api's i saw you have to pay a 1000 monthly subscription thats crazy
@ubaobasi8766 Жыл бұрын
@@robertocannella1881 Did you find any alternatives?