Skip to content
Get started

Positions

View positions and manage position instructions.

Get Positions
v1.positions.get_positions(intaccount_id, PositionGetPositionsParams**kwargs) -> PositionGetPositionsResponse
GET/v1/accounts/{account_id}/positions
Close Positions
v1.positions.close_positions(intaccount_id, PositionClosePositionsParams**kwargs) -> PositionClosePositionsResponse
DELETE/v1/accounts/{account_id}/positions
Close Position
v1.positions.close_position(InstrumentIDOrSymbolinstrument_id, PositionClosePositionParams**kwargs) -> PositionClosePositionResponse
DELETE/v1/accounts/{account_id}/positions/{instrument_id}
List Position Instructions
v1.positions.get_position_instructions(intaccount_id, PositionGetPositionInstructionsParams**kwargs) -> PositionGetPositionInstructionsResponse
GET/v1/accounts/{account_id}/positions/instructions
Submit Position Instructions
v1.positions.submit_position_instructions(intaccount_id, PositionSubmitPositionInstructionsParams**kwargs) -> PositionSubmitPositionInstructionsResponse
POST/v1/accounts/{account_id}/positions/instructions
Cancel Position Instruction
v1.positions.cancel_position_instruction(strinstruction_id, PositionCancelPositionInstructionParams**kwargs) -> PositionCancelPositionInstructionResponse
DELETE/v1/accounts/{account_id}/positions/instructions/{instruction_id}
ModelsExpand Collapse
class Position:

Represents a holding of a particular instrument in an account

account_id: int

The account this position belongs to

formatint64
available_quantity: str

The quantity of a position that is free to be operated on.

instrument_id: str

OEMS instrument UUID

formatuuid
instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
market_value: str

The current market value of the position

position_type: PositionType

The type of position

One of the following:
"LONG"
"SHORT"
"LONG_CALL"
"SHORT_CALL"
"LONG_PUT"
"SHORT_PUT"
quantity: str

The number of shares or contracts. Can be positive (long) or negative (short)

symbol: str

The trading symbol for the instrument

avg_price: Optional[str]

The average price paid per share or contract for this position

closing_price: Optional[str]

The closing price used to value the position for the last trading day

closing_price_date: Optional[date]

The market date associated with closing_price

formatdate
cost_basis: Optional[str]

The total cost basis for this position

daily_unrealized_pnl: Optional[str]

The unrealized profit or loss for this position relative to the previous close

daily_unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position for the current day, expressed as a percentage of the baseline value (range: 0-100).

instrument_price: Optional[str]

The current market price of the instrument

underlying_instrument_id: Optional[str]

OEMS instrument identifier of the underlying instrument, if resolvable

formatuuid
unrealized_pnl: Optional[str]

The total unrealized profit or loss for this position based on current market value

unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position, expressed as a percentage of the position’s cost basis (range: 0-100).

class PositionInstruction:

A position instruction and its current lifecycle state.

id: str

Server-assigned id. Used as the path parameter on cancel.

formatuuid
account_id: int

Account the instruction belongs to.

formatint64
instruction_id: str

Caller-supplied idempotency key echoed from the submit request; the server-assigned fallback when none was supplied.

instruction_type: PositionInstructionType

The action this instruction requests.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
instrument_id: str

Identifier of the options contract this instruction acts on.

formatuuid
quantity: str

Number of contracts included in the instruction.

Current lifecycle status.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
symbol: str

Options symbol (OSI) for display.

accepted_quantity: Optional[str]

Number of contracts accepted by the clearing venue. Populated once the instruction reaches ACCEPTED.

created_at: Optional[datetime]

When the instruction was first accepted by the service.

formatdate-time
rejection_reason: Optional[str]

Human-readable explanation populated on any non-success terminal status — REJECTED, ENGINE_REJECTED, or CANCEL_FAILED. On a 207 Multi-Status batch submit the top-level error field summarizes the batch; per-row detail continues to live here.

updated_at: Optional[datetime]

When the instruction’s lifecycle state last changed.

formatdate-time
id: str

Server-assigned id. Used as the path parameter on cancel.

formatuuid
account_id: int

Account the instruction belongs to.

formatint64
instruction_id: str

Caller-supplied idempotency key echoed from the submit request; the server-assigned fallback when none was supplied.

instruction_type: PositionInstructionType

The action this instruction requests.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
instrument_id: str

Identifier of the options contract this instruction acts on.

formatuuid
quantity: str

Number of contracts included in the instruction.

Current lifecycle status.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
symbol: str

Options symbol (OSI) for display.

accepted_quantity: Optional[str]

Number of contracts accepted by the clearing venue. Populated once the instruction reaches ACCEPTED.

created_at: Optional[datetime]

When the instruction was first accepted by the service.

formatdate-time
rejection_reason: Optional[str]

Human-readable explanation populated on any non-success terminal status — REJECTED, ENGINE_REJECTED, or CANCEL_FAILED. On a 207 Multi-Status batch submit the top-level error field summarizes the batch; per-row detail continues to live here.

updated_at: Optional[datetime]

When the instruction’s lifecycle state last changed.

formatdate-time
Literal["SENT", "ACCEPTED", "REJECTED", 5 more]

Lifecycle status of a position instruction.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
Literal["EXERCISE", "DO_NOT_EXERCISE", "CONTRARY_EXERCISE"]

The action to take against an options position.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
List[Position]
account_id: int

The account this position belongs to

formatint64
available_quantity: str

The quantity of a position that is free to be operated on.

instrument_id: str

OEMS instrument UUID

formatuuid
instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
market_value: str

The current market value of the position

position_type: PositionType

The type of position

One of the following:
"LONG"
"SHORT"
"LONG_CALL"
"SHORT_CALL"
"LONG_PUT"
"SHORT_PUT"
quantity: str

The number of shares or contracts. Can be positive (long) or negative (short)

symbol: str

The trading symbol for the instrument

avg_price: Optional[str]

The average price paid per share or contract for this position

closing_price: Optional[str]

The closing price used to value the position for the last trading day

closing_price_date: Optional[date]

The market date associated with closing_price

formatdate
cost_basis: Optional[str]

The total cost basis for this position

daily_unrealized_pnl: Optional[str]

The unrealized profit or loss for this position relative to the previous close

daily_unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position for the current day, expressed as a percentage of the baseline value (range: 0-100).

instrument_price: Optional[str]

The current market price of the instrument

underlying_instrument_id: Optional[str]

OEMS instrument identifier of the underlying instrument, if resolvable

formatuuid
unrealized_pnl: Optional[str]

The total unrealized profit or loss for this position based on current market value

unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position, expressed as a percentage of the position’s cost basis (range: 0-100).

Literal["LONG", "SHORT", "LONG_CALL", 3 more]

Position type classification

One of the following:
"LONG"
"SHORT"
"LONG_CALL"
"SHORT_CALL"
"LONG_PUT"
"SHORT_PUT"
class PositionGetPositionsResponse:
account_id: int

The account this position belongs to

formatint64
available_quantity: str

The quantity of a position that is free to be operated on.

instrument_id: str

OEMS instrument UUID

formatuuid
instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
market_value: str

The current market value of the position

position_type: PositionType

The type of position

One of the following:
"LONG"
"SHORT"
"LONG_CALL"
"SHORT_CALL"
"LONG_PUT"
"SHORT_PUT"
quantity: str

The number of shares or contracts. Can be positive (long) or negative (short)

symbol: str

The trading symbol for the instrument

avg_price: Optional[str]

The average price paid per share or contract for this position

closing_price: Optional[str]

The closing price used to value the position for the last trading day

closing_price_date: Optional[date]

The market date associated with closing_price

formatdate
cost_basis: Optional[str]

The total cost basis for this position

daily_unrealized_pnl: Optional[str]

The unrealized profit or loss for this position relative to the previous close

daily_unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position for the current day, expressed as a percentage of the baseline value (range: 0-100).

instrument_price: Optional[str]

The current market price of the instrument

underlying_instrument_id: Optional[str]

OEMS instrument identifier of the underlying instrument, if resolvable

formatuuid
unrealized_pnl: Optional[str]

The total unrealized profit or loss for this position based on current market value

unrealized_pnl_pct: Optional[str]

The unrealized profit/loss for the position, expressed as a percentage of the position’s cost basis (range: 0-100).

class PositionClosePositionsResponse:
data: OrderList
id: str

Engine-assigned unique identifier for this order (UUID).

account_id: int

Account placing the order

formatint64
client_order_id: str

Client-provided identifier echoed back (FIX tag 11).

created_at: datetime

Timestamp when order was created (UTC)

formatdate-time
filled_quantity: str

Cumulative filled quantity

instrument_id: str

OEMS instrument UUID for the traded instrument.

formatuuid
instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
leaves_quantity: str

Remaining unfilled quantity

order_type: OrderType

Type of order (MARKET, LIMIT, etc.)

One of the following:
"MARKET"
"LIMIT"
"STOP"
"STOP_LIMIT"
"TRAILING_STOP"
"TRAILING_STOP_LIMIT"
"OTHER"
quantity: str

Total order quantity

side: Side

Side of the order (BUY, SELL, SELL_SHORT)

One of the following:
"BUY"
"SELL"
"SELL_SHORT"
"OTHER"
status: OrderStatus

Current status of the order

One of the following:
"PENDING_NEW"
"NEW"
"PARTIALLY_FILLED"
"FILLED"
"CANCELED"
"REJECTED"
"EXPIRED"
"PENDING_CANCEL"
"PENDING_REPLACE"
"REPLACED"
"DONE_FOR_DAY"
"STOPPED"
"SUSPENDED"
"CALCULATED"
"OTHER"
symbol: str

Trading symbol

time_in_force: TimeInForce

Time in force instruction

One of the following:
"DAY"
"GOOD_TILL_CANCEL"
"IMMEDIATE_OR_CANCEL"
"FILL_OR_KILL"
"GOOD_TILL_DATE"
"AT_THE_OPENING"
"AT_THE_CLOSE"
"GOOD_TILL_CROSSING"
"GOOD_THROUGH_CROSSING"
"AT_CROSSING"
"OTHER"
updated_at: datetime

Timestamp of the most recent update (UTC)

formatdate-time
venue: str

MIC code of the venue where the order is routed

average_fill_price: Optional[str]

Average fill price across all executions

details: Optional[List[str]]

Contains execution, rejection or cancellation details, if any

expires_at: Optional[datetime]

Timestamp when the order will expire (UTC). Present when time_in_force is GOOD_TILL_DATE.

formatdate-time
extended_hours: Optional[bool]

Whether the order is eligible for extended-hours trading.

limit_offset: Optional[str]

Limit offset for trailing stop-limit orders (signed)

limit_price: Optional[str]

Limit price (for LIMIT and STOP_LIMIT orders)

queue_state: Optional[QueueState]

Parent order queue state, present when the order is awaiting release or released.

One of the following:
"AWAITING_RELEASE"
"RELEASED"
releases_at: Optional[datetime]

Scheduled release time for orders awaiting release.

formatdate-time
stop_price: Optional[str]

Stop price (for STOP and STOP_LIMIT orders)

trailing_limit_px: Optional[str]

Current trailing limit price computed by the trailing strategy

trailing_offset: Optional[str]

Trailing offset amount for trailing orders

trailing_offset_type: Optional[TrailingOffsetType]

Trailing offset type for trailing orders

One of the following:
"PRICE"
"BPS"
trailing_stop_px: Optional[str]

Current trailing stop price computed by the trailing strategy

trailing_watermark_px: Optional[str]

Trailing watermark price for trailing orders

trailing_watermark_ts: Optional[datetime]

Trailing watermark timestamp for trailing orders

formatdate-time
underlying_instrument_id: Optional[str]

OEMS instrument ID of the option’s underlying instrument. Populated only for OPTIONS orders; null for non-options and for options whose underlier cannot be resolved from the instrument cache.

formatuuid
class PositionClosePositionResponse:
data: OrderList
id: str

Engine-assigned unique identifier for this order (UUID).

account_id: int

Account placing the order

formatint64
client_order_id: str

Client-provided identifier echoed back (FIX tag 11).

created_at: datetime

Timestamp when order was created (UTC)

formatdate-time
filled_quantity: str

Cumulative filled quantity

instrument_id: str

OEMS instrument UUID for the traded instrument.

formatuuid
instrument_type: SecurityType

Type of security

One of the following:
"COMMON_STOCK"
"PREFERRED_STOCK"
"OPTION"
"CASH"
"OTHER"
leaves_quantity: str

Remaining unfilled quantity

order_type: OrderType

Type of order (MARKET, LIMIT, etc.)

One of the following:
"MARKET"
"LIMIT"
"STOP"
"STOP_LIMIT"
"TRAILING_STOP"
"TRAILING_STOP_LIMIT"
"OTHER"
quantity: str

Total order quantity

side: Side

Side of the order (BUY, SELL, SELL_SHORT)

One of the following:
"BUY"
"SELL"
"SELL_SHORT"
"OTHER"
status: OrderStatus

Current status of the order

One of the following:
"PENDING_NEW"
"NEW"
"PARTIALLY_FILLED"
"FILLED"
"CANCELED"
"REJECTED"
"EXPIRED"
"PENDING_CANCEL"
"PENDING_REPLACE"
"REPLACED"
"DONE_FOR_DAY"
"STOPPED"
"SUSPENDED"
"CALCULATED"
"OTHER"
symbol: str

Trading symbol

time_in_force: TimeInForce

Time in force instruction

One of the following:
"DAY"
"GOOD_TILL_CANCEL"
"IMMEDIATE_OR_CANCEL"
"FILL_OR_KILL"
"GOOD_TILL_DATE"
"AT_THE_OPENING"
"AT_THE_CLOSE"
"GOOD_TILL_CROSSING"
"GOOD_THROUGH_CROSSING"
"AT_CROSSING"
"OTHER"
updated_at: datetime

Timestamp of the most recent update (UTC)

formatdate-time
venue: str

MIC code of the venue where the order is routed

average_fill_price: Optional[str]

Average fill price across all executions

details: Optional[List[str]]

Contains execution, rejection or cancellation details, if any

expires_at: Optional[datetime]

Timestamp when the order will expire (UTC). Present when time_in_force is GOOD_TILL_DATE.

formatdate-time
extended_hours: Optional[bool]

Whether the order is eligible for extended-hours trading.

limit_offset: Optional[str]

Limit offset for trailing stop-limit orders (signed)

limit_price: Optional[str]

Limit price (for LIMIT and STOP_LIMIT orders)

queue_state: Optional[QueueState]

Parent order queue state, present when the order is awaiting release or released.

One of the following:
"AWAITING_RELEASE"
"RELEASED"
releases_at: Optional[datetime]

Scheduled release time for orders awaiting release.

formatdate-time
stop_price: Optional[str]

Stop price (for STOP and STOP_LIMIT orders)

trailing_limit_px: Optional[str]

Current trailing limit price computed by the trailing strategy

trailing_offset: Optional[str]

Trailing offset amount for trailing orders

trailing_offset_type: Optional[TrailingOffsetType]

Trailing offset type for trailing orders

One of the following:
"PRICE"
"BPS"
trailing_stop_px: Optional[str]

Current trailing stop price computed by the trailing strategy

trailing_watermark_px: Optional[str]

Trailing watermark price for trailing orders

trailing_watermark_ts: Optional[datetime]

Trailing watermark timestamp for trailing orders

formatdate-time
underlying_instrument_id: Optional[str]

OEMS instrument ID of the option’s underlying instrument. Populated only for OPTIONS orders; null for non-options and for options whose underlier cannot be resolved from the instrument cache.

formatuuid
class PositionGetPositionInstructionsResponse:
id: str

Server-assigned id. Used as the path parameter on cancel.

formatuuid
account_id: int

Account the instruction belongs to.

formatint64
instruction_id: str

Caller-supplied idempotency key echoed from the submit request; the server-assigned fallback when none was supplied.

instruction_type: PositionInstructionType

The action this instruction requests.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
instrument_id: str

Identifier of the options contract this instruction acts on.

formatuuid
quantity: str

Number of contracts included in the instruction.

Current lifecycle status.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
symbol: str

Options symbol (OSI) for display.

accepted_quantity: Optional[str]

Number of contracts accepted by the clearing venue. Populated once the instruction reaches ACCEPTED.

created_at: Optional[datetime]

When the instruction was first accepted by the service.

formatdate-time
rejection_reason: Optional[str]

Human-readable explanation populated on any non-success terminal status — REJECTED, ENGINE_REJECTED, or CANCEL_FAILED. On a 207 Multi-Status batch submit the top-level error field summarizes the batch; per-row detail continues to live here.

updated_at: Optional[datetime]

When the instruction’s lifecycle state last changed.

formatdate-time
class PositionSubmitPositionInstructionsResponse:
id: str

Server-assigned id. Used as the path parameter on cancel.

formatuuid
account_id: int

Account the instruction belongs to.

formatint64
instruction_id: str

Caller-supplied idempotency key echoed from the submit request; the server-assigned fallback when none was supplied.

instruction_type: PositionInstructionType

The action this instruction requests.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
instrument_id: str

Identifier of the options contract this instruction acts on.

formatuuid
quantity: str

Number of contracts included in the instruction.

Current lifecycle status.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
symbol: str

Options symbol (OSI) for display.

accepted_quantity: Optional[str]

Number of contracts accepted by the clearing venue. Populated once the instruction reaches ACCEPTED.

created_at: Optional[datetime]

When the instruction was first accepted by the service.

formatdate-time
rejection_reason: Optional[str]

Human-readable explanation populated on any non-success terminal status — REJECTED, ENGINE_REJECTED, or CANCEL_FAILED. On a 207 Multi-Status batch submit the top-level error field summarizes the batch; per-row detail continues to live here.

updated_at: Optional[datetime]

When the instruction’s lifecycle state last changed.

formatdate-time
class PositionCancelPositionInstructionResponse:

A position instruction and its current lifecycle state.

id: str

Server-assigned id. Used as the path parameter on cancel.

formatuuid
account_id: int

Account the instruction belongs to.

formatint64
instruction_id: str

Caller-supplied idempotency key echoed from the submit request; the server-assigned fallback when none was supplied.

instruction_type: PositionInstructionType

The action this instruction requests.

One of the following:
"EXERCISE"
"DO_NOT_EXERCISE"
"CONTRARY_EXERCISE"
instrument_id: str

Identifier of the options contract this instruction acts on.

formatuuid
quantity: str

Number of contracts included in the instruction.

Current lifecycle status.

One of the following:
"SENT"
"ACCEPTED"
"REJECTED"
"ENGINE_REJECTED"
"CANCEL_REQUESTED"
"CANCELLED"
"CANCEL_FAILED"
"UNKNOWN"
symbol: str

Options symbol (OSI) for display.

accepted_quantity: Optional[str]

Number of contracts accepted by the clearing venue. Populated once the instruction reaches ACCEPTED.

created_at: Optional[datetime]

When the instruction was first accepted by the service.

formatdate-time
rejection_reason: Optional[str]

Human-readable explanation populated on any non-success terminal status — REJECTED, ENGINE_REJECTED, or CANCEL_FAILED. On a 207 Multi-Status batch submit the top-level error field summarizes the batch; per-row detail continues to live here.

updated_at: Optional[datetime]

When the instruction’s lifecycle state last changed.

formatdate-time