Orders

Create order

Creates a new order and sends to our internal systems for execution. Note that a successful call to this endpoint does not necessarily mean your order has been accepted, e.g. a downstream venue might reject your order. You should therefore utilize our WebSocket APIs to listen for changes in order lifecycle events.

post/accounts/{account_id}/orders

Path parameters

account_idstring required

Account ID for the account.

Example:100000

Request body

reference_idstring

An ID that you provide.

order_type'limit' | 'market' | 'stop' | 'stop-limit' required

The type of order, can be one of the following:

  • limit: A limit order will execute at-or-better than the limit price you specify
  • market: An order that will execute at the prevailing market prices
  • stop: A stop order will result in a market order when the market price reaches the specified stop price
  • stop-limit: A stop limit order will result in a limit order when the market price reaches the specified stop price
side'buy' | 'sell' | 'sell-short' required

Buy, sell, sell-short indicator.

quantitystring required

String representation of quantity.

pricestring

String representation of a price.

stop_pricestring

String representation of a price.

time_in_force'day' | 'ioc' | 'day-plus' | 'at-open' | 'at-close' required

The lifecycle enforcement of this order.

  • day: The order will exist for the duration of the current trading session
  • ioc: The order will immediately be executed or cancelled
  • day-plus: The order will exist only for the duration the current trading session plus extended hours, if applicable
  • at-open: The order will exist only for the opening auction of the next session
  • at-close: The order will exist only for the closing auction of the current session
locate_brokerstring

If you're short-selling and using an away broker for a locate, provide the broker name here.

symbolstring required
symbol_format'cms' | 'osi'

Denotes the format of the provided symbol field.

open_close_indicator'open' | 'close'

Example request

{
  "reference_id": "my-order-id-123",
  "quantity": "100",
  "price": "123.99",
  "stop_price": "123.99",
  "symbol": "AAPL",
  "strategy": {
    "min_percent": 1,
    "max_percent": 35
  }
}

Response

Order received. Indicates the the order was received and is pending further processing.

order_idstring required

An internally generated unique ID for this order.

Example response

{
  "order_id": "234usdfa3"
}

Changes

Changed in 10 of the 22 revisions of this API.28930

    • request property open_close_indicator was restricted to a list of enum values

      request-property-became-enum

    • the open_close_indicator request property type/format changed from / to string/

      request-property-type-changed

    • added the new close enum value to the request property open_close_indicator

      request-property-enum-value-added

    • added the new open enum value to the request property open_close_indicator

      request-property-enum-value-added

    • removed the enum value close of the request property open_close_indicator

      request-property-enum-value-removed

    • removed the enum value open of the request property open_close_indicator

      request-property-enum-value-removed

    • the open_close_indicator request property type/format changed from string/ to /

      request-property-type-changed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional request property open_close_indicator

      new-optional-request-property

    • added the new ap enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

    • added the new dark enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

    • added the new pov enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

    • added the new sor enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

    • added the new twap enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

    • added the new vwap enum value to the request property strategy/anyOf[DmaStrategy]/type

      request-property-enum-value-added

  • d8047ed6956911See the full diff
    • removed SorStrategy VwapStrategy TwapStrategy ApStrategy PovStrategy DarkStrategy DmaStrategy from the strategy request property oneOf list

      request-property-one-of-removed

    • added SorStrategy VwapStrategy TwapStrategy ApStrategy PovStrategy DarkStrategy DmaStrategy to the strategy request property anyOf list

      request-property-any-of-added

  • b9727888407f118See the full diff
    • added subschema #2 to the strategy/oneOf[ApStrategy]/ request property allOf list

      request-property-all-of-added

    • added subschema #2 to the strategy/oneOf[DarkStrategy]/ request property allOf list

      request-property-all-of-added

    • added subschema #2 to the strategy/oneOf[PovStrategy]/ request property allOf list

      request-property-all-of-added

    • added subschema #2 to the strategy/oneOf[TwapStrategy]/ request property allOf list

      request-property-all-of-added

    • added subschema #2 to the strategy/oneOf[VwapStrategy]/ request property allOf list

      request-property-all-of-added

    • removed the enum value ap of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the enum value dark of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the enum value pov of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the enum value sor of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the enum value twap of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the enum value vwap of the request property strategy/oneOf[DmaStrategy]/type

      request-property-enum-value-removed

    • removed the request property strategy/oneOf[ApStrategy]/max_percent

      request-property-removed

    • removed the request property strategy/oneOf[ApStrategy]/min_percent

      request-property-removed

    • removed the request property strategy/oneOf[DarkStrategy]/max_percent

      request-property-removed

    • removed the request property strategy/oneOf[PovStrategy]/target_percent

      request-property-removed

    • removed the request property strategy/oneOf[TwapStrategy]/max_percent

      request-property-removed

    • removed the request property strategy/oneOf[TwapStrategy]/min_percent

      request-property-removed

    • removed the request property strategy/oneOf[VwapStrategy]/max_percent

      request-property-removed

    • removed the request property strategy/oneOf[VwapStrategy]/min_percent

      request-property-removed

    • removed the enum value gotc of the request property strategy/oneOf[DmaStrategy]/destination

      request-property-enum-value-removed

    • removed the enum value xchi of the request property strategy/oneOf[DmaStrategy]/destination

      request-property-enum-value-removed

    • removed the enum value xphl of the request property strategy/oneOf[DmaStrategy]/destination

      request-property-enum-value-removed

    • added dma discriminator mapping keys to the strategy request property

      request-property-discriminator-mapping-added

    • added the new dma enum value to the request property strategy/oneOf[ApStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new dma enum value to the request property strategy/oneOf[DarkStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new dma enum value to the request property strategy/oneOf[PovStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new dma enum value to the request property strategy/oneOf[SorStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new dma enum value to the request property strategy/oneOf[TwapStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new dma enum value to the request property strategy/oneOf[VwapStrategy]/allOf[BaseStrategy]/type

      request-property-enum-value-added

    • added the new stop-limit enum value to the request property order_type

      request-property-enum-value-added

    • added DmaStrategy to the strategy request property oneOf list

      request-property-one-of-added

    • the strategy/oneOf[ApStrategy]/max_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[ApStrategy]/min_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[DarkStrategy]/max_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[PovStrategy]/target_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[TwapStrategy]/max_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[TwapStrategy]/min_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[VwapStrategy]/max_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[VwapStrategy]/min_percent request property type/format changed from number/ to integer/

      request-property-type-changed

    • the strategy/oneOf[ApStrategy]/max_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

    • the strategy/oneOf[ApStrategy]/min_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

    • the strategy/oneOf[DarkStrategy]/max_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

    • the strategy/oneOf[PovStrategy]/target_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

    • the strategy/oneOf[TwapStrategy]/max_percent request property's max was increased from 0.50 to 50.00

      request-property-max-increased

    • the strategy/oneOf[TwapStrategy]/min_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

    • the strategy/oneOf[VwapStrategy]/max_percent request property's max was increased from 1.00 to 50.00

      request-property-max-increased

    • the strategy/oneOf[VwapStrategy]/min_percent request property's max was increased from 1.00 to 100.00

      request-property-max-increased

  • cac25d6221de13See the full diff
    • removed the request property strategy_type

      request-property-removed

    • added the new optional request property stop_price

      new-optional-request-property

    • added the new optional request property strategy

      new-optional-request-property

    • added the new stop enum value to the request property order_type

      request-property-enum-value-added