TradeStation Accounts API

Retrieve account information including account details, balances, beginning-of-day balances, positions, orders, historical orders, and cryptocurrency wallets.

Operations 7

GET /v3/brokerage/accounts Get accounts #
GET /v3/brokerage/accounts/{accountIds}/balances Get account balances #
GET /v3/brokerage/accounts/{accountIds}/bodbalances Get beginning-of-day balances #
GET /v3/brokerage/accounts/{accountIds}/positions Get account positions #
GET /v3/brokerage/accounts/{accountIds}/orders Get account orders #
GET /v3/brokerage/accounts/{accountIds}/historicalorders Get historical orders #
GET /v3/brokerage/accounts/{accountId}/wallets Get cryptocurrency wallets #

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/tradestation-accounts-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

tradestation-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: TradeStation Accounts API
  description: The TradeStation API is a collection of RESTful brokerage and market data services used to build trading applications for stocks, options, futures, and cryptocurrency.
  version: '3.0'
  contact:
    name: TradeStation API Support
    url: https://api.tradestation.com/docs/
  termsOfService: https://www.tradestation.com/important-information/
servers:
- url: https://api.tradestation.com
  description: Production Server
- url: https://sim-api.tradestation.com
  description: Simulator Server (Paper Trading)
security:
- oauth2AuthCode: []
tags:
- name: Accounts
  description: Retrieve account information including account details, balances, beginning-of-day balances, positions, orders, historical orders, and cryptocurrency wallets.
paths:
  /v3/brokerage/accounts:
    get:
      operationId: getAccounts
      summary: Get accounts
      description: Retrieves all brokerage accounts associated with the authenticated user. Returns account identifiers, account types, and other account metadata needed for subsequent API calls.
      tags:
      - Accounts
      responses:
        '200':
          description: Successfully retrieved accounts
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountsResponse'
        '401':
          description: Unauthorized - invalid or expired access token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountIds}/balances:
    get:
      operationId: getBalances
      summary: Get account balances
      description: Retrieves the current real-time balances for one or more brokerage accounts. Includes cash balance, equity, market value, buying power, and margin-related balance information.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountIds'
      responses:
        '200':
          description: Successfully retrieved balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountIds}/bodbalances:
    get:
      operationId: getBalancesBOD
      summary: Get beginning-of-day balances
      description: Retrieves the beginning-of-day balances for one or more brokerage accounts. These balances reflect account state at the start of the current trading session.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountIds'
      responses:
        '200':
          description: Successfully retrieved beginning-of-day balances
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BalancesResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountIds}/positions:
    get:
      operationId: getPositions
      summary: Get account positions
      description: Retrieves the current positions for one or more brokerage accounts. Returns information about each open position including symbol, quantity, average price, market value, and unrealized profit/loss.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountIds'
      responses:
        '200':
          description: Successfully retrieved positions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountIds}/orders:
    get:
      operationId: getOrders
      summary: Get account orders
      description: Retrieves the current active orders for one or more brokerage accounts. Returns information about each order including status, order type, symbol, quantity, and price.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountIds'
      responses:
        '200':
          description: Successfully retrieved orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountIds}/historicalorders:
    get:
      operationId: getHistoricalOrders
      summary: Get historical orders
      description: Retrieves historical orders for one or more brokerage accounts. Returns past orders including filled, cancelled, and rejected orders up to 90 days in the past.
      tags:
      - Accounts
      parameters:
      - $ref: '#/components/parameters/AccountIds'
      - name: since
        in: query
        description: Filter orders since this date. Format is MM-DD-YYYY.
        required: false
        schema:
          type: string
          pattern: ^\d{2}-\d{2}-\d{4}$
      - name: pageSize
        in: query
        description: Number of orders per page.
        required: false
        schema:
          type: integer
          minimum: 1
      - name: pageNum
        in: query
        description: Page number for pagination.
        required: false
        schema:
          type: integer
          minimum: 1
      responses:
        '200':
          description: Successfully retrieved historical orders
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrdersResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
  /v3/brokerage/accounts/{accountId}/wallets:
    get:
      operationId: getWallets
      summary: Get cryptocurrency wallets
      description: Retrieves cryptocurrency wallet information for a specific brokerage account. Returns wallet balances and cryptocurrency holdings.
      tags:
      - Accounts
      parameters:
      - name: accountId
        in: path
        required: true
        description: The account identifier for wallet retrieval.
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved wallets
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletsResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Account:
      type: object
      description: Represents a brokerage account with its identifiers and metadata.
      properties:
        AccountID:
          type: string
          description: The unique account identifier.
        AccountType:
          type: string
          description: The type of account such as Cash, Margin, Futures, or Crypto.
          enum:
          - Cash
          - Margin
          - Futures
          - DVP
          - Crypto
        Status:
          type: string
          description: The current status of the account.
          enum:
          - Active
          - Closed
        StatusDescription:
          type: string
          description: Human-readable description of the account status.
    WalletsResponse:
      type: object
      description: Response containing cryptocurrency wallet information.
      properties:
        Wallets:
          type: array
          description: List of cryptocurrency wallets.
          items:
            $ref: '#/components/schemas/Wallet'
    Balance:
      type: object
      description: Account balance information including cash, equity, and margin details.
      properties:
        AccountID:
          type: string
          description: The account identifier.
        AccountType:
          type: string
          description: The type of account.
        CashBalance:
          type: number
          format: double
          description: Current cash balance in the account.
        Equity:
          type: number
          format: double
          description: Total equity value of the account.
        MarketValue:
          type: number
          format: double
          description: Total market value of all positions.
        BuyingPower:
          type: number
          format: double
          description: Available buying power for new positions.
        RealizedProfitLoss:
          type: number
          format: double
          description: Total realized profit or loss for the current session.
        UnrealizedProfitLoss:
          type: number
          format: double
          description: Total unrealized profit or loss on open positions.
    Wallet:
      type: object
      description: Represents a cryptocurrency wallet with balance information.
      properties:
        Currency:
          type: string
          description: The cryptocurrency currency code.
        Balance:
          type: number
          format: double
          description: The wallet balance.
        Available:
          type: number
          format: double
          description: The available balance for trading.
    Order:
      type: object
      description: Represents an order with its current status and parameters.
      properties:
        OrderID:
          type: string
          description: The unique order identifier.
        AccountID:
          type: string
          description: The account identifier associated with the order.
        Symbol:
          type: string
          description: The symbol being traded.
        Quantity:
          type: number
          format: double
          description: The order quantity.
        FilledQuantity:
          type: number
          format: double
          description: The quantity that has been filled.
        OrderType:
          type: string
          description: The type of order.
          enum:
          - Market
          - Limit
          - StopMarket
          - StopLimit
          - TrailingStop
          - TrailingStopLimit
        Status:
          type: string
          description: The current status of the order.
          enum:
          - Open
          - Filled
          - PartiallyFilled
          - Cancelled
          - Rejected
          - Expired
          - Queued
          - Received
        Side:
          type: string
          description: The side of the order.
          enum:
          - Buy
          - Sell
          - BuyToOpen
          - BuyToClose
          - SellToOpen
          - SellToClose
          - SellShort
          - BuyToCover
        LimitPrice:
          type: number
          format: double
          description: The limit price for limit and stop-limit orders.
        StopPrice:
          type: number
          format: double
          description: The stop price for stop and stop-limit orders.
        TimeInForce:
          type: string
          description: Time-in-force for the order.
          enum:
          - Day
          - GTC
          - GTD
          - IOC
          - FOK
          - OPG
          - CLO
        Route:
          type: string
          description: The routing destination for the order.
        FilledPrice:
          type: number
          format: double
          description: The average fill price if the order has been filled.
        OpenedDateTime:
          type: string
          format: date-time
          description: The date and time the order was opened.
        ClosedDateTime:
          type: string
          format: date-time
          description: The date and time the order was closed or filled.
    BalancesResponse:
      type: object
      description: Response containing balance information for one or more accounts.
      properties:
        Balances:
          type: array
          description: List of account balances.
          items:
            $ref: '#/components/schemas/Balance'
    AccountsResponse:
      type: object
      description: Response containing a list of brokerage accounts.
      properties:
        Accounts:
          type: array
          description: List of brokerage accounts.
          items:
            $ref: '#/components/schemas/Account'
    Position:
      type: object
      description: Represents an open position in a brokerage account.
      properties:
        AccountID:
          type: string
          description: The account identifier holding this position.
        Symbol:
          type: string
          description: The symbol of the held instrument.
        Quantity:
          type: number
          format: double
          description: The number of shares, contracts, or units held.
        AveragePrice:
          type: number
          format: double
          description: The average entry price per unit.
        Last:
          type: number
          format: double
          description: The last traded price of the instrument.
        MarketValue:
          type: number
          format: double
          description: Current market value of the position.
        UnrealizedProfitLoss:
          type: number
          format: double
          description: Unrealized profit or loss on the position.
        UnrealizedProfitLossPercent:
          type: number
          format: double
          description: Unrealized profit or loss as a percentage.
        AssetType:
          type: string
          description: The asset class of the instrument.
          enum:
          - Stock
          - Option
          - Future
          - Crypto
        LongShort:
          type: string
          description: Whether the position is long or short.
          enum:
          - Long
          - Short
    PositionsResponse:
      type: object
      description: Response containing position information for one or more accounts.
      properties:
        Positions:
          type: array
          description: List of open positions.
          items:
            $ref: '#/components/schemas/Position'
    OrdersResponse:
      type: object
      description: Response containing order information for one or more accounts.
      properties:
        Orders:
          type: array
          description: List of orders.
          items:
            $ref: '#/components/schemas/Order'
    Error:
      type: object
      description: Standard error response returned by the TradeStation API.
      properties:
        StatusCode:
          type: integer
          description: HTTP status code of the error.
        Message:
          type: string
          description: Human-readable description of the error.
        TraceId:
          type: string
          format: uuid
          description: Unique trace identifier for debugging and support purposes.
  parameters:
    AccountIds:
      name: accountIds
      in: path
      required: true
      description: One or more account identifiers, comma-separated. Maximum of 25 accounts per request.
      schema:
        type: string
  securitySchemes:
    oauth2AuthCode:
      type: oauth2
      description: OAuth 2.0 authorization code flow for accessing TradeStation API resources. Requires user authorization and supports token refresh.
      flows:
        authorizationCode:
          authorizationUrl: https://signin.tradestation.com/authorize
          tokenUrl: https://signin.tradestation.com/oauth/token
          scopes:
            marketdata: Access to market data endpoints
            readaccount: Read access to account information
            trade: Access to order placement and management
externalDocs:
  description: TradeStation API Documentation
  url: https://api.tradestation.com/docs/