pub struct MarketOrderRequest {
pub type: Option<OrderType>,
pub instrument: InstrumentName,
pub units: Decimal,
pub time_in_force: TimeInForce,
pub price_bound: Option<Decimal>,
pub position_fill: OrderPositionFill,
pub client_extensions: Option<ClientExtensions>,
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>,
}Expand description
A MarketOrderRequest specifies the parameters that may be set when creating a Market Order.
Fields§
§type: Option<OrderType>The type of the Order to Create. Must be set to “MARKET” when creating a Market Order.
instrument: InstrumentNameThe Market Order’s Instrument.
units: DecimalThe quantity requested to be filled by the Market Order. A positive number of units results in a long Order, and a negative number of units results in a short Order.
time_in_force: TimeInForceThe time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder.
price_bound: Option<Decimal>The worst price that the client is willing to have the Market Order filled at.
position_fill: OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
client_extensions: Option<ClientExtensions>The client extensions to add to the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.
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.