Order

class async_v20.Order(id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, trade_id: TradeID= sentinel, price: PriceValue= sentinel, type: OrderType= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel, distance: PriceValue= sentinel, trailing_stop_value: PriceValue= sentinel, instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, partial_fill: str= sentinel, position_fill: OrderPositionFill= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel, price_bound: PriceValue= sentinel, initial_market_price: PriceValue= sentinel, trade_close: MarketOrderTradeClose= sentinel, long_position_closeout: MarketOrderPositionCloseout= sentinel, short_position_closeout: MarketOrderPositionCloseout= sentinel, margin_closeout: MarketOrderMarginCloseout= sentinel, delayed_trade_close: MarketOrderDelayedTradeClose= sentinel, trigger_distance: PriceValue= sentinel, is_trigger_distance_exact: bool= sentinel, guaranteed: bool= sentinel)[source]

Bases: async_v20.definitions.base.Model

The base Order definition. Contains all possible attributes an Order may contain

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

trade_id

TradeID

price

PriceValue

type

OrderType

client_trade_id

ClientID

time_in_force

TimeInForce

gtd_time

DateTime

trigger_condition

OrderTriggerCondition

filling_transaction_id

TransactionID

filled_time

DateTime

trade_opened_id

TradeID

trade_reduced_id

TradeID

trade_closed_ids

( TradeID, …),

cancelling_transaction_id

TransactionID

cancelled_time

DateTime

replaces_order_id

OrderID

replaced_by_order_id

OrderID

distance

PriceValue

trailing_stop_value

PriceValue

instrument

InstrumentName

units

DecimalNumber

partial_fill

str

position_fill

OrderPositionFill

take_profit_on_fill

TakeProfitDetails

stop_loss_on_fill

StopLossDetails

trailing_stop_loss_on_fill

TrailingStopLossDetails

trade_client_extensions

ClientExtensions

price_bound

PriceValue

initial_market_price

PriceValue

trade_close

MarketOrderTradeClose

long_position_closeout

MarketOrderPositionCloseout

short_position_closeout

MarketOrderPositionCloseout

margin_closeout

MarketOrderMarginCloseout

delayed_trade_close

MarketOrderDelayedTradeClose

trigger_distance

PriceValue

is_trigger_distance_exact

bool

class async_v20.MarketOrder(instrument: InstrumentName, units: DecimalNumber, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, time_in_force: TimeInForce=FOK, price_bound: PriceValue= sentinel, position_fill: OrderPositionFill=DEFAULT, trade_close: MarketOrderTradeClose= sentinel, long_position_closeout: MarketOrderPositionCloseout= sentinel, short_position_closeout: MarketOrderPositionCloseout= sentinel, margin_closeout: MarketOrderMarginCloseout= sentinel, delayed_trade_close: MarketOrderDelayedTradeClose= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel)[source]

Bases: async_v20.definitions.types.Order

A MarketOrder is an order that is filled immediately upon creation using the current market price.

instrument

InstrumentName The Market Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the Market Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

time_in_force

TimeInForce The time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder.

price_bound

PriceValue The worst price that the client is willing to have the Market Order filled at.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trade_close

MarketOrderTradeClose Details of the Trade requested to be closed, only provided when the Market Order is being used to explicitly close a Trade.

long_position_closeout

MarketOrderPositionCloseout Details of the long Position requested to be closed out, only provided when a Market Order is being used to explicitly closeout a long Position.

short_position_closeout

MarketOrderPositionCloseout Details of the short Position requested to be closed out, only provided when a Market Order is being used to explicitly closeout a short Position.

margin_closeout

MarketOrderMarginCloseout Details of the Margin Closeout that this Market Order was created for

delayed_trade_close

MarketOrderDelayedTradeClose Details of the delayed Trade close that this Market Order was created for

take_profit_on_fill

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

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.

trailing_stop_loss_on_fill

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

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

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

class async_v20.LimitOrder(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A LimitOrder is an order that is created with a price threshold, and will only be filled by a price that is equal to or better than the threshold.

instrument

InstrumentName The Limit Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the Limit Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the Limit Order. The Limit Order will only be filled by a market price that is equal to or better than this price.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

time_in_force

TimeInForce The time-in-force requested for the Limit Order.

gtd_time

DateTime The date/time when the Limit Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

take_profit_on_fill

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

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.

trailing_stop_loss_on_fill

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

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

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.StopOrder(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A StopOrder is an order that is created with a price threshold, and will only be filled by a price that is equal to or worse than the threshold.

instrument

InstrumentName The Stop Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the Stop Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the Stop Order. The Stop Order will only be filled by a market price that is equal to or worse than this price.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

price_bound

PriceValue The worst market price that may be used to fill this Stop Order. If the market gaps and crosses through both the price and the priceBound, the Stop Order will be cancelled instead of being filled.

time_in_force

TimeInForce The time-in-force requested for the Stop Order.

gtd_time

DateTime The date/time when the Stop Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

take_profit_on_fill

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

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.

trailing_stop_loss_on_fill

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

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

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.MarketIfTouchedOrder(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, initial_market_price: PriceValue= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A MarketIfTouchedOrder is an order that is created with a price threshold, and will only be filled by a market price that is touches or crosses the threshold.

instrument

InstrumentName The MarketIfTouched Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the MarketIfTouched Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the MarketIfTouched Order. The MarketIfTouched Order will only be filled by a market price that crosses this price from the direction of the market price at the time when the Order was created (the initialMarketPrice). Depending on the value of the Order’s price and initialMarketPrice, the MarketIfTouchedOrder will behave like a Limit or a Stop Order.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

price_bound

PriceValue The worst market price that may be used to fill this MarketIfTouched Order.

time_in_force

TimeInForce The time-in-force requested for the MarketIfTouched Order. Restricted to “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.

gtd_time

DateTime The date/time when the MarketIfTouched Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

initial_market_price

PriceValue The Market price at the time when the MarketIfTouched Order was created.

take_profit_on_fill

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

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.

trailing_stop_loss_on_fill

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

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

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.TakeProfitOrder(trade_id: TradeID, price: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A TakeProfitOrder is an order that is linked to an open Trade and created with a price threshold. The Order will be filled (closing the Trade) by the first price that is equal to or better than the threshold. A TakeProfitOrder cannot be used to open a new Position.

trade_id

TradeID The ID of the Trade to close when the price threshold is breached.

price

PriceValue The price threshold specified for the TakeProfit Order. The associated Trade will be closed by a market price that is equal to or better than this threshold.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

client_trade_id

ClientID The client ID of the Trade to be closed when the price threshold is breached.

time_in_force

TimeInForce The time-in-force requested for the TakeProfit Order. Restricted to “GTC”, “GFD” and “GTD” for TakeProfit Orders.

gtd_time

DateTime The date/time when the TakeProfit Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

filling_transaction_id

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.StopLossOrder(trade_id: TradeID, price: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, guaranteed: bool= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A StopLossOrder is an order that is linked to an open Trade and created with a price threshold. The Order will be filled (closing the Trade) by the first price that is equal to or worse than the threshold. A StopLossOrder cannot be used to open a new Position.

:class:`~async_v20.TradeID`

The ID of the Trade to close when the price threshold is breached.

price

PriceValue The price threshold specified for the StopLoss Order. The associated Trade will be closed by a market price that is equal to or worse than this threshold.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

client_:class:`~async_v20.TradeID`

The client ID of the Trade to be closed when the price threshold is breached.

time_in_force

TimeInForce The time-in-force requested for the StopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for StopLoss Orders.

gtd_time

DateTime The date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

guaranteed
Class:bool

Flag indicating that the Stop Loss Order is guaranteed. The default value depends on the GuaranteedStopLossOrderMode of the account, if it is REQUIRED, the default will be true, for DISABLED or ENABLED the default is false.

filling_transaction_id

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.TrailingStopLossOrder(trade_id: TradeID, distance: PriceValue, id: OrderID= sentinel, create_time: DateTime= sentinel, state: OrderState= sentinel, client_extensions: ClientExtensions= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, trailing_stop_value: PriceValue= sentinel, filling_transaction_id: TransactionID= sentinel, filled_time: DateTime= sentinel, trade_opened_id: TradeID= sentinel, trade_reduced_id: TradeID= sentinel, trade_closed_ids: ArrayTradeID= sentinel, cancelling_transaction_id: TransactionID= sentinel, cancelled_time: DateTime= sentinel, replaces_order_id: OrderID= sentinel, replaced_by_order_id: OrderID= sentinel)[source]

Bases: async_v20.definitions.types.Order

A TrailingStopLossOrder is an order that is linked to an open Trade and created with a price distance. The price distance is used to calculate a trailing stop value for the order that is in the losing direction from the market price at the time of the order’s creation. The trailing stop value will follow the market price as it moves in the winning direction, and the order will filled (closing the Trade) by the first price that is equal to or worse than the trailing stop value. A TrailingStopLossOrder cannot be used to open a new Position.

:class:`~async_v20.TradeID`

The ID of the Trade to close when the price threshold is breached.

distance

PriceValue The price distance specified for the TrailingStopLoss Order.

id

OrderID The Order’s identifier, unique within the Order’s Account.

create_time

DateTime The time when the Order was created.

state

OrderState The current state of the Order.

client_extensions

ClientExtensions The client extensions of the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

client_:class:`~async_v20.TradeID`

The client ID of the Trade to be closed when the price threshold is breached.

time_in_force

TimeInForce The time-in-force requested for the TrailingStopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.

gtd_time

DateTime The date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

trailing_stop_value

PriceValue The trigger price for the Trailing Stop Loss Order. The trailing stop value will trail (follow) the market price by the TSL order’s configured “distance” as the market price moves in the winning direction. If the market price moves to a level that is equal to or worse than the trailing stop value, the order will be filled and the Trade will be closed.

filling_transaction_id

TransactionID ID of the Transaction that filled this Order (only provided when the Order’s state is FILLED)

filled_time

DateTime Date/time when the Order was filled (only provided when the Order’s state is FILLED)

trade_opened_id

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

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

( 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

TransactionID ID of the Transaction that cancelled the Order (only provided when the Order’s state is CANCELLED)

cancelled_time

DateTime Date/time when the Order was cancelled (only provided when the state of the Order is CANCELLED)

replaces_order_id

OrderID The ID of the Order that was replaced by this Order (only provided if this Order was created as part of a cancel/replace).

replaced_by_order_id

OrderID The ID of the Order that replaced this Order (only provided if this Order was cancelled as part of a cancel/replace).

class async_v20.OrderRequest(instrument: InstrumentName, trade_id: TradeID= sentinel, price: PriceValue= sentinel, type: OrderType= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition= sentinel, client_extensions: ClientExtensions= sentinel, distance: PriceValue= sentinel, units: DecimalNumber= sentinel, price_bound: PriceValue= sentinel, position_fill: OrderPositionFill= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.base.Model

The base Order specification. Contains all attributes an OrderRequest may contain.

instrument

InstrumentName

trade_id

TradeID

price

PriceValue

type

OrderType

client_trade_id

ClientID

time_in_force

TimeInForce

gtd_time

DateTime

trigger_condition

OrderTriggerCondition

client_extensions

ClientExtensions

distance

PriceValue

instrument

InstrumentName

units

DecimalNumber

price_bound

PriceValue

position_fill

OrderPositionFill

take_profit_on_fill

TakeProfitDetails

stop_loss_on_fill

StopLossDetails

trailing_stop_loss_on_fill

TrailingStopLossDetails

trade_client_extensions

ClientExtensions

class async_v20.MarketOrderRequest(instrument: InstrumentName, units: DecimalNumber, time_in_force: TimeInForce=FOK, price_bound: PriceValue= sentinel, position_fill: OrderPositionFill=DEFAULT, client_extensions: ClientExtensions= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A MarketOrderRequest specifies the parameters that may be set when creating a Market Order.

instrument

InstrumentName The Market Order’s Instrument.

units

DecimalNumber The 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

TimeInForce The time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder.

price_bound

PriceValue The worst price that the client is willing to have the Market Order filled at.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

client_extensions

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

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

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.

trailing_stop_loss_on_fill

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

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.

class async_v20.LimitOrderRequest(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A LimitOrderRequest specifies the parameters that may be set when creating a Limit Order.

instrument

InstrumentName The Limit Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the Limit Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the Limit Order. The Limit Order will only be filled by a market price that is equal to or better than this price.

time_in_force

TimeInForce The time-in-force requested for the Limit Order.

gtd_time

DateTime The date/time when the Limit Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

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

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

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.

trailing_stop_loss_on_fill

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

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.

class async_v20.StopOrderRequest(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A StopOrderRequest specifies the parameters that may be set when creating a Stop Order.

instrument

InstrumentName The Stop Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the Stop Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the Stop Order. The Stop Order will only be filled by a market price that is equal to or worse than this price.

price_bound

PriceValue The worst market price that may be used to fill this Stop Order. If the market gaps and crosses through both the price and the priceBound, the Stop Order will be cancelled instead of being filled.

time_in_force

TimeInForce The time-in-force requested for the Stop Order.

gtd_time

DateTime The date/time when the Stop Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

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

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

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.

trailing_stop_loss_on_fill

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

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.

class async_v20.MarketIfTouchedOrderRequest(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel, take_profit_on_fill: TakeProfitDetails= sentinel, stop_loss_on_fill: StopLossDetails= sentinel, trailing_stop_loss_on_fill: TrailingStopLossDetails= sentinel, trade_client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A MarketIfTouchedOrderRequest specifies the parameters that may be set when creating a Market-if-Touched Order.

instrument

InstrumentName The MarketIfTouched Order’s Instrument.

units

DecimalNumber The quantity requested to be filled by the MarketIfTouched Order. A posititive number of units results in a long Order, and a negative number of units results in a short Order.

price

PriceValue The price threshold specified for the MarketIfTouched Order. The MarketIfTouched Order will only be filled by a market price that crosses this price from the direction of the market price at the time when the Order was created (the initialMarketPrice). Depending on the value of the Order’s price and initialMarketPrice, the MarketIfTouchedOrder will behave like a Limit or a Stop Order.

price_bound

PriceValue The worst market price that may be used to fill this MarketIfTouched Order.

time_in_force

TimeInForce The time-in-force requested for the MarketIfTouched Order. Restricted to “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.

gtd_time

DateTime The date/time when the MarketIfTouched Order will be cancelled if its timeInForce is “GTD”.

position_fill

OrderPositionFill Specification of how Positions in the Account are modified when the Order is filled.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

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

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

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.

trailing_stop_loss_on_fill

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

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.

class async_v20.TakeProfitOrderRequest(instrument: InstrumentName, trade_id: TradeID, price: PriceValue, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A TakeProfitOrderRequest specifies the parameters that may be set when creating a Take Profit Order.

instrument

InstrumentName The TakeProfitOrderRequest instrument.

trade_id

TradeID The ID of the Trade to close when the price threshold is breached.

client_trade_id

TradeID The client ID of the Trade to be closed when the price threshold is breached.

price

PriceValue The price threshold specified for the TakeProfit Order. The associated Trade will be closed by a market price that is equal to or better than this threshold.

time_in_force

TimeInForce The time-in-force requested for the TakeProfit Order. Restricted to “GTC”, “GFD” and “GTD” for TakeProfit Orders.

gtd_time

DateTime The date/time when the TakeProfit Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

ClientExtensions The client extensions to add to the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

class async_v20.StopLossOrderRequest(instrument: InstrumentName, trade_id: TradeID, price: PriceValue, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A StopLossOrderRequest specifies the parameters that may be set when creating a Stop Loss Order.

instrument

InstrumentName The StopLossOrderRequest instrument.

trade_id

TradeID The ID of the Trade to close when the price threshold is breached.

client_trade_id

TradeID The client ID of the Trade to be closed when the price threshold is breached.

price

PriceValue The price threshold specified for the StopLoss Order. The associated Trade will be closed by a market price that is equal to or worse than this threshold.

time_in_force

TimeInForce The time-in-force requested for the StopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for StopLoss Orders.

gtd_time

DateTime The date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

ClientExtensions The client extensions to add to the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

class async_v20.TrailingStopLossOrderRequest(instrument: InstrumentName, trade_id: TradeID, distance: PriceValue, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, client_extensions: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.OrderRequest

A TrailingStopLossOrderRequest specifies the parameters that may be set when creating a Trailing Stop Loss Order.

instrument

InstrumentName The TrailingStopLossOrderRequest instrument

instrument

InstrumentName The TrailingStopLossOrderRequest instrument

trade_id

TradeID The ID of the Trade to close when the price threshold is breached.

client_trade_id

TradeID The client ID of the Trade to be closed when the price threshold is breached.

distance

PriceValue The price distance specified for the TrailingStopLoss Order.

time_in_force

TimeInForce The time-in-force requested for the TrailingStopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.

gtd_time

DateTime The date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.

trigger_condition

OrderTriggerCondition Specification of what component of a price should be used for comparison when determining if the Order should be filled.

client_extensions

ClientExtensions The client extensions to add to the Order. Do not set, modify, or delete clientExtensions if your account is associated with MT4.

class async_v20.DynamicOrderState(id: OrderID= sentinel, trailing_stop_value: PriceValue= sentinel, trigger_distance: PriceValue= sentinel, is_trigger_distance_exact: bool= sentinel)[source]

Bases: async_v20.definitions.base.Model

The dynamic state of an Order. This is only relevant to TrailingStopLoss Orders, as no other Order type has dynamic state.

id

OrderID The Order’s ID.

trailing_stop_value

PriceValue The Order’s calculated trailing stop value.

trigger_distance

PriceValue The distance between the Trailing Stop Loss Order’s trailingStopValue and the current Market Price. This represents the distance (in price units) of the Order from a triggering price. If the distance could not be determined, this value will not be set.

is_trigger_distance_exact

bool True if an exact trigger distance could be calculated. If false, it means the provided trigger distance is a best estimate. If the distance could not be determined, this value will not be set.

class async_v20.UnitsAvailableDetails(long: DecimalNumber= sentinel, short: DecimalNumber= sentinel)[source]

Bases: async_v20.definitions.base.Model

Representation of how many units of an Instrument are available to be traded for both long and short Orders.

long

DecimalNumber The units available for long Orders.

short

DecimalNumber The units available for short Orders.

class async_v20.UnitsAvailable(default: UnitsAvailableDetails= sentinel, reduce_first: UnitsAvailableDetails= sentinel, reduce_only: UnitsAvailableDetails= sentinel, open_only: UnitsAvailableDetails= sentinel)[source]

Bases: async_v20.definitions.base.Model

Representation of how many units of an Instrument are available to be traded by an Order depending on its position Fill option.

default

UnitsAvailableDetails The number of units that are available to be traded using an Order with a positionFill option of “DEFAULT”. For an Account with hedging enabled, this value will be the same as the “OPEN_ONLY” value. For an Account without hedging enabled, this value will be the same as the “REDUCE_FIRST” value.

reduce_first

UnitsAvailableDetails The number of units that may are available to be traded with an Order with a positionFill option of “REDUCE_FIRST”.

reduce_only

UnitsAvailableDetails The number of units that may are available to be traded with an Order with a positionFill option of “REDUCE_ONLY”.

open_only

UnitsAvailableDetails The number of units that may are available to be traded with an Order with a positionFill option of “OPEN_ONLY”.