Place OCO Order

Place a one-cancels-other (OCO) order composed of two simultaneous orders. If one executes, the other is automatically canceled. Send to POST /v1/accounts/{account_id}/orders with class=oco.

Validations:

  • type must be different for both legs.
  • If both orders are equities, the symbol must be the same.
  • If both orders are options, the option_symbol must be the same.
  • If sending duration per leg, both orders must have the same duration.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

ID of the account

Form Data
string
enum
required

Order class identifier

Allowed:
string
enum
required

Time the order will remain active. One of: day, gtc, pre, post.

Allowed:
string
required

The underlying security symbol

number
required

The number of contracts for the option leg

string
enum
required

The type of order to be placed. First order, one of: limit, stop, stop_limit

Allowed:
string of strings

OCC option symbol of the option

string
enum
required

The side of the leg. Equity orders, one of: buy, buy_to_cover, sell, sell_short Option orders, one of: buy_to_open, buy_to_close, sell_to_open, sell_to_close

number

Limit price. Required only for limit, stop_limit, debit and credit orders.

number

Stop price. Required only for stop and stop_limit orders.

string
required

The underlying security symbol

number
required

The number of contracts for the option leg

string
enum
required

The type of order to be placed. Second order, one of: limit, stop, stop_limit

Allowed:
string of strings

OCC option symbol of the option

string
enum
required

The side of the leg. Equity orders, one of: buy, buy_to_cover, sell, sell_short Option orders, one of: buy_to_open, buy_to_close, sell_to_open, sell_to_close

number

Limit price. Required only for limit, stop_limit, debit and credit orders.

number

Stop price. Required only for stop and stop_limit orders.

string

User-defined tag for the order

boolean
required

When true, validates the order without submitting it

Headers
string
enum
required

Request content type

Allowed:
Responses

400

Invalid request parameters or body

401

Authentication required or invalid credentials

403

Access denied to the requested resource

404

The requested resource was not found

Language
Credentials
Bearer
Bearer <access_token>
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json