TradeStation · Capability

TradeStation Trading and Market Data

Unified trading and market data workflow combining account management, order execution, real-time quotes, historical bar data, and options analysis. Used by algorithmic traders and application developers to build complete trading applications covering market data access and order lifecycle management.

Run with Naftiko AccountsBrokerageCryptocurrencyFinanceMarket DataOptionsOrder ExecutionTrading

What You Can Do

GET
Get accounts — Retrieve all brokerage accounts
/v1/accounts
GET
Get balances — Retrieve current account balances
/v1/accounts/{accountIds}/balances
GET
Get positions — Retrieve open positions
/v1/accounts/{accountIds}/positions
GET
Get orders — Retrieve active orders
/v1/accounts/{accountIds}/orders
GET
Get quotes — Retrieve real-time quote snapshots
/v1/quotes/{symbols}
GET
Get bars — Retrieve OHLC bar chart history
/v1/bars/{symbol}
GET
Get symbols — Retrieve symbol information
/v1/symbols/{symbols}
GET
Get option expirations — Retrieve option expiration dates
/v1/options/{underlying}/expirations
GET
Get option strikes — Retrieve option strike prices
/v1/options/{underlying}/strikes
POST
Place order — Place a new order
/v1/orders
PUT
Replace order — Modify an existing order
/v1/orders/{orderId}
DELETE
Cancel order — Cancel an existing order
/v1/orders/{orderId}
POST
Confirm order — Preview order costs before placing
/v1/order-confirm
POST
Place order group — Place a group order
/v1/group-orders
GET
Get crypto pairs — Retrieve cryptocurrency trading pairs
/v1/crypto-pairs

MCP Tools

get-accounts

Retrieve TradeStation brokerage accounts and account metadata

read-only
get-balances

Retrieve current cash, equity, buying power, and margin balances for accounts

read-only
get-positions

Retrieve open positions including market value, unrealized P/L, and asset type

read-only
get-orders

Retrieve active orders for one or more TradeStation accounts

read-only
get-historical-orders

Retrieve historical filled, cancelled, and rejected orders

read-only
get-quotes

Retrieve real-time bid, ask, last price, and volume for symbols

read-only
get-bars

Retrieve historical OHLC bar chart data for a symbol

read-only
get-symbols

Retrieve symbol metadata including exchange, category, and contract specifications

read-only
get-option-expirations

Retrieve available option expiration dates for an underlying symbol

read-only
get-option-strikes

Retrieve available strike prices for options on an underlying symbol

read-only
calculate-option-risk-reward

Calculate the risk/reward profile for an option strategy

read-only
confirm-order

Preview estimated commissions, costs, and margin requirements before placing an order

read-only
place-order

Place a new stock, option, futures, or crypto order on TradeStation

cancel-order

Cancel an existing open TradeStation order

idempotent
place-order-group

Place a bracket, OCO, or OSO group order on TradeStation

get-crypto-pairs

Retrieve available cryptocurrency trading pairs on TradeStation

read-only
get-wallets

Retrieve cryptocurrency wallet balances for a TradeStation account

read-only

APIs Used

tradestation-api

Capability Spec

Raw ↑
naftiko: "1.0.0-alpha1"

info:
  label: "TradeStation Trading and Market Data"
  description: "Unified trading and market data workflow combining account management, order execution, real-time quotes, historical bar data, and options analysis. Used by algorithmic traders and application developers to build complete trading applications covering market data access and order lifecycle management."
  tags:
    - Accounts
    - Brokerage
    - Cryptocurrency
    - Finance
    - Market Data
    - Options
    - Order Execution
    - Trading
  created: "2026-05-03"
  modified: "2026-05-03"

binds:
  - namespace: env
    keys:
      TRADESTATION_ACCESS_TOKEN: TRADESTATION_ACCESS_TOKEN

capability:
  consumes:
    - import: tradestation-api
      location: ./shared/tradestation-api.yaml

  exposes:
    - type: rest
      port: 8080
      namespace: trading-and-market-data-api
      description: "Unified REST API for TradeStation trading and market data workflows."
      resources:
        - path: /v1/accounts
          name: accounts
          description: "Brokerage account information"
          operations:
            - method: GET
              name: get-accounts
              description: "Retrieve all brokerage accounts"
              call: "tradestation-api.get-accounts"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/accounts/{accountIds}/balances
          name: balances
          description: "Account balance information"
          operations:
            - method: GET
              name: get-balances
              description: "Retrieve current account balances"
              call: "tradestation-api.get-balances"
              with:
                accountIds: "rest.accountIds"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/accounts/{accountIds}/positions
          name: positions
          description: "Account positions"
          operations:
            - method: GET
              name: get-positions
              description: "Retrieve open positions"
              call: "tradestation-api.get-positions"
              with:
                accountIds: "rest.accountIds"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/accounts/{accountIds}/orders
          name: orders
          description: "Active account orders"
          operations:
            - method: GET
              name: get-orders
              description: "Retrieve active orders"
              call: "tradestation-api.get-orders"
              with:
                accountIds: "rest.accountIds"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/quotes/{symbols}
          name: quotes
          description: "Real-time market quotes"
          operations:
            - method: GET
              name: get-quotes
              description: "Retrieve real-time quote snapshots"
              call: "tradestation-api.get-quotes"
              with:
                symbols: "rest.symbols"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/bars/{symbol}
          name: bars
          description: "Historical bar chart data"
          operations:
            - method: GET
              name: get-bars
              description: "Retrieve OHLC bar chart history"
              call: "tradestation-api.get-bars"
              with:
                symbol: "rest.symbol"
                interval: "rest.interval"
                unit: "rest.unit"
                barsBack: "rest.barsBack"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/symbols/{symbols}
          name: symbols
          description: "Symbol details and metadata"
          operations:
            - method: GET
              name: get-symbols
              description: "Retrieve symbol information"
              call: "tradestation-api.get-symbols"
              with:
                symbols: "rest.symbols"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/options/{underlying}/expirations
          name: option-expirations
          description: "Option expiration dates"
          operations:
            - method: GET
              name: get-option-expirations
              description: "Retrieve option expiration dates"
              call: "tradestation-api.get-option-expirations"
              with:
                underlying: "rest.underlying"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/options/{underlying}/strikes
          name: option-strikes
          description: "Option strike prices"
          operations:
            - method: GET
              name: get-option-strikes
              description: "Retrieve option strike prices"
              call: "tradestation-api.get-option-strikes"
              with:
                underlying: "rest.underlying"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/orders
          name: place-orders
          description: "Order placement and management"
          operations:
            - method: POST
              name: place-order
              description: "Place a new order"
              call: "tradestation-api.place-order"
              with:
                account_id: "rest.AccountID"
                symbol: "rest.Symbol"
                quantity: "rest.Quantity"
                order_type: "rest.OrderType"
                trade_action: "rest.TradeAction"
                time_in_force: "rest.TimeInForce"
                limit_price: "rest.LimitPrice"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/orders/{orderId}
          name: order-management
          description: "Manage existing orders"
          operations:
            - method: PUT
              name: replace-order
              description: "Modify an existing order"
              call: "tradestation-api.replace-order"
              with:
                orderId: "rest.orderId"
                quantity: "rest.Quantity"
                limit_price: "rest.LimitPrice"
              outputParameters:
                - type: object
                  mapping: "$."
            - method: DELETE
              name: cancel-order
              description: "Cancel an existing order"
              call: "tradestation-api.cancel-order"
              with:
                orderId: "rest.orderId"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/order-confirm
          name: order-confirm
          description: "Order cost preview"
          operations:
            - method: POST
              name: confirm-order
              description: "Preview order costs before placing"
              call: "tradestation-api.confirm-order"
              with:
                account_id: "rest.AccountID"
                symbol: "rest.Symbol"
                quantity: "rest.Quantity"
                order_type: "rest.OrderType"
                trade_action: "rest.TradeAction"
                time_in_force: "rest.TimeInForce"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/group-orders
          name: group-orders
          description: "Group order placement (bracket, OCO, OSO)"
          operations:
            - method: POST
              name: place-order-group
              description: "Place a group order"
              call: "tradestation-api.place-order-group"
              with:
                group_type: "rest.Type"
                orders: "rest.Orders"
              outputParameters:
                - type: object
                  mapping: "$."
        - path: /v1/crypto-pairs
          name: crypto-pairs
          description: "Cryptocurrency trading pairs"
          operations:
            - method: GET
              name: get-crypto-pairs
              description: "Retrieve cryptocurrency trading pairs"
              call: "tradestation-api.get-crypto-pairs"
              outputParameters:
                - type: object
                  mapping: "$."

    - type: mcp
      port: 9090
      namespace: trading-and-market-data-mcp
      transport: http
      description: "MCP server for AI-assisted TradeStation trading and market data operations."
      tools:
        - name: get-accounts
          description: "Retrieve TradeStation brokerage accounts and account metadata"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-accounts"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-balances
          description: "Retrieve current cash, equity, buying power, and margin balances for accounts"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-balances"
          with:
            accountIds: "tools.account_ids"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-positions
          description: "Retrieve open positions including market value, unrealized P/L, and asset type"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-positions"
          with:
            accountIds: "tools.account_ids"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-orders
          description: "Retrieve active orders for one or more TradeStation accounts"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-orders"
          with:
            accountIds: "tools.account_ids"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-historical-orders
          description: "Retrieve historical filled, cancelled, and rejected orders"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-historical-orders"
          with:
            accountIds: "tools.account_ids"
            since: "tools.since"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-quotes
          description: "Retrieve real-time bid, ask, last price, and volume for symbols"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-quotes"
          with:
            symbols: "tools.symbols"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-bars
          description: "Retrieve historical OHLC bar chart data for a symbol"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-bars"
          with:
            symbol: "tools.symbol"
            interval: "tools.interval"
            unit: "tools.unit"
            barsBack: "tools.bars_back"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-symbols
          description: "Retrieve symbol metadata including exchange, category, and contract specifications"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-symbols"
          with:
            symbols: "tools.symbols"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-option-expirations
          description: "Retrieve available option expiration dates for an underlying symbol"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-option-expirations"
          with:
            underlying: "tools.underlying"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-option-strikes
          description: "Retrieve available strike prices for options on an underlying symbol"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-option-strikes"
          with:
            underlying: "tools.underlying"
          outputParameters:
            - type: object
              mapping: "$."
        - name: calculate-option-risk-reward
          description: "Calculate the risk/reward profile for an option strategy"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.calculate-option-risk-reward"
          with:
            spread_price: "tools.spread_price"
            legs: "tools.legs"
          outputParameters:
            - type: object
              mapping: "$."
        - name: confirm-order
          description: "Preview estimated commissions, costs, and margin requirements before placing an order"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.confirm-order"
          with:
            account_id: "tools.account_id"
            symbol: "tools.symbol"
            quantity: "tools.quantity"
            order_type: "tools.order_type"
            trade_action: "tools.trade_action"
            time_in_force: "tools.time_in_force"
          outputParameters:
            - type: object
              mapping: "$."
        - name: place-order
          description: "Place a new stock, option, futures, or crypto order on TradeStation"
          hints:
            readOnly: false
            destructive: false
            idempotent: false
          call: "tradestation-api.place-order"
          with:
            account_id: "tools.account_id"
            symbol: "tools.symbol"
            quantity: "tools.quantity"
            order_type: "tools.order_type"
            trade_action: "tools.trade_action"
            time_in_force: "tools.time_in_force"
            limit_price: "tools.limit_price"
          outputParameters:
            - type: object
              mapping: "$."
        - name: cancel-order
          description: "Cancel an existing open TradeStation order"
          hints:
            readOnly: false
            destructive: true
            idempotent: true
          call: "tradestation-api.cancel-order"
          with:
            orderId: "tools.order_id"
          outputParameters:
            - type: object
              mapping: "$."
        - name: place-order-group
          description: "Place a bracket, OCO, or OSO group order on TradeStation"
          hints:
            readOnly: false
            destructive: false
            idempotent: false
          call: "tradestation-api.place-order-group"
          with:
            group_type: "tools.group_type"
            orders: "tools.orders"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-crypto-pairs
          description: "Retrieve available cryptocurrency trading pairs on TradeStation"
          hints:
            readOnly: true
            openWorld: true
          call: "tradestation-api.get-crypto-pairs"
          outputParameters:
            - type: object
              mapping: "$."
        - name: get-wallets
          description: "Retrieve cryptocurrency wallet balances for a TradeStation account"
          hints:
            readOnly: true
            openWorld: false
          call: "tradestation-api.get-wallets"
          with:
            accountId: "tools.account_id"
          outputParameters:
            - type: object
              mapping: "$."