Skip to content

OrderDTO

stonepy.models.OrderDTO.OrderDTO

Bases: ResponseModel

An order for a specific Trading Account.

order_id class-attribute instance-attribute

order_id: int | None = Field(default=None, alias='OrderId')

The Order identifier.

market_id class-attribute instance-attribute

market_id: int | None = Field(
    default=None, alias="MarketId"
)

The Market identifier.

client_account_id class-attribute instance-attribute

client_account_id: int | None = Field(
    default=None, alias="ClientAccountId"
)

Client account ID.

trading_account_id class-attribute instance-attribute

trading_account_id: int | None = Field(
    default=None, alias="TradingAccountId"
)

Trading account ID.

currency_id class-attribute instance-attribute

currency_id: int | None = Field(
    default=None, alias="CurrencyId"
)

Trade currency ID.

currency_iso class-attribute instance-attribute

currency_iso: str | None = Field(
    default=None, alias="CurrencyISO"
)

Trade currency ISO code.

direction class-attribute instance-attribute

direction: int | None = Field(
    default=None, alias="Direction"
)

Direction of the order (1 == buy, 0 == sell).

auto_rollover class-attribute instance-attribute

auto_rollover: bool | None = Field(
    default=None, alias="AutoRollover"
)

Flag indicating whether the order automatically rolls over. Only applies to markets where the underlying is a futures contract.

execution_price class-attribute instance-attribute

execution_price: Decimal | None = Field(
    default=None, alias="ExecutionPrice"
)

The price at which the order was executed.

last_changed_time class-attribute instance-attribute

last_changed_time: StoneXDateTime | None = Field(
    default=None, alias="LastChangedTime"
)

The date and time that the order was last changed. Always expressed in UTC.

open_price class-attribute instance-attribute

open_price: Decimal | None = Field(
    default=None, alias="OpenPrice"
)

The open price of the order.

original_last_changed_date_time class-attribute instance-attribute

original_last_changed_date_time: StoneXDateTime | None = (
    Field(default=None, alias="OriginalLastChangedDateTime")
)

The date of the order. Always expressed in UTC.

original_quantity class-attribute instance-attribute

original_quantity: Decimal | None = Field(
    default=None, alias="OriginalQuantity"
)

The orders original quantity, before any part / full closures.

position_method_id class-attribute instance-attribute

position_method_id: int | None = Field(
    default=None, alias="PositionMethodId"
)

Indicates the position of the trade. 1 == LongOrShortOnly, 2 == LongAndShort.

quantity class-attribute instance-attribute

quantity: Decimal | None = Field(
    default=None, alias="Quantity"
)

The current quantity of the order.

type class-attribute instance-attribute

type: str | None = Field(default=None, alias='Type')

The type of the order (1 = Trade / 2 = Stop / 3 = Limit) . The table of lookup codes can be found at Lookup Values .

status class-attribute instance-attribute

status: str | None = Field(default=None, alias='Status')

The order status ID. The table of lookup codes can be found at Lookup Values .

reason_id class-attribute instance-attribute

reason_id: int | None = Field(
    default=None, alias="ReasonId"
)

The order status reason identifier. The table of lookup codes can be found at Lookup Values .