TD Ameritrade Holding · Capability

TD Ameritrade Accounts and Trading API — Accounts

TD Ameritrade Accounts and Trading API — Accounts. 2 operations. Lead operation: Get All Accounts. Self-contained Naftiko capability covering one Td Ameritrade Holding business surface.

Run with Naftiko Td Ameritrade HoldingAccounts

What You Can Do

GET
Getaccounts — Get All Accounts
/v1/accounts
GET
Getaccount — Get Account
/v1/accounts/{accountid}

MCP Tools

get-all-accounts

Get All Accounts

read-only idempotent
get-account

Get Account

read-only idempotent

Capability Spec

td-ameritrade-accounts-trading-accounts.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: TD Ameritrade Accounts and Trading API — Accounts
  description: 'TD Ameritrade Accounts and Trading API — Accounts. 2 operations. Lead operation: Get All Accounts. Self-contained
    Naftiko capability covering one Td Ameritrade Holding business surface.'
  tags:
  - Td Ameritrade Holding
  - Accounts
  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-accounts
    baseUri: https://api.tdameritrade.com/v1
    description: TD Ameritrade Accounts and Trading API — Accounts business capability. Self-contained, no shared references.
    resources:
    - name: accounts
      path: /accounts
      operations:
      - name: getaccounts
        method: GET
        description: Get All Accounts
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: string
          description: Comma-separated list of optional fields to include (positions, orders)
    - name: accounts-accountId
      path: /accounts/{accountId}
      operations:
      - name: getaccount
        method: GET
        description: Get Account
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields
          in: query
          type: string
          description: Comma-separated list of optional fields to include (positions, orders)
    authentication:
      type: bearer
      token: '{{env.TD_AMERITRADE_HOLDING_API_KEY}}'
  exposes:
  - type: rest
    namespace: td-ameritrade-accounts-trading-accounts-rest
    port: 8080
    description: REST adapter for TD Ameritrade Accounts and Trading API — Accounts. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/accounts
      name: accounts
      description: REST surface for accounts.
      operations:
      - method: GET
        name: getaccounts
        description: Get All Accounts
        call: td-ameritrade-accounts-trading-accounts.getaccounts
        with:
          fields: rest.fields
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{accountid}
      name: accounts-accountid
      description: REST surface for accounts-accountId.
      operations:
      - method: GET
        name: getaccount
        description: Get Account
        call: td-ameritrade-accounts-trading-accounts.getaccount
        with:
          fields: rest.fields
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: td-ameritrade-accounts-trading-accounts-mcp
    port: 9090
    transport: http
    description: MCP adapter for TD Ameritrade Accounts and Trading API — Accounts. One tool per consumed operation, routed
      inline through this capability's consumes block.
    tools:
    - name: get-all-accounts
      description: Get All Accounts
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-accounts.getaccounts
      with:
        fields: tools.fields
      outputParameters:
      - type: object
        mapping: $.
    - name: get-account
      description: Get Account
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: td-ameritrade-accounts-trading-accounts.getaccount
      with:
        fields: tools.fields
      outputParameters:
      - type: object
        mapping: $.