Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 1.74 KB

Ameritrade.md

File metadata and controls

40 lines (29 loc) · 1.74 KB

Ameritrade Traders

Caveats

Firstly, Ameritrade ONLY has live mode trading, despite ThinkOrSwim supporting paper trading.

Accounts must have the Margin Trading feature enabled to short.

IRAs and Securities-Backed Collateral accounts cannot have margin and so shorting must be disabled to trade against those.

You may only have one application ID per account and that means trading all your accounts in Ameritrade (if you have multiple) is not currently supported.

Configuration

  1. Run the copy-trader

  2. Take note of your TD Ameritrade Account ID. It's a number.

  3. Read https://developer.tdameritrade.com/content/authentication-faq and https://developer.tdameritrade.com/content/simple-auth-local-apps

  4. Register a Developer account at https://developer.tdameritrade.com

    Your developer account IS NOT THE SAME as your tdameritrade.com or thinkorswim.com account.

  5. Create an Application, specifying the redirect URL as http://localhost:51585/ACCOUNT_ID/authorize where ACCOUNT_ID is your TD Ameritrade Account ID from step 1.

  6. Successfully creating an application will give you the Application ID.

  7. Navigate your web browser to https://auth.tdameritrade.com/auth?response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A51585%2Fauthorize%2FACCOUNT_ID&client_id=APPLICATION_ID%40AMER.OAUTHAP where ACCOUNT_ID is your TD Ameritrade Account ID from step 1 and APPLICATION_ID is your Application ID from the previous step.

  8. After logging in and authorizing the app, it should redirect you back to your copy-trader instance, but the URL may have https instead of http at the beginning. If so, delete the s and load the URL and it should authenticate correctly and send you to a page saying so.