Orders
Place, monitor, and manage trading orders.
Get Orders
Get Order By ID
Submit Orders
Replace Order
Cancel Open Order
Cancel All Open Orders
Get Executions
Preview Orders
ModelsExpand Collapse
type Execution struct{…}
Represents a single fill of an order for an account.
Quantity string
Filled quantity. For a strategy-level multileg fill this is the net strategy quantity, not a per-leg quantity.
Side Side
InstrumentID stringOptional
Unique instrument identifier. null when this is a strategy-level multileg
fill whose legs are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
Price stringOptional
Fill price. null for multileg fills, whose price lives only at the leg level.
When a null/undefined value is observed, it indicates it does not apply.
Symbol stringOptional
Trading symbol. null when this is a strategy-level multileg fill whose legs
are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
UnderlyingInstrumentID stringOptional
Underlying instrument identifier for an option fill. Omitted for a
non-derivative fill, when the underlier could not be resolved, or for a
multileg fill (per-leg underliers live in legs[]).
When a null/undefined value is observed, it indicates it does not apply.
Quantity string
Filled quantity. For a strategy-level multileg fill this is the net strategy quantity, not a per-leg quantity.
Side Side
InstrumentID stringOptional
Unique instrument identifier. null when this is a strategy-level multileg
fill whose legs are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
Price stringOptional
Fill price. null for multileg fills, whose price lives only at the leg level.
When a null/undefined value is observed, it indicates it does not apply.
Symbol stringOptional
Trading symbol. null when this is a strategy-level multileg fill whose legs
are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
UnderlyingInstrumentID stringOptional
Underlying instrument identifier for an option fill. Omitted for a
non-derivative fill, when the underlier could not be resolved, or for a
multileg fill (per-leg underliers live in legs[]).
When a null/undefined value is observed, it indicates it does not apply.
type NewOrderRequest struct{…}
Request to submit a new order
OrderType RequestOrderType
Quantity string
Quantity to trade. For COMMON_STOCK: shares (may be fractional if supported). For OPTION (single-leg): contracts (must be an integer)
Side Side
TimeInForce RequestTimeInForce
ID stringOptional
Optional client-provided unique ID (idempotency). Required to be unique per account.
ExpiresAt TimeOptional
The timestamp when the order should expire (UTC). Required when time_in_force is GOOD_TILL_DATE.
ExtendedHours boolOptional
Allow trading outside regular trading hours. Some brokers disallow options outside RTH.
Instrument ID (UUID) or symbol (equity ticker or OSI option symbol). Either symbol or instrument_id must be provided.
Optional execution strategy. One of SOR, VWAP, TWAP, or DMA. Defaults
to SOR, the only strategy OTC common-stock orders support. VWAP and TWAP
are supported only on MARKET and LIMIT orders, and DMA only on LIMIT
orders; all three require DAY time-in-force. VWAP, TWAP, and DMA do
not support extended_hours.
Symbol stringOptional
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.
type Order struct{…}
A trading order with its current state and execution details.
This is the unified API representation of an order across its lifecycle, combining data from execution reports, order status queries, and parent/child tracking.
OrderType OrderType
Side Side
Status OrderStatus
TimeInForce TimeInForce
AverageFillPrice stringOptional
Average fill price across all executions. For multileg orders this is the venue’s strategy-level average when reported, else the signed net package price derived from the leg averages: net debit positive, net credit negative, zero possible. When a null/undefined value is observed, it indicates that there is no available data.
ExpiresAt TimeOptional
Timestamp when the order will expire (UTC). Present when time_in_force is GOOD_TILL_DATE. When a null/undefined value is observed, it indicates it does not apply.
InstrumentID stringOptional
Instrument identifier for the traded instrument. null when the order is a
multileg strategy whose legs are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
LimitOffset stringOptional
Limit offset for trailing stop-limit orders (signed) When a null/undefined value is observed, it indicates it does not apply.
LimitPrice stringOptional
Limit price (for LIMIT and STOP_LIMIT orders) When a null/undefined value is observed, it indicates it does not apply.
ReleasesAt TimeOptional
Scheduled release time for orders awaiting release. When a null/undefined value is observed, it indicates it does not apply.
StopPrice stringOptional
Stop price (for STOP and STOP_LIMIT orders) When a null/undefined value is observed, it indicates it does not apply.
Strategy OrderStrategyOptional
Symbol stringOptional
Trading symbol. null when the order is a multileg strategy whose legs are
reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
TrailingLimitPx stringOptional
Current trailing limit price computed by the trailing strategy When a null/undefined value is observed, it indicates it does not apply.
TrailingOffset stringOptional
Trailing offset amount for trailing orders When a null/undefined value is observed, it indicates it does not apply.
TrailingStopPx stringOptional
Current trailing stop price computed by the trailing strategy When a null/undefined value is observed, it indicates it does not apply.
TrailingWatermarkPx stringOptional
Trailing watermark price for trailing orders. Strategy-computed, so it is absent on the order-submission acknowledgement and only appears once fetched via the order fetch or list endpoints. When a null/undefined value is observed, it indicates it does not apply.
TrailingWatermarkTs TimeOptional
Trailing watermark timestamp for trailing orders. Strategy-computed, so it is absent on the order-submission acknowledgement and only appears once fetched via the order fetch or list endpoints. When a null/undefined value is observed, it indicates it does not apply.
UnderlyingInstrumentID stringOptional
Instrument ID of the option’s underlying instrument. Populated only for
options orders. A null means one of two things: the order is not an
option, so the field does not apply; or the order is an option whose
underlier has not yet been resolved.
When a null/undefined value is observed, it indicates it does not apply.
OrderType OrderType
Side Side
Status OrderStatus
TimeInForce TimeInForce
AverageFillPrice stringOptional
Average fill price across all executions. For multileg orders this is the venue’s strategy-level average when reported, else the signed net package price derived from the leg averages: net debit positive, net credit negative, zero possible. When a null/undefined value is observed, it indicates that there is no available data.
ExpiresAt TimeOptional
Timestamp when the order will expire (UTC). Present when time_in_force is GOOD_TILL_DATE. When a null/undefined value is observed, it indicates it does not apply.
InstrumentID stringOptional
Instrument identifier for the traded instrument. null when the order is a
multileg strategy whose legs are reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
LimitOffset stringOptional
Limit offset for trailing stop-limit orders (signed) When a null/undefined value is observed, it indicates it does not apply.
LimitPrice stringOptional
Limit price (for LIMIT and STOP_LIMIT orders) When a null/undefined value is observed, it indicates it does not apply.
ReleasesAt TimeOptional
Scheduled release time for orders awaiting release. When a null/undefined value is observed, it indicates it does not apply.
StopPrice stringOptional
Stop price (for STOP and STOP_LIMIT orders) When a null/undefined value is observed, it indicates it does not apply.
Strategy OrderStrategyOptional
Symbol stringOptional
Trading symbol. null when the order is a multileg strategy whose legs are
reported individually in legs[].
When a null/undefined value is observed, it indicates it does not apply.
TrailingLimitPx stringOptional
Current trailing limit price computed by the trailing strategy When a null/undefined value is observed, it indicates it does not apply.
TrailingOffset stringOptional
Trailing offset amount for trailing orders When a null/undefined value is observed, it indicates it does not apply.
TrailingStopPx stringOptional
Current trailing stop price computed by the trailing strategy When a null/undefined value is observed, it indicates it does not apply.
TrailingWatermarkPx stringOptional
Trailing watermark price for trailing orders. Strategy-computed, so it is absent on the order-submission acknowledgement and only appears once fetched via the order fetch or list endpoints. When a null/undefined value is observed, it indicates it does not apply.
TrailingWatermarkTs TimeOptional
Trailing watermark timestamp for trailing orders. Strategy-computed, so it is absent on the order-submission acknowledgement and only appears once fetched via the order fetch or list endpoints. When a null/undefined value is observed, it indicates it does not apply.
UnderlyingInstrumentID stringOptional
Instrument ID of the option’s underlying instrument. Populated only for
options orders. A null means one of two things: the order is not an
option, so the field does not apply; or the order is an option whose
underlier has not yet been resolved.
When a null/undefined value is observed, it indicates it does not apply.
type OrderPreview struct{…}
The projected impact of an order, as if it were submitted and fully filled.
Amount OrderPreviewAmount
BuyingPower OrderPreviewDelta
Equity OrderPreviewDelta
Errors []OrderPreviewError
Risk-check errors that would prevent the order from being accepted. Empty when the order would pass every pre-trade risk check.
MarginDetails OrderPreviewMarginDetails
Margin requirements and excess before and after the order.
InitialMarginExcess OrderPreviewDelta
InitialMarginRequirement OrderPreviewDelta
MaintenanceMarginExcess OrderPreviewDelta
MaintenanceMarginRequirement OrderPreviewDelta
OvernightMarginExcess OrderPreviewDelta
OvernightMarginRequirement OrderPreviewDelta
Positions []OrderPreviewPosition
Positions in the traded instruments before and after the order.
Quantity OrderPreviewDelta
Net position quantity before and after the order.
type OrderPreviewEntryUnion interface{…}
One requested order’s entry in the batch response.
type OrderPreviewEntryObject struct{…}
The order was previewed successfully.
Preview OrderPreview
The projected impact of the order.
Amount OrderPreviewAmount
BuyingPower OrderPreviewDelta
Equity OrderPreviewDelta
Errors []OrderPreviewError
Risk-check errors that would prevent the order from being accepted. Empty when the order would pass every pre-trade risk check.
MarginDetails OrderPreviewMarginDetails
Margin requirements and excess before and after the order.
InitialMarginExcess OrderPreviewDelta
InitialMarginRequirement OrderPreviewDelta
MaintenanceMarginExcess OrderPreviewDelta
MaintenanceMarginRequirement OrderPreviewDelta
OvernightMarginExcess OrderPreviewDelta
OvernightMarginRequirement OrderPreviewDelta
Positions []OrderPreviewPosition
Positions in the traded instruments before and after the order.
Quantity OrderPreviewDelta
Net position quantity before and after the order.
type OrderPreviewEntryObject2 struct{…}
The order could not be previewed. Shaped exactly like the top-level
error object on rejected submissions.
Error APIError
type OrderPreviewEntryObject struct{…}
The order was previewed successfully.
Preview OrderPreview
The projected impact of the order.
Amount OrderPreviewAmount
BuyingPower OrderPreviewDelta
Equity OrderPreviewDelta
Errors []OrderPreviewError
Risk-check errors that would prevent the order from being accepted. Empty when the order would pass every pre-trade risk check.
MarginDetails OrderPreviewMarginDetails
Margin requirements and excess before and after the order.
InitialMarginExcess OrderPreviewDelta
InitialMarginRequirement OrderPreviewDelta
MaintenanceMarginExcess OrderPreviewDelta
MaintenanceMarginRequirement OrderPreviewDelta
OvernightMarginExcess OrderPreviewDelta
OvernightMarginRequirement OrderPreviewDelta
Positions []OrderPreviewPosition
Positions in the traded instruments before and after the order.
Quantity OrderPreviewDelta
Net position quantity before and after the order.
type OrderPreviewEntryObject2 struct{…}
The order could not be previewed. Shaped exactly like the top-level
error object on rejected submissions.
Error APIError
type OrderPreviewMarginDetails struct{…}
Margin requirements and excess before and after the previewed order.
InitialMarginExcess OrderPreviewDelta
InitialMarginRequirement OrderPreviewDelta
MaintenanceMarginExcess OrderPreviewDelta
MaintenanceMarginRequirement OrderPreviewDelta
OvernightMarginExcess OrderPreviewDelta
OvernightMarginRequirement OrderPreviewDelta
type OrderPreviewOutcomeUnion interface{…}
Either a successful preview or the error that prevented one, for a single order in the batch.
OrderPreviewOutcomePreview
Preview OrderPreview
The projected impact of the order.
Amount OrderPreviewAmount
BuyingPower OrderPreviewDelta
Equity OrderPreviewDelta
Errors []OrderPreviewError
Risk-check errors that would prevent the order from being accepted. Empty when the order would pass every pre-trade risk check.
MarginDetails OrderPreviewMarginDetails
Margin requirements and excess before and after the order.
InitialMarginExcess OrderPreviewDelta
InitialMarginRequirement OrderPreviewDelta
MaintenanceMarginExcess OrderPreviewDelta
MaintenanceMarginRequirement OrderPreviewDelta
OvernightMarginExcess OrderPreviewDelta
OvernightMarginRequirement OrderPreviewDelta
Positions []OrderPreviewPosition
Positions in the traded instruments before and after the order.
Quantity OrderPreviewDelta
Net position quantity before and after the order.
OrderPreviewOutcomeError
Error APIError
type OrderPreviewPosition struct{…}
One instrument’s position before and after the previewed order. Only the traded instruments appear; cash effects are carried by the monetary fields.
Quantity OrderPreviewDelta
Net position quantity before and after the order.
type OrderStrategyUnion interface{…}
Optional execution strategy controlling how the order is worked in the market. Omit to use standard routing. One of SOR, VWAP, TWAP, or DMA.