How to create a TD Ameritrade API key for automated trading

TD Ameritrade Developer register

If you’re planning on developing an app to automate your favorite trading strategies, or you’ve gotten your hands on a copy of Trade For Me and you’re just getting started, you will need to create a TD Ameritrade Developer account and register an application to get an API key (consumer key). In this article you will learn step-by-step how to complete your account set up.

Step One: Register

TD Ameritrade Developer register

In your browser, navigate to developer.tdameritrade.com and click the “Register” link at the top of the page. When prompted to choose a username, ignore the rules provided (special characters, spaces, etc.). They are inconsistent. The best choice for your username will be letters only with no spaces or special characters.

Step Two: Activate your account

TD Ameritrade Developer email

After completing the registration form, you will receive an email with a link to activate your account.

Step Three: Create a profile

TD Ameritrade Developer profile page

Fill in your profile details. In this step you will create a password, add your first and last name, add your address, choose a timezone, and accept the terms and conditions.

Step Four: Add an app

TD Ameritrade Developer add app screen

Click “Add a new App”

TD Ameritrade Developer App Details Screen
  • Give your app a name
  • Enter a callback URL. The callback URL will be the URL to which you are redirected after successful authentication. If you are using Trade For Me, this is the app URL on your local network, and after authentication, you’ll be redirected to the app and the access and refresh tokens will be saved in your local database.
  • Describe the purpose of your app
  • Enter an order limit

Step Five: Copy your API Key

TD Ameritrade Developer API Key

After creating the app, you will be able to open it and retrieve your API Key (Consumer Key).

Congratulations! You have completed your app configuration in the TD Ameritrade Developer website. Now it’s on to the next step. Making money!