TD Ameritrade Price History API

The Price History API from TD Ameritrade — 1 operation(s) for price history.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/td-ameritrade-price-history-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

td-ameritrade-price-history-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: TD Ameritrade API
  version: 3.0.1
  title: TD Ameritrade Accounts and Trading Price History API
  termsOfService: https://developer.tdameritrade.com/legal
  contact:
    email: austin.millan@protonmail.com
servers:
- url: https://api.tdameritrade.com/v2
- url: http://api.tdameritrade.com/v2
tags:
- name: Price History
paths:
  /marketdata/{symbol}/pricehistory:
    get:
      tags:
      - Price History
      summary: Historical price data for charts
      description: Get price history for a symbol
      operationId: getPriceHistory
      parameters:
      - name: apikey
        in: query
        description: API Key
        required: true
        schema:
          type: string
      - name: symbol
        in: path
        description: Enter one symbol
        required: true
        schema:
          type: string
      - name: periodType
        in: query
        description: The type of period to show. Valid values are day, month, year, or ytd (year to date). Default is day.
        required: true
        schema:
          type: string
          example: '''day'' or ''month'' or ''year'' or ''ytd'''
      - name: period
        in: query
        description: 'The number of periods to show.


          Example: For a 2 day / 1 min chart, the values would be:

          period: 2

          periodType: day

          frequency: 1

          frequencyType: min

          Valid periods by periodType (defaults marked with an asterisk):

          day: 1, 2, 3, 4, 5, 10*

          month: 1*, 2, 3, 6

          year: 1*, 2, 3, 5, 10, 15, 20

          ytd: 1*'
        required: true
        schema:
          type: integer
      - name: frequencyType
        in: query
        description: 'The type of frequency with which a new candle is formed.


          Valid frequencyTypes by periodType (defaults marked with an asterisk):


          day: minute*

          month: daily, weekly*

          year: daily, weekly, monthly*

          ytd: daily, weekly*

          '
        required: true
        schema:
          type: string
      - name: frequency
        in: query
        description: 'The number of the frequencyType to be included in each candle.


          Valid frequencies by frequencyType (defaults marked with an asterisk):


          minute: 1*, 5, 10, 15, 30

          daily: 1*

          weekly: 1*

          monthly: 1*

          '
        required: true
        schema:
          type: integer
      - name: endDate
        in: query
        description: End date as milliseconds since epoch. If startDate and endDate are provided, period should not be provided. Default is previous trading day.
        required: true
        schema:
          type: string
      - name: startDate
        in: query
        description: Start date as milliseconds since epoch. If startDate and endDate are provided, period should not be provided.
        required: true
        schema:
          type: string
      - name: needExtendedHoursData
        in: query
        description: true to return extended hours data, false for regular market hours only. Default is true
        required: true
        schema:
          type: boolean
          example: x
      - name: x
        in: query
        description: x
        required: true
        schema:
          type: string
          example: x
      responses:
        '200':
          description: Instruments List
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CandleList'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '500':
          description: Not Found
      security:
      - Bearer: []
components:
  schemas:
    CandleList:
      properties:
        candles:
          items:
            properties:
              close:
                example: 0
                type: number
              datetime:
                example: 0
                type: number
              high:
                example: 0
                type: number
              low:
                example: 0
                type: number
              open:
                example: 0
                type: number
              volume:
                example: 0
                type: number
            type: object
          type: array
        empty:
          type: boolean
        symbol:
          example: string
          type: string
      type: object
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header
externalDocs:
  description: Find out more about Swagger
  url: http://swagger.io