ApiTradeHistoryDTO¶
stonepy.models.ApiTradeHistoryDTO.ApiTradeHistoryDTO
¶
Bases: ResponseModel
Details of a previous trade for use in the Trade History.
order_id
class-attribute
instance-attribute
¶
The order ID.
opening_order_ids
class-attribute
instance-attribute
¶
The orders that are being closed / part closed by this order.
market_id
class-attribute
instance-attribute
¶
The market ID.
market_name
class-attribute
instance-attribute
¶
The name of the market.
direction
class-attribute
instance-attribute
¶
The direction of the trade, Buy or Sell .
original_quantity
class-attribute
instance-attribute
¶
The original quantity of the trade, before part closures.
quantity
class-attribute
instance-attribute
¶
The current quantity of the trade.
price
class-attribute
instance-attribute
¶
The open price of the trade.
trading_account_id
class-attribute
instance-attribute
¶
The Trading Account ID that the order is on.
currency
class-attribute
instance-attribute
¶
The trade currency.
realised_pnl
class-attribute
instance-attribute
¶
The realised profit and loss (P&L).
realised_pnl_currency
class-attribute
instance-attribute
¶
The realised P&L currency.
last_changed_date_time_utc
class-attribute
instance-attribute
¶
last_changed_date_time_utc: StoneXDateTime | None = Field(
default=None, alias="LastChangedDateTimeUtc"
)
Represents the date and time when the trade/order was last edited. Note: does not include things such as the current market price.
executed_date_time_utc
class-attribute
instance-attribute
¶
The time that the order was executed.
trade_reference
class-attribute
instance-attribute
¶
An alternative trade reference.
managed_trades
class-attribute
instance-attribute
¶
managed_trades: list[ApiManagedTradeHistoryDTO] | None = (
Field(default=None, alias="ManagedTrades")
)
The list of constituent trades for Trading Advisor managed positions (if applicable) .
order_reference
class-attribute
instance-attribute
¶
The order reference for this trade.
source
class-attribute
instance-attribute
¶
The source for this trade i.e. FIX/MT4/G2.
is_close_by
class-attribute
instance-attribute
¶
Flag to indicate if this order was closed or used to close another order.
liquidation
class-attribute
instance-attribute
¶
Flag to indicate if this order was placed to liquidate a position.
fixed_initial_margin
class-attribute
instance-attribute
¶
The fixed amount of trading resources used to place the trade.