openapi: 3.1.0 info: title: TradeStation 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. The API provides endpoints for account management, order placement and execution, real-time and historical market data, option chains, and symbol information. TradeStation supports advanced order types including bracket, OCO, OSO, and multi-leg options orders, with both intelligent and direct order routing. The API uses OAuth2 authentication and version 3 is the recommended version for new integrations. version: '3.0' contact: name: TradeStation API Support url: https://api.tradestation.com/docs/ termsOfService: https://www.tradestation.com/important-information/ externalDocs: description: TradeStation API Documentation url: https://api.tradestation.com/docs/ servers: - url: https://api.tradestation.com description: Production Server - url: https://sim-api.tradestation.com description: Simulator Server (Paper Trading) tags: - name: Accounts description: >- Retrieve account information including account details, balances, beginning-of-day balances, positions, orders, historical orders, and cryptocurrency wallets. - name: Market Data description: >- Access real-time and historical market data including quotes, bar charts, symbol information, symbol lists, and cryptocurrency pairs. - name: Options description: >- Retrieve options-related market data including expirations, strike prices, spread types, and risk/reward calculations. - name: Order Execution description: >- Place, confirm, modify, and cancel orders for stocks, options, and futures. Includes support for group orders such as bracket and OCO orders. - name: Reference Data description: >- Access reference data for order execution including activation triggers and available routing destinations. security: - oauth2AuthCode: [] 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' /v3/marketdata/quotes/{symbols}: get: operationId: getQuotes summary: Get quotes description: >- Retrieves real-time quote snapshots for one or more symbols. Returns current bid, ask, last price, volume, and other quote data fields. Supports stocks, options, futures, and cryptocurrency symbols. tags: - Market Data parameters: - $ref: '#/components/parameters/Symbols' responses: '200': description: Successfully retrieved quotes content: application/json: schema: $ref: '#/components/schemas/QuotesResponse' '400': description: Invalid symbol format content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/barcharts/{symbol}: get: operationId: getBars summary: Get bar chart data description: >- Retrieves historical bar chart data (OHLC) for a given symbol. Supports multiple intervals and units including minute, daily, weekly, and monthly bars. Returns open, high, low, close prices along with volume and timestamp information. tags: - Market Data parameters: - name: symbol in: path required: true description: >- The symbol to retrieve bar chart data for. schema: type: string - name: interval in: query description: >- The interval for each bar. For minute bars, valid values are 1-1440. For daily, weekly, and monthly bars, use 1. required: false schema: type: integer minimum: 1 maximum: 1440 - name: unit in: query description: >- The unit of time for the bar interval. required: false schema: type: string enum: - Minute - Daily - Weekly - Monthly - name: barsBack in: query description: >- Number of bars to retrieve going back from the last date. required: false schema: type: integer minimum: 1 maximum: 57600 - name: firstDate in: query description: >- The start date for bar data retrieval. required: false schema: type: string format: date-time - name: lastDate in: query description: >- The end date for bar data retrieval. required: false schema: type: string format: date-time - name: sessionTemplate in: query description: >- The session template to use for filtering bar data. Controls which trading session data to include. required: false schema: type: string enum: - USEQPre - USEQPost - USEQPreAndPost - Default responses: '200': description: Successfully retrieved bar chart data content: application/json: schema: $ref: '#/components/schemas/BarsResponse' '400': description: Invalid parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Symbol not found content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/symbols/{symbols}: get: operationId: getSymbols summary: Get symbol details description: >- Retrieves detailed symbol information for one or more symbols. Returns symbol metadata including description, exchange, category, currency, point value, and contract specifications. tags: - Market Data parameters: - $ref: '#/components/parameters/Symbols' responses: '200': description: Successfully retrieved symbol details content: application/json: schema: $ref: '#/components/schemas/SymbolsResponse' '400': description: Invalid symbol format content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/symbollists/cryptopairs/symbolnames: get: operationId: getCryptoPairs summary: Get cryptocurrency pairs description: >- Retrieves the list of available cryptocurrency trading pairs. Returns symbol names for all supported crypto pairs on the TradeStation platform. tags: - Market Data responses: '200': description: Successfully retrieved cryptocurrency pairs content: application/json: schema: $ref: '#/components/schemas/CryptoPairsResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/options/expirations/{underlying}: get: operationId: getOptionExpirations summary: Get option expirations description: >- Retrieves available option expiration dates for a given underlying symbol. Returns expiration dates along with expiration type information such as monthly, weekly, or quarterly. tags: - Options parameters: - $ref: '#/components/parameters/Underlying' responses: '200': description: Successfully retrieved option expirations content: application/json: schema: $ref: '#/components/schemas/OptionExpirationsResponse' '400': description: Invalid underlying symbol content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/options/strikes/{underlying}: get: operationId: getOptionStrikes summary: Get option strikes description: >- Retrieves available strike prices for options on a given underlying symbol. Returns the list of strike prices available for trading. tags: - Options parameters: - $ref: '#/components/parameters/Underlying' responses: '200': description: Successfully retrieved option strikes content: application/json: schema: $ref: '#/components/schemas/OptionStrikesResponse' '400': description: Invalid underlying symbol content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/options/spreadtypes: get: operationId: getOptionSpreadTypes summary: Get option spread types description: >- Retrieves the list of available option spread types supported by TradeStation. Returns spread type names and identifiers for use in multi-leg option order construction. tags: - Options responses: '200': description: Successfully retrieved option spread types content: application/json: schema: $ref: '#/components/schemas/OptionSpreadTypesResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/marketdata/options/riskreward: post: operationId: calculateOptionRiskReward summary: Calculate option risk/reward description: >- Calculates the risk and reward profile for one or more option positions. Returns theoretical profit/loss values at various price levels for the specified option strategy. tags: - Options requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RiskRewardRequest' responses: '200': description: Successfully calculated risk/reward content: application/json: schema: $ref: '#/components/schemas/RiskRewardResponse' '400': description: Invalid request parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/orders: post: operationId: placeOrder summary: Place an order description: >- Submits a new order for execution. Supports market, limit, stop market, stop limit, and trailing stop order types for stocks, options, and futures. Includes support for time-in-force settings such as day, GTC, GTD, and IOC. tags: - Order Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrderRequest' responses: '200': description: Order successfully submitted content: application/json: schema: $ref: '#/components/schemas/OrderResponse' '400': description: Invalid order parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/orders/{orderId}: put: operationId: replaceOrder summary: Replace an order description: >- Modifies an existing open order. Allows changing price, quantity, and other order parameters. The original order is cancelled and replaced with the updated order parameters. tags: - Order Execution parameters: - $ref: '#/components/parameters/OrderId' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrderRequest' responses: '200': description: Order successfully replaced content: application/json: schema: $ref: '#/components/schemas/OrderResponse' '400': description: Invalid order parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/Error' delete: operationId: cancelOrder summary: Cancel an order description: >- Cancels an existing open order. The order must be in a cancellable state. Returns the updated order status after cancellation. tags: - Order Execution parameters: - $ref: '#/components/parameters/OrderId' responses: '200': description: Order successfully cancelled content: application/json: schema: $ref: '#/components/schemas/OrderResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' '404': description: Order not found content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/orderconfirm: post: operationId: confirmOrder summary: Confirm an order description: >- Validates an order and returns estimated costs, commissions, and margin requirements without actually submitting the order for execution. Use this endpoint to preview order details before placing. tags: - Order Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrderRequest' responses: '200': description: Order confirmation details content: application/json: schema: $ref: '#/components/schemas/OrderConfirmResponse' '400': description: Invalid order parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/ordergroups: post: operationId: placeOrderGroup summary: Place a group order description: >- Submits a group of related orders for execution. Supports bracket orders (OCO - One Cancels Other), OSO (Order Sends Order), and other multi-order strategies. When one order in the group is filled or cancelled, related orders are automatically managed. tags: - Order Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GroupOrderRequest' responses: '200': description: Group order successfully submitted content: application/json: schema: $ref: '#/components/schemas/GroupOrderResponse' '400': description: Invalid group order parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/ordergroupconfirm: post: operationId: confirmOrderGroup summary: Confirm a group order description: >- Validates a group of related orders and returns estimated costs, commissions, and margin requirements without submitting for execution. Use this endpoint to preview group order details before placing. tags: - Order Execution requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GroupOrderRequest' responses: '200': description: Group order confirmation details content: application/json: schema: $ref: '#/components/schemas/GroupOrderConfirmResponse' '400': description: Invalid group order parameters content: application/json: schema: $ref: '#/components/schemas/Error' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/activationtriggers: get: operationId: getActivationTriggers summary: Get activation triggers description: >- Retrieves the list of available activation trigger methods for conditional orders. Returns trigger types and their identifiers that can be used when placing orders with activation conditions. tags: - Reference Data responses: '200': description: Successfully retrieved activation triggers content: application/json: schema: $ref: '#/components/schemas/ActivationTriggersResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' /v3/orderexecution/routes: get: operationId: getRoutes summary: Get execution routes description: >- Retrieves the list of available order routing destinations. Returns route identifiers and names for use when specifying a routing preference on order submission. tags: - Reference Data responses: '200': description: Successfully retrieved routes content: application/json: schema: $ref: '#/components/schemas/RoutesResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/Error' components: 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 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 Symbols: name: symbols in: path required: true description: >- One or more symbol identifiers, comma-separated. schema: type: string Underlying: name: underlying in: path required: true description: >- The underlying symbol for options data retrieval. schema: type: string OrderId: name: orderId in: path required: true description: >- The unique identifier of the order. schema: type: string schemas: 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. 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. 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' 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. 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' 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' 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. 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' WalletsResponse: type: object description: >- Response containing cryptocurrency wallet information. properties: Wallets: type: array description: >- List of cryptocurrency wallets. items: $ref: '#/components/schemas/Wallet' 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. Quote: type: object description: >- Real-time quote data for a single symbol. properties: Symbol: type: string description: >- The symbol identifier. Last: type: number format: double description: >- The last traded price. Bid: type: number format: double description: >- The current bid price. Ask: type: number format: double description: >- The current ask price. BidSize: type: integer description: >- The size of the bid in shares or contracts. AskSize: type: integer description: >- The size of the ask in shares or contracts. Volume: type: integer description: >- The total volume traded today. Open: type: number format: double description: >- The opening price for the current session. High: type: number format: double description: >- The highest price for the current session. Low: type: number format: double description: >- The lowest price for the current session. Close: type: number format: double description: >- The previous session closing price. NetChange: type: number format: double description: >- Net change from previous close. NetChangePct: type: number format: double description: >- Net change as a percentage. TradeTime: type: string format: date-time description: >- The timestamp of the last trade. QuotesResponse: type: object description: >- Response containing quote data for one or more symbols. properties: Quotes: type: array description: >- List of quote snapshots. items: $ref: '#/components/schemas/Quote' Bar: type: object description: >- A single OHLC bar representing price activity over a time interval. properties: High: type: number format: double description: >- The highest price during the bar interval. Low: type: number format: double description: >- The lowest price during the bar interval. Open: type: number format: double description: >- The opening price of the bar interval. Close: type: number format: double description: >- The closing price of the bar interval. Volume: type: integer description: >- The total volume during the bar interval. TimeStamp: type: string format: date-time description: >- The timestamp for the start of the bar interval. TotalTicks: type: integer description: >- The total number of ticks during the bar interval. UpTicks: type: integer description: >- The number of up ticks during the bar interval. DownTicks: type: integer description: >- The number of down ticks during the bar interval. BarsResponse: type: object description: >- Response containing bar chart data for a symbol. properties: Bars: type: array description: >- List of OHLC bars. items: $ref: '#/components/schemas/Bar' Symbol: type: object description: >- Detailed symbol information and metadata. properties: Name: type: string description: >- The symbol name or ticker. Description: type: string description: >- A human-readable description of the symbol. Exchange: type: string description: >- The exchange where the symbol is listed. ExchangeID: type: integer description: >- The numeric exchange identifier. Category: type: string description: >- The category of the symbol such as Stock, Option, Future, or Forex. Currency: type: string description: >- The currency the symbol is denominated in. enum: - USD - EUR - CAD - GBP - JPY Country: type: string description: >- The country where the symbol is listed. PointValue: type: number format: double description: >- The dollar value of a single point move. MinMove: type: number format: double description: >- The minimum price movement. Root: type: string description: >- The root symbol for options and futures. Underlying: type: string description: >- The underlying symbol for options. StrikePrice: type: number format: double description: >- The strike price for option symbols. ExpirationDate: type: string format: date description: >- The expiration date for option and futures symbols. OptionType: type: string description: >- The option type for option symbols. enum: - Call - Put FutureType: type: string description: >- The futures type classification. SymbolsResponse: type: object description: >- Response containing detailed symbol information. properties: Symbols: type: array description: >- List of symbol details. items: $ref: '#/components/schemas/Symbol' CryptoPairsResponse: type: object description: >- Response containing available cryptocurrency trading pairs. properties: SymbolNames: type: array description: >- List of cryptocurrency pair symbol names. items: type: string OptionExpiration: type: object description: >- An option expiration date with its type classification. properties: Date: type: string format: date description: >- The expiration date. Type: type: string description: >- The expiration type classification. enum: - Monthly - Weekly - Quarterly - EOM OptionExpirationsResponse: type: object description: >- Response containing option expiration dates for an underlying symbol. properties: Expirations: type: array description: >- List of option expirations. items: $ref: '#/components/schemas/OptionExpiration' OptionStrikesResponse: type: object description: >- Response containing available strike prices for an underlying symbol. properties: Strikes: type: array description: >- List of available strike prices. items: type: number format: double OptionSpreadTypesResponse: type: object description: >- Response containing available option spread types. properties: SpreadTypes: type: array description: >- List of available spread types. items: type: object properties: Name: type: string description: >- The name of the spread type. Id: type: string description: >- The unique identifier of the spread type. RiskRewardRequest: type: object description: >- Request body for option risk/reward calculation. required: - SpreadPrice - Legs properties: SpreadPrice: type: number format: double description: >- The net price of the option spread. Legs: type: array description: >- The option legs to include in the calculation. items: $ref: '#/components/schemas/OptionLeg' OptionLeg: type: object description: >- A single leg of an option strategy. properties: Symbol: type: string description: >- The option symbol. Quantity: type: integer description: >- The number of contracts. TradeAction: type: string description: >- The trade action for this leg. enum: - BuyToOpen - BuyToClose - SellToOpen - SellToClose RiskRewardResponse: type: object description: >- Response containing the risk/reward analysis results. properties: MaxGain: type: number format: double description: >- The maximum potential gain. MaxLoss: type: number format: double description: >- The maximum potential loss. BreakEvenPoints: type: array description: >- Break-even price points. items: type: number format: double OrderRequest: type: object description: >- Request body for placing or replacing an order. required: - AccountID - Symbol - Quantity - OrderType - TradeAction - TimeInForce properties: AccountID: type: string description: >- The account to place the order in. Symbol: type: string description: >- The symbol to trade. Quantity: type: number format: double description: >- The number of shares or contracts to trade. OrderType: type: string description: >- The type of order. enum: - Market - Limit - StopMarket - StopLimit - TrailingStop - TrailingStopLimit TradeAction: type: string description: >- The trade action for the order. enum: - Buy - Sell - BuyToOpen - BuyToClose - SellToOpen - SellToClose - SellShort - BuyToCover TimeInForce: type: string description: >- Time-in-force instruction for the order. enum: - Day - GTC - GTD - IOC - FOK - OPG - CLO 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. Route: type: string description: >- The routing destination for the order. AdvancedOptions: type: object description: >- Advanced order options such as trailing stop parameters. properties: TrailingStop: type: object properties: Amount: type: number format: double description: >- The trailing amount in dollars. Percent: type: number format: double description: >- The trailing amount as a percentage. Legs: type: array description: >- Option legs for multi-leg option orders. items: $ref: '#/components/schemas/OptionLeg' OrderResponse: type: object description: >- Response after placing, replacing, or cancelling an order. properties: Orders: type: array description: >- List of order results. items: $ref: '#/components/schemas/OrderResult' OrderResult: type: object description: >- Result of an individual order operation. properties: OrderID: type: string description: >- The unique order identifier assigned by the system. Message: type: string description: >- Human-readable message about the order result. OrderConfirmResponse: type: object description: >- Response with estimated order costs and confirmation details. properties: EstimatedCommission: type: number format: double description: >- Estimated commission for the order. EstimatedCost: type: number format: double description: >- Estimated total cost of the order. EstimatedPrice: type: number format: double description: >- Estimated execution price. MarginRequirement: type: number format: double description: >- The margin requirement for the order. GroupOrderRequest: type: object description: >- Request body for placing a group of related orders such as bracket, OCO, or OSO orders. required: - Type - Orders properties: Type: type: string description: >- The type of order group. enum: - OCO - BRK - OSO Orders: type: array description: >- The list of orders in the group. items: $ref: '#/components/schemas/OrderRequest' GroupOrderResponse: type: object description: >- Response after placing a group order. properties: Orders: type: array description: >- List of order results for the group. items: $ref: '#/components/schemas/OrderResult' GroupOrderConfirmResponse: type: object description: >- Response with estimated costs for all orders in a group. properties: Confirmations: type: array description: >- List of confirmation details for each order in the group. items: $ref: '#/components/schemas/OrderConfirmResponse' ActivationTriggersResponse: type: object description: >- Response containing available activation trigger methods. properties: ActivationTriggers: type: array description: >- List of activation triggers. items: type: object properties: Key: type: string description: >- The activation trigger key identifier. Name: type: string description: >- The human-readable name of the trigger. Description: type: string description: >- A description of when the trigger activates. RoutesResponse: type: object description: >- Response containing available order routing destinations. properties: Routes: type: array description: >- List of routing destinations. items: type: object properties: Id: type: string description: >- The route identifier. Name: type: string description: >- The human-readable name of the route. AssetTypes: type: array description: >- Asset types supported by this route. items: type: string