TD Ameritrade Holding · Capability

TD Ameritrade Accounts and Trading API — Market Data

TD Ameritrade Accounts and Trading API — Market Data. 6 operations. Lead operation: Get Hours For Multiple Markets. Self-contained Naftiko capability covering one Td Ameritrade Holding business surface.

Run with Naftiko Td Ameritrade HoldingMarket Data

What You Can Do

GET
Gethoursformultiplemarkets — Get Hours For Multiple Markets
/v1/marketdata/hours
GET
Getquotes — Get Quotes
/v1/marketdata/quotes
GET
Getmovers — Get Market Movers
/v1/marketdata/{index}/movers
GET
Gethoursforsinglemarket — Get Hours For Single Market
/v1/marketdata/{market}/hours
GET
Getpricehistory — Get Price History
/v1/marketdata/{symbol}/pricehistory
GET
Getquote — Get Quote
/v1/marketdata/{symbol}/quotes

MCP Tools

get-hours-multiple-markets

Get Hours For Multiple Markets

read-only idempotent
get-quotes

Get Quotes

read-only idempotent
get-market-movers

Get Market Movers

read-only idempotent
get-hours-single-market

Get Hours For Single Market

read-only idempotent
get-price-history

Get Price History

read-only idempotent
get-quote

Get Quote

read-only idempotent

Capability Spec

td-ameritrade-accounts-trading-market-data.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TD Ameritrade Accounts and Trading API — Market Data
  description: 'TD Ameritrade Accounts and Trading API — Market Data. 6 operations. Lead operation: Get Hours For Multiple
    Markets. Self-contained Naftiko capability covering one Td Ameritrade Holding business surface.'
  tags:
  - Td Ameritrade Holding
  - Market Data
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    TD_AMERITRADE_HOLDING_API_KEY: TD_AMERITRADE_HOLDING_API_KEY
capability:
  consumes:
  - type: http
    namespace: td-ameritrade-accounts-trading-market-data
    baseUri: https://api.tdameritrade.com/v1
    description: TD Ameritrade Accounts and Trading API — Market Data business capability. Self-contained, no shared references.
    resources:
    - name: marketdata-hours
      path: /marketdata/hours
      operations:
      - name: gethoursformultiplemarkets
        method: GET
        description: Get Hours For Multiple Markets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: markets
          in: query
          type: string
          description: Comma-separated list of markets (EQUITY, OPTION, FUTURE, BOND, FOREX)
          required: true
        - name: date
          in: query
          type: string
          description: Date for which to retrieve market hours (yyyy-MM-dd)
    - name: marketdata-quotes
      path: /marketdata/quotes
      operations:
      - name: getquotes
        method: GET
        description: Get Quotes
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: symbol
          in: query
          type: string
          description: Comma-separated list of symbols
          required: true
    - name: marketdata-index-movers
      path: /marketdata/{index}/movers
      operations:
      - name: getmovers
        method: GET
        description: Get Market Movers
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: index
          in: path
          type: string
          description: Market index symbol
          required: true
        - name: direction
          in: query
          type: string
          description: Direction of movement to filter
        - name: change
          in: query
          type: string
          description: Type of change to measure
    - name: marketdata-market-hours
      path: /marketdata/{market}/hours
      operations:
      - name: gethoursforsinglemarket
        method: GET
        description: Get Hours For Single Market
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: market
          in: path
          type: string
          description: Market identifier
          required: true
        - name: date
          in: query
          type: string
          description: Date for which to retrieve market hours (yyyy-MM-dd)
    - name: marketdata-symbol-pricehistory
      path: /marketdata/{symbol}/pricehistory
      operations:
      - name: getpricehistory
        method: GET
        description: Get Price History
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: symbol
          in: path
          type: string
          description: Security symbol
          required: true
        - name: periodType
          in: query
          type: string
          description: Type of period to show (day, month, year, ytd)
        - name: period
          in: query
          type: integer
          description: Number of periods to show
        - name: frequencyType
          in: query
          type: string
          description: Type of frequency (minute, daily, weekly, monthly)
        - name: frequency
          in: query
          type: integer
          description: Frequency of data points
        - name: startDate
          in: query
          type: integer
          description: Start date in milliseconds since epoch
        - name: endDate
          in: query
          type: integer
          description: End date in milliseconds since epoch
    - name: marketdata-symbol-quotes
      path: /marketdata/{symbol}/quotes
      operations:
      - name: getquote
        method: GET
        description: Get Quote
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: symbol
          in: path
          type: string
          description: Security symbol (e.g., AAPL, SPY)
          required: true
    authentication:
      type: bearer
      token: '{{env.TD_AMERITRADE_HOLDING_API_KEY}}'
  exposes:
  - type: rest
    namespace: td-ameritrade-accounts-trading-market-data-rest
    port: 8080
    description: REST adapter for TD Ameritrade Accounts and Trading API — Market Data. One Spectral-compliant resource per
      consumed operation, prefixed with /v1.
    resources:
    - path: /v1/marketdata/hours
      name: marketdata-hours
      description: REST surface for marketdata-hours.
      operations:
      - method: GET
        name: gethoursformultiplemarkets
        description: Get Hours For Multiple Markets
        call: td-ameritrade-accounts-trading-market-data.gethoursformultiplemarkets
        with:
          markets: rest.markets
          date: rest.date
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketdata/quotes
      name: marketdata-quotes
      description: REST surface for marketdata-quotes.
      operations:
      - method: GET
        name: getquotes
        description: Get Quotes
        call: td-ameritrade-accounts-trading-market-data.getquotes
        with:
          symbol: rest.symbol
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketdata/{index}/movers
      name: marketdata-index-movers
      description: REST surface for marketdata-index-movers.
      operations:
      - method: GET
        name: getmovers
        description: Get Market Movers
        call: td-ameritrade-accounts-trading-market-data.getmovers
        with:
          index: rest.index
          direction: rest.direction
          change: rest.change
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketdata/{market}/hours
      name: marketdata-market-hours
      description: REST surface for marketdata-market-hours.
      operations:
      - method: GET
        name: gethoursforsinglemarket
        description: Get Hours For Single Market
        call: td-ameritrade-accounts-trading-market-data.gethoursforsinglemarket
        with:
          market: rest.market
          date: rest.date
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketdata/{symbol}/pricehistory
      name: marketdata-symbol-pricehistory
      description: REST surface for marketdata-symbol-pricehistory.
      operations:
      - method: GET
        name: getpricehistory
        description: Get Price History
        call: td-ameritrade-accounts-trading-market-data.getpricehistory
        with:
          symbol: rest.symbol
          periodType: rest.periodType
          period: rest.period
          frequencyType: rest.frequencyType
          frequency: rest.frequency
          startDate: rest.startDate
          endDate: rest.endDate
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/marketdata/{symbol}/quotes
      name: marketdata-symbol-quotes
      description: REST surface for marketdata-symbol-quotes.
      operations:
      - method: GET
        name: getquote
        description: Get Quote
        call: td-ameritrade-accounts-trading-market-data.getquote
        with:
          symbol: rest.symbol
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: td-ameritrade-accounts-trading-market-data-mcp
    port: 9090
    transport: http
    description: MCP adapter for TD Ameritrade Accounts and Trading API — Market Data. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: get-hours-multiple-markets
      description: Get Hours For Multiple Markets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.gethoursformultiplemarkets
      with:
        markets: tools.markets
        date: tools.date
      outputParameters:
      - type: object
        mapping: $.
    - name: get-quotes
      description: Get Quotes
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.getquotes
      with:
        symbol: tools.symbol
      outputParameters:
      - type: object
        mapping: $.
    - name: get-market-movers
      description: Get Market Movers
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.getmovers
      with:
        index: tools.index
        direction: tools.direction
        change: tools.change
      outputParameters:
      - type: object
        mapping: $.
    - name: get-hours-single-market
      description: Get Hours For Single Market
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.gethoursforsinglemarket
      with:
        market: tools.market
        date: tools.date
      outputParameters:
      - type: object
        mapping: $.
    - name: get-price-history
      description: Get Price History
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.getpricehistory
      with:
        symbol: tools.symbol
        periodType: tools.periodType
        period: tools.period
        frequencyType: tools.frequencyType
        frequency: tools.frequency
        startDate: tools.startDate
        endDate: tools.endDate
      outputParameters:
      - type: object
        mapping: $.
    - name: get-quote
      description: Get Quote
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-market-data.getquote
      with:
        symbol: tools.symbol
      outputParameters:
      - type: object
        mapping: $.