order-execution

Submits 1 or more orders. Request valid for Market, Limit, Stop Market, Stop Limit, Options and Order Sends Order (OSO) order types.

post/v2/orders

Request

  • Base URL
    https://api.tradestation.com
  • URL
    https://api.tradestation.com/v2/orders
  • Auth
    • OAuth 2
      Authorization code: https://api.tradestation.com/v2/security/authorize
      Token URL: https://api.tradestation.com/v2/security/authorize scopes: trade
    • or OAuth 2
      Client credentials
      Token URL: https://api.tradestation.com/v2/security/authorize scopes: trade

Request body

AccountKeystring required

Must be a valid Account Key for that user and Asset Type

AssetType'EQ' | 'FU' | 'OP' required
Durationstring required

Allowed durations vary by Asset Type

  • DAY - Day, valid until the end of the regular trading session.
  • DYP - Day Plus; valid until the end of the extended trading session
  • GTC - Good till canceled
  • GCP - Good till canceled plus
  • GTD - Good through date
  • GDP - Good through date plus
  • OPG - At the opening; only valid for listed stocks at the opening session Price
  • CLO - On Close; orders that target the closing session of an exchange.
  • IOC - Immediate or Cancel; filled immediately or canceled, partial fills are accepted
  • FOK - Fill or Kill; orders are filled entirely or canceled, partial fills are not accepted
  • 1 or 1 MIN - 1 minute; expires after the 1 minute
  • 3 or 3 MIN - 3 minutes; expires after the 3 minutes
  • 5 or 5 MIN - 5 minutes; expires after the 5 minutes
GTDDatestring mmddyyyy

Date that Order is valid through. Input Format: MM/DD/YYYY Required for orders with Duration = GTD.

LimitPricestring
StopPricestring
OrderConfirmIdstring

A unique identifier regarding an order used to prevent duplicates.

Must be unique per API key, per order, per user.

OrderType'Limit' | 'Market' | 'StopLimit' | 'StopMarket' required
Quantitystring required
Routestring

The route of the order. For Stocks and Options, Route value will default to Intelligent if no value is set. Must be UPPERCASE. Routes can be obtained from Retrieve Available Exchanges.

Symbolstring required

Must be UPPERCASE

TradeAction'BUY' | 'SELL' | 'BUYTOCOVER' | 'SELLSHORT' | 'BUYTOOPEN' | 'BUYTOCLOSE' | 'SELLTOOPEN' | 'SELLTOCLOSE' required

Conveys the intent of the trade

  • BUY - equities and futures
  • SELL - equities and futures
  • BUYTOCOVER - equities
  • SELLSHORT - equities
  • BUYTOOPEN - options
  • BUYTOCLOSE - options
  • SELLTOOPEN - options
  • SELLTOCLOSE - options

Response

Orders Response

Changes