Skip to content

TradeMarginDTO

stonepy.models.TradeMarginDTO.TradeMarginDTO

Bases: ResponseModel

The current margin requirement and open trade equity (OTE) of an order, used in the TradeMargin stream.

client_account_id class-attribute instance-attribute

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

The client account this message relates to.

direction_id class-attribute instance-attribute

direction_id: int | None = Field(
    default=None, alias="DirectionId"
)

The order direction, 1 == Buy and 0 == Sell.

margin_requirement_converted class-attribute instance-attribute

margin_requirement_converted: Decimal | None = Field(
    default=None, alias="MarginRequirementConverted"
)

The margin requirement converted to the correct currency for this order.

margin_requirement_converted_currency_id class-attribute instance-attribute

margin_requirement_converted_currency_id: int | None = (
    Field(
        default=None,
        alias="MarginRequirementConvertedCurrencyId",
    )
)

The currency ID of the margin requirement for this order. See the "Currency ID" section of the StoneX API User Guide for a listing of the currency IDs.

margin_requirement_converted_currency_iso_code class-attribute instance-attribute

margin_requirement_converted_currency_iso_code: (
    str | None
) = Field(
    default=None,
    alias="MarginRequirementConvertedCurrencyISOCode",
)

The currency ISO code of the margin requirement for this order.

market_id class-attribute instance-attribute

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

The market ID the order is on.

market_type_id class-attribute instance-attribute

market_type_id: int | None = Field(
    default=None, alias="MarketTypeId"
)

The market type ID. 1 = Option Market; 2 = Ordinary Market; 4 = Binary Market.

multiplier class-attribute instance-attribute

multiplier: Decimal | None = Field(
    default=None, alias="Multiplier"
)

The margin multiplier.

order_id class-attribute instance-attribute

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

The Order ID.

ote_converted class-attribute instance-attribute

ote_converted: Decimal | None = Field(
    default=None, alias="OTEConverted"
)

The Open Trade Equity converted to the correct currency for this order.

ote_converted_currency_id class-attribute instance-attribute

ote_converted_currency_id: int | None = Field(
    default=None, alias="OTEConvertedCurrencyId"
)

The currency ID of the OTE for this order. See the "Currency ID" section of the StoneX API User Guide for a listing of the currency IDs.

ote_converted_currency_iso_code class-attribute instance-attribute

ote_converted_currency_iso_code: str | None = Field(
    default=None, alias="OTEConvertedCurrencyISOCode"
)

The currency ISO code of the OTE for this order.

price_calculated_at class-attribute instance-attribute

price_calculated_at: Decimal | None = Field(
    default=None, alias="PriceCalculatedAt"
)

The price the calculation was performed at.

price_taken_at class-attribute instance-attribute

price_taken_at: Decimal | None = Field(
    default=None, alias="PriceTakenAt"
)

The price the order was taken at.

price_calculated_at_in_ticks class-attribute instance-attribute

price_calculated_at_in_ticks: Decimal | None = Field(
    default=None, alias="PriceCalculatedAtInTicks"
)

The price the calculation was performed at in ticks.

price_taken_at_in_ticks class-attribute instance-attribute

price_taken_at_in_ticks: Decimal | None = Field(
    default=None, alias="PriceTakenAtInTicks"
)

The price the order was taken at in ticks.

quantity class-attribute instance-attribute

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

The quantity of the order.