pub struct FixedPriceOrder {Show 22 fields
pub id: Option<OrderID>,
pub create_time: Option<Timestamp>,
pub state: Option<OrderState>,
pub client_extensions: Option<ClientExtensions>,
pub type: Option<OrderType>,
pub instrument: InstrumentName,
pub units: Decimal,
pub price: Decimal,
pub position_fill: OrderPositionFill,
pub trade_state: String,
pub take_profit_on_fill: Option<TakeProfitDetails>,
pub stop_loss_on_fill: Option<StopLossDetails>,
pub guaranteed_stop_loss_on_fill: Option<GuaranteedStopLossDetails>,
pub trailing_stop_loss_on_fill: Option<TrailingStopLossDetails>,
pub trade_client_extensions: Option<ClientExtensions>,
pub filling_transaction_id: Option<TransactionID>,
pub filled_time: Option<Timestamp>,
pub trade_opened_id: Option<TradeID>,
pub trade_reduced_id: Option<TradeID>,
pub trade_closed_ids: Option<Vec<TradeID>>,
pub cancelling_transaction_id: Option<TransactionID>,
pub cancelled_time: Option<Timestamp>,
}Expand description
A FixedPriceOrder is an order that is filled immediately upon creation using a fixed price.
Fields§
§id: Option<OrderID>The Order’s identifier, unique within the Order’s Account.
create_time: Option<Timestamp>The time when the Order was created.
state: Option<OrderState>The current state of the Order.
client_extensions: Option<ClientExtensions>The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.
type: Option<OrderType>The type of the Order. Always set to “FIXED_PRICE” for Fixed Price Orders.
instrument: InstrumentNameThe Fixed Price Order’s Instrument.
units: DecimalThe quantity requested to be filled by the Fixed Price Order. A positive number of units results in a long Order, and a negative number of units results in a short Order.
price: DecimalThe price specified for the Fixed Price Order. This price is the exact price that the Fixed Price Order will be filled at.
position_fill: OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
trade_state: StringThe state that the trade resulting from the Fixed Price Order should be set to.
take_profit_on_fill: Option<TakeProfitDetails>TakeProfitDetails specifies the details of a Take Profit Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Take Profit, or when a Trade’s dependent Take Profit Order is modified directly through the Trade.
stop_loss_on_fill: Option<StopLossDetails>StopLossDetails specifies the details of a Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Stop Loss, or when a Trade’s dependent Stop Loss Order is modified directly through the Trade.
guaranteed_stop_loss_on_fill: Option<GuaranteedStopLossDetails>GuaranteedStopLossDetails specifies the details of a Guaranteed Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Guaranteed Stop Loss, or when a Trade’s dependent Guaranteed Stop Loss Order is modified directly through the Trade.
trailing_stop_loss_on_fill: Option<TrailingStopLossDetails>TrailingStopLossDetails specifies the details of a Trailing Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade’s dependent Trailing Stop Loss Order is modified directly through the Trade.
trade_client_extensions: Option<ClientExtensions>Client Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, or delete tradeClientExtensions if your account is associated with MT4.
filling_transaction_id: Option<TransactionID>ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)
filled_time: Option<Timestamp>Date/time when the Order was filled (only provided when the Order’s state is FILLED)
trade_opened_id: Option<TradeID>Trade ID of Trade opened when the Order was filled (only provided when the Order’s state is FILLED and a Trade was opened as a result of the fill)
trade_reduced_id: Option<TradeID>Trade ID of Trade reduced when the Order was filled (only provided when the Order’s state is FILLED and a Trade was reduced as a result of the fill)
trade_closed_ids: Option<Vec<TradeID>>Trade IDs of Trades closed when the Order was filled (only provided when the Order’s state is FILLED and one or more Trades were closed as a result of the fill)
cancelling_transaction_id: Option<TransactionID>ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)
cancelled_time: Option<Timestamp>Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)