areed1192 / python-trading-robot

A trading robot, that can submit basic orders in an automated fashion using the TD API.
MIT License
535 stars 312 forks source link

Unable to post to live account #8

Open samighi opened 4 years ago

samighi commented 4 years ago

I must not read instructions well. How does this post to my real account.

I got robot get_account to work. Still not sure how to place trades for real.

centi1 commented 4 years ago

Hi, While initializing the robot in run_robot.py, you have to pass in an argument paper_trading = False. This will help you to submit the orders & get it executed in real account. Otherwise, it will be stored in your saved orders but it will not get executed in your account. By the way, TDAmeritrade doesnt have a paper trading account. It is being done in your real account. But if you didnt pass in that argument paper_trading, it will be taken as True by default.

samighi commented 3 years ago

If you don't mind providing an example of code to buy 1 share of apple?

I had tried turning paper_trading = False before and nothing posts to my account. Using the token, I can post using CURL to my account. but not thru the code.