Search API Connector Documentation
Import TD Ameritrade Data to Sheets
In this guide, we’ll walk through how to pull data from the TD Ameritrade API directly into Google Sheets, using the API Connector add-on for Sheets.
- Before You Begin
- Part 1: Connect to the TD Ameritrade API
- Part 2: Pull Data from TD Ameritrade to Sheets
- Part 3: Create a Custom API Request
- Part 4: Example API Requests
- Part 5: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the TD Ameritrade API
The easiest way to get started with the TD Ameritrade API is through API Connector’s built-in integration.
- Select TD Ameritrade from the drop-down list of applications
- Under Authorization, click Connect to TD Ameritrade
- You will see a modal asking you to approve the connection. Click Allow.
- You’ll then be returned to your Google Sheet, and can verify that your connection is active.
Part 2: Pull Data from TD Ameritrade to Sheets
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose
/accountsto get information about your accounts
- Select a destination sheet, name your request, and click Run.
- Note the accountId as you can plug that into other requests.
Part 3: Create a Custom Request
Alternatively, you can run your own custom requests instead of using API Connector’s pre-built integration, using any of the endpoints and parameters shown in the API documentation. Here's an example request setup.
- Request URL:
Part 4: Example Custom API Requests
- Option chains (set to 'grid' report style)
- User Principals
- User Transactions
Part 5: API Documentation
To see more API endpoints and example responses, check out out the TD Ameritrade docs located at https://developer.tdameritrade.com/apis.
They also provide URL generator forms, you can see an example here: https://developer.tdameritrade.com/option-chains/apis/get/marketdata/chains