Orders

Submit new orders

post/v1/accounts/{account_id}/orders

Request

  • Base URL
    https://api.clearstreet.com
  • Auth
    HTTP bearer

Path parameters

account_idinteger required

Account identifier

Request body

expires_atstring date-time nullable

The timestamp when the order should expire (UTC). Required when time_in_force is GOOD_TILL_DATE.

extended_hoursboolean nullable

Allow trading outside regular trading hours. Some brokers disallow options outside RTH.

idstring nullable

Optional client-provided unique ID (idempotency). Required to be unique per account.

instrument_idstring

Instrument identifier: either an instrument UUID or a symbol (symbol for equities, OSI for options). Non-UUID inputs are resolved server-side.

limit_offsetstring nullable

Limit offset for trailing stop-limit orders (signed)

limit_pricestring nullable

Limit price (required for LIMIT and STOP_LIMIT orders)

order_type'MARKET' | 'LIMIT' | 'STOP' | 'STOP_LIMIT' | 'TRAILING_STOP' | 'TRAILING_STOP_LIMIT' required

Strict order-type enum for order submission/replacement requests.

position_intent'OPEN' | 'CLOSE'

Client-attested open/close intent for an order.

quantitystring required

Quantity to trade. For COMMON_STOCK: shares (may be fractional if supported). For OPTION (single-leg): contracts (must be an integer)

side'BUY' | 'SELL' required

Side of the order (BUY or SELL).

stop_pricestring nullable

Stop price (required for STOP and STOP_LIMIT orders)

symbolstring nullable

Trading symbol. For equities, use the ticker symbol (e.g., "TSLA"). For options, use the OSI symbol (e.g., "TSLA 250117C00190000"). Either symbol or instrument_id must be provided.

time_in_force'DAY' | 'GOOD_TILL_CANCEL' | 'IMMEDIATE_OR_CANCEL' | 'FILL_OR_KILL' | 'GOOD_TILL_DATE' | 'AT_OPEN' | 'AT_CLOSE' required

Strict time-in-force enum for order submission requests.

trailing_offsetstring nullable

Trailing offset amount (required for trailing orders)

trailing_offset_type'PRICE' | 'BPS'

Trailing offset type for trailing stop orders.

Example request

[
  {
    "order_type": "MARKET",
    "quantity": "1",
    "side": "BUY",
    "symbol": "TSLA",
    "time_in_force": "DAY"
  }
]

Response

Orders submitted successfully

Example response

{
  "error": {
    "code": 400,
    "message": "Order quantity must be greater than zero"
  },
  "metadata": {
    "page_number": 1,
    "total_items": 42,
    "total_pages": 5
  },
  "data": [
    {
      "account_id": 19816,
      "client_order_id": "my-ref-id-20251001-001",
      "created_at": "2025-10-31T13:30:00.000000000Z",
      "extended_hours": false,
      "filled_quantity": "0",
      "id": "0195f6c7-4f64-7e3c-8b0a-1d8e4f5e6a7b",
      "instrument_id": "d4d5d6d7-e4e5-f4f5-a4a5-a6a7a8a9aaab",
      "instrument_type": "COMMON_STOCK",
      "leaves_quantity": "1",
      "limit_price": "48.00",
      "order_type": "LIMIT",
      "quantity": "1",
      "side": "BUY",
      "status": "PENDING_NEW",
      "stop_price": null,
      "symbol": "TSLA",
      "time_in_force": "DAY",
      "updated_at": "2025-10-31T13:30:00.000000000Z",
      "venue": "XNAS"
    }
  ]
}

Changes

    • warning

      removed the optional property /// from the response with the status

    • breaking

      removed the enum value AT_CROSSING of the request property /////

    • breaking

      removed the enum value AT_THE_CLOSE of the request property /////

    • breaking

      removed the enum value AT_THE_OPENING of the request property /////

    • breaking

      removed the enum value GOOD_THROUGH_CROSSING of the request property /////

    • breaking

      removed the enum value GOOD_TILL_CROSSING of the request property /////

    • breaking

      removed the enum value OTHER of the request property /////

    • breaking

      removed the enum value SELL_SHORT of the request property /////

    • breaking

      the ///////// request property's minLength was increased from 0 to 1

    • breaking

      removed subschema #1 subschema #2 from the ///////// request property oneOf list

    • breaking

      the ///////// request property type changed from no type to string

    • warning

      added the new AT_CLOSE enum value to the /// response property for the response status

    • warning

      added the new AT_OPEN enum value to the /// response property for the response status

    • warning

      added the new PENDING_TRIGGER enum value to the /// response property for the response status

    • warning

      added the new QUEUED enum value to the /// response property for the response status

    • info

      added the new optional request property /////

    • info

      added the new optional request property /////

    • info

      added the new AT_CLOSE enum value to the request property /////

    • info

      added the new AT_OPEN enum value to the request property /////

    • info

      added the optional property /// to the response with the status

    • info

      added the optional property /// to the response with the status

    • info

      removed the AT_CROSSING enum value from the /// response property for the response status

    • info

      removed the AT_THE_CLOSE enum value from the /// response property for the response status

    • info

      removed the AT_THE_OPENING enum value from the /// response property for the response status

    • info

      removed the GOOD_THROUGH_CROSSING enum value from the /// response property for the response status

    • info

      removed the GOOD_TILL_CROSSING enum value from the /// response property for the response status

    • info

      removed the OTHER enum value from the /// response property for the response status

    • info

      removed the SELL_SHORT enum value from the /// response property for the response status