How to Use the TD Ameritrade Python API Library | Placing Orders Pt.1

  Рет қаралды 6,203

Sigma Coding

Sigma Coding

Күн бұрын

Пікірлер: 30
@Mike-cp1tj
@Mike-cp1tj 4 жыл бұрын
Thank you Sir, I'm still early in my Algo trading/Python journey, glad I discovered your work.
@FabledNarrative
@FabledNarrative 4 жыл бұрын
I JUST completed your API videos and was ready to try to place orders. THANK YOU for making these tutorials, Sigma Coding! :D
@daveahlman1
@daveahlman1 3 жыл бұрын
I am super impressed at your videos. Thank you so much for making these - they're exactly what I need! 👍👍
@SigmaCoding
@SigmaCoding 3 жыл бұрын
Glad you like them!
@mateostyle
@mateostyle 2 жыл бұрын
Really appreciate the videos. Super useful!! Keep at it!!
@AlexAlex-kt9ux
@AlexAlex-kt9ux 3 жыл бұрын
Awesome tutorial, thanks a lot!. Working like a charm so far.
@SigmaCoding
@SigmaCoding 3 жыл бұрын
Great to hear!
@erniea5843
@erniea5843 4 жыл бұрын
Awesome series man, keep up the good work
@JermelLadd
@JermelLadd 3 жыл бұрын
Wow!!!! The order id is in the header!!! Before knowing this information I've been forced to query all orders on the day which often times takes more than 1s to download the response. THANK YOU.
@directsalesresources4788
@directsalesresources4788 4 жыл бұрын
Running into error message when attempting to place an order: td.exceptions.ForbidError: { "error" : "You don't have permission to access this resource." Streaming data from my account and getting position information is working, so I don't know what could be causing orders not to go through
@deniskoksal-rivet5816
@deniskoksal-rivet5816 3 жыл бұрын
Also having the same issue! Would love to know if anyone has solved this problem
@noe-subdireccioninnovacion3551
@noe-subdireccioninnovacion3551 3 жыл бұрын
Did you find the solution for this problem?
@agusfontana8502
@agusfontana8502 2 жыл бұрын
Hi, i have the same issue did you solve it ?
@pavlomatsko8587
@pavlomatsko8587 4 жыл бұрын
This is super dopeeeee
@devarshshah3196
@devarshshah3196 3 жыл бұрын
Can I use a script for multiple users, where I keep changing the access token and refresh token for the users in the td_state.json file and place orders one by one for all the users?
@h.h.1266
@h.h.1266 4 жыл бұрын
Thank you for posting this - keep up the good work! Quick question - I couldn't tell if you were testing the orders in a live account or paper money account. How do I test everything out in a paper-money account? Secondly, have you compared the order execution speeds between the API and placing the orders directly through TDA website (or thinkorswim)? Is one faster than the other? Thank you!
@SigmaCoding
@SigmaCoding 4 жыл бұрын
Unfortunately, TD Ameritrade does not offer paper trading through their web API. Everything I was testing was a live account, so when I test it I always do a very small order with a very cheap stock. I haven't compared execution speed between the Website and ThinkOrSwim, so I can't say for sure that they are the same. However, from my experience, I don't see a difference.
@livefire5623
@livefire5623 2 жыл бұрын
Is there a way to use the Simulated Trading and not Live Trading Account?
@MelinasMagicWorld
@MelinasMagicWorld 4 жыл бұрын
Hi, I am doing this with nodejs and I wonder how you get a response object after sending the create order post request. When I do this with their official API endpoints, I only get a status code but no details. I would prefer getting back the orderID and stuff on the response.
@SigmaCoding
@SigmaCoding 4 жыл бұрын
It's because the order ID is in the response headers. They don't document it anywhere, but if you look in the headers it will be there.
@MelinasMagicWorld
@MelinasMagicWorld 4 жыл бұрын
@@SigmaCoding thank you mate. I just checked but I dont have the location header field in the response. When I use their official api on their website with oauth login for the examples, even there response has no location header with the id. Did they change that maybe?
@Benice1969
@Benice1969 3 жыл бұрын
Thanks a lot, Alex! TD API is very clean and powerful. I didn't know that order id comes back in the header. Thank you for that too! I can't find 'orders_types.py' which you cover in this video. Could you please tell me where is this file on GitHub?
@chatterjeesidd
@chatterjeesidd 4 жыл бұрын
Hi, I am getting a peculiar time out error when there is a gap of more than 2 mins between two orders I place. I am getting the following error. RESPONSE STATUS CODE: 401 RESPONSE TEXT: { "error":"The access token being passed has expired or is invalid." } Interestingly, after this failed exchange things get back to normal for the following order and it goes through, and after that the same error follow. This is how I am placing the orders self.limit_order_response = TDSession.place_order(account=self.user_principal_data['primaryAccountId'], order=self.temp_limit_order) Do you have any suggestion on how I can keep the access token active. NOTE: I am having no issues with streaming, and the data packets keep on coming in, I face the issue only when placing order.
@sebtaciak
@sebtaciak 4 жыл бұрын
i am getting an error that .modify_order is not and attribute of the td_client object. indeed dir(td_client) indicates lack of such method. i am working with module version 0.2.3. will you add it?
@SigmaCoding
@SigmaCoding 4 жыл бұрын
It should be in there, did you update the library?
@QUANTCHARLIEWANG
@QUANTCHARLIEWANG 4 жыл бұрын
DEAR,I met the same problem as someone others. THE ERROR AS FOLLOWS,HOW CAN I SOLVE IT? THANK YOU " File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/td/client.py", line 606, in _make_request raise TknExpError(message=response.text) td.exceptions.TknExpError: {"error":"Not Authorized."}"
@SigmaCoding
@SigmaCoding 4 жыл бұрын
Looks like the token you are using is expired. You might need to delete your credentials file and go through the oAuth process again.
@jflow5601
@jflow5601 3 жыл бұрын
Thanks for the information on the order id! TDA API documentation sucks. I was saying to myself, how the hell do you know which order to refer to when confirming referencing it to cancel etc...
@Thedirasa
@Thedirasa 4 жыл бұрын
Is that python library safe to install?
@aditya234567
@aditya234567 4 жыл бұрын
lololololol
How to Use the TD Ameritrade Python API Library | Placing Orders Pt.2
37:04
How to Use the TD Ameritrade Python API Library | Streaming API
40:49
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 46 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 16 МЛН
Senior Developers vs. Junior Developers, What's The Difference?
14:21
Continuous Delivery
Рет қаралды 18 М.
How to Use the TD Ameritrade API | Part 1
30:03
Sigma Coding
Рет қаралды 111 М.
TD Ameritrade ThinkorSwim Auto Trading Bot Part 1
28:10
Jacob Amaral
Рет қаралды 61 М.
How to Use the TD Ameritrade Python API Library | Pt. 1
36:48
Sigma Coding
Рет қаралды 28 М.
How to Use FastAPI: A Detailed Python Tutorial
20:38
ArjanCodes
Рет қаралды 265 М.
TD Ameritrade API Python Library: Streaming Pt. 1
29:04
Sigma Coding
Рет қаралды 5 М.
How to use the Obsidian Dataview plugin
16:11
Nicole van der Hoeven
Рет қаралды 221 М.
How browsers REALLY load Web pages -  Robin Marx
48:52
We Love Speed
Рет қаралды 26 М.
How to Use the TD Ameritrade Python API Library | Pt. 2
37:30
Sigma Coding
Рет қаралды 8 М.
We may have killed p10k, so I found the perfect replacement.
19:48
Dreams of Autonomy
Рет қаралды 187 М.