Transaction¶
-
class
async_v20.Transaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, type: TransactionType= sentinel, extension_number: int= sentinel, division_id: int= sentinel, site_id: int= sentinel, account_user_id: int= sentinel, account_number: int= sentinel, home_currency: Currency= sentinel, alias: str= sentinel, margin_rate: DecimalNumber= sentinel, reason: Reason= sentinel, trade_ids: TradeID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, replaced_by_order_id: OrderID= sentinel, closed_trade_id: OrderID= sentinel, trade_close_transaction_id: TransactionID= sentinel, client_extensions_modify: ClientExtensions= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel, financing: AccountUnits= sentinel, account_balance: AccountUnits= sentinel, account_financing_mode: AccountFinancingMode= sentinel, position_financings: ArrayPositionFinancing= sentinel, trade_id: TradeID= sentinel, client_trade_id: ClientID= sentinel, price: PriceValue= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel, reject_reason: TransactionRejectReason= sentinel, amount: AccountUnits= sentinel, funding_reason: FundingReason= sentinel, comment: str= sentinel, instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, price_bound: PriceValue= sentinel, position_fill: OrderPositionFill= sentinel, 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, distance: PriceValue= sentinel, full_price: ClientPrice= sentinel, pl: AccountUnits= sentinel, commission: AccountUnits= sentinel, trade_opened: TradeOpen= sentinel, trades_closed: ArrayTradeReduce= sentinel, trade_reduced: TradeReduce= sentinel, intended_replaces_order_id: OrderID= sentinel, gain_quote_home_conversion_factor: DecimalNumber= sentinel, loss_quote_home_conversion_factor: DecimalNumber= sentinel, guaranteed_execution_fee: AccountUnits= sentinel, half_spread_cost: AccountUnits= sentinel, partial_fill: str= sentinel, guaranteed: bool= sentinel, requested_units: AccountUnits= sentinel, full_vwap: DecimalNumber= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelThe base Transaction specification. Contains all possible attributes a transaction may contain.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.CreateTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, division_id: int= sentinel, site_id: int= sentinel, account_user_id: int= sentinel, account_number: int= sentinel, home_currency: Currency= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA CreateTransaction represents the creation of an Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
division_id¶ TransactionIDThe ID of the Division that the Account is in
-
site_id¶ TransactionIDThe ID of the Site that the Account was created at
-
account_user_id¶ intThe ID of the user that the Account was created for
-
account_number¶ intThe number of the Account within the site/division/user
-
-
class
async_v20.CloseTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA CloseTransaction represents the closing of an Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.ReopenTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA ReopenTransaction represents the re-opening of a closed Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.ClientConfigureTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, alias: str= sentinel, margin_rate: DecimalNumber= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA ClientConfigureTransaction represents the configuration of an Account by a client.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
alias¶ strThe client-provided alias for the Account.
-
margin_rate¶ DecimalNumberThe margin rate override for the Account.
-
-
class
async_v20.ClientConfigureRejectTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, alias: str= sentinel, margin_rate: DecimalNumber= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA ClientConfigureRejectTransaction represents the reject of configuration of an Account by a client.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
alias¶ strThe client-provided alias for the Account.
-
margin_rate¶ DecimalNumberThe margin rate override for the Account.
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.TransferFundsTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, amount: AccountUnits= sentinel, funding_reason: FundingReason= sentinel, comment: str= sentinel, account_balance: AccountUnits= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TransferFundsTransaction represents the transfer of funds in/out of an Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
amount¶ AccountUnitsThe amount to deposit/withdraw from the Account in the Account’s home currency. A positive value indicates a deposit, a negative value indicates a withdrawal.
-
funding_reason¶ FundingReasonThe reason that an Account is being funded.
-
comment¶ strAn optional comment that may be attached to a fund transfer for audit purposes
-
account_balance¶ AccountUnitsThe Account’s balance after funds are transferred.
-
-
class
async_v20.TransferFundsRejectTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, amount: AccountUnits= sentinel, funding_reason: FundingReason= sentinel, comment: str= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TransferFundsRejectTransaction represents the rejection of the transfer of funds in/out of an Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
amount¶ AccountUnitsThe amount to deposit/withdraw from the Account in the Account’s home currency. A positive value indicates a deposit, a negative value indicates a withdrawal.
-
funding_reason¶ FundingReasonThe reason that an Account is being funded.
-
comment¶ strAn optional comment that may be attached to a fund transfer for audit purposes
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.MarketOrderTransaction(instrument: InstrumentName, units: DecimalNumber, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= 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, reason: MarketOrderReason= sentinel, 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.TransactionA MarketOrderTransaction represents the creation of a Market Order in the user’s account. A Market Order is an Order that is filled immediately at the current market price. Market Orders can be specialized when they are created to accomplish a specific tas’: ‘to’ close a Trade, to closeout a Position or to particiate in in a Margin closeout.
-
instrument¶ InstrumentNameThe Market Order’s Instrument.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
units¶ DecimalNumberThe 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.
-
time_in_force¶ TimeInForceThe time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder.
-
price_bound¶ PriceValueThe 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.
-
trade_close¶ MarketOrderTradeCloseDetails of the Trade requested to be closed, only provided when the Market Order is being used to explicitly close a Trade.
-
long_position_closeout¶ MarketOrderPositionCloseoutDetails 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¶ MarketOrderPositionCloseoutDetails 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¶ MarketOrderMarginCloseoutDetails of the Margin Closeout that this Market Order was created for
-
delayed_trade_close¶ MarketOrderDelayedTradeCloseDetails of the delayed Trade close that this Market Order was created for
-
reason¶ MarketOrderReasonThe reason that the Market Order was created
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
-
class
async_v20.MarketOrderRejectTransaction(instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= 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, reason: MarketOrderReason= sentinel, 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, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarketOrderRejectTransaction represents the rejection of the creation of a Market Order.
-
instrument¶ InstrumentNameThe Market Order’s Instrument.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
units¶ DecimalNumberThe 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.
-
time_in_force¶ TimeInForceThe time-in-force requested for the Market Order. Restricted to FOK or IOC for a MarketOrder.
-
price_bound¶ PriceValueThe 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.
-
trade_close¶ MarketOrderTradeCloseDetails of the Trade requested to be closed, only provided when the Market Order is being used to explicitly close a Trade.
-
long_position_closeout¶ MarketOrderPositionCloseoutDetails 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¶ MarketOrderPositionCloseoutDetails 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¶ MarketOrderMarginCloseoutDetails of the Margin Closeout that this Market Order was created for
-
delayed_trade_close¶ MarketOrderDelayedTradeCloseDetails of the delayed Trade close that this Market Order was created for
-
reason¶ MarketOrderReasonThe reason that the Market Order was created
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.LimitOrderTransaction(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: LimitOrderReason= sentinel, 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, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel, partial_fill: OrderPositionFill= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA LimitOrderTransaction represents the creation of a Limit Order in the user’s Account.
-
instrument¶ InstrumentNameThe Limit Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
time_in_force¶ TimeInForceThe time-in-force requested for the Limit Order.
-
gtd_time¶ DateTimeThe date/time when the Limit Order will be cancelled if its timeInForce is “GTD”.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ LimitOrderReasonThe reason that the Limit Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
partial_fill¶ = positionFill (seems to be a mismatch in Oanda documentation)
-
-
class
async_v20.LimitOrderRejectTransaction(instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, price: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: LimitOrderReason= sentinel, 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, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA LimitOrderRejectTransaction represents the rejection of the creation of a Limit Order.
-
instrument¶ InstrumentNameThe Limit Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
time_in_force¶ TimeInForceThe time-in-force requested for the Limit Order.
-
gtd_time¶ DateTimeThe date/time when the Limit Order will be cancelled if its timeInForce is “GTD”.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ LimitOrderReasonThe reason that the Limit Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.StopOrderTransaction(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, partial_fill: str= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: StopOrderReason= sentinel, 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, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA StopOrderTransaction represents the creation of a Stop Order in the user’s Account.
-
instrument¶ InstrumentNameThe Stop Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
price_bound¶ PriceValueThe 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¶ TimeInForceThe time-in-force requested for the Stop Order.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ StopOrderReasonThe reason that the Stop Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
-
class
async_v20.StopOrderRejectTransaction(instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, price: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: StopOrderReason= sentinel, 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, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA StopOrderRejectTransaction represents the rejection of the creation of a Stop Order.
-
instrument¶ InstrumentNameThe Stop Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
price_bound¶ PriceValueThe 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¶ TimeInForceThe time-in-force requested for the Stop Order.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ StopOrderReasonThe reason that the Stop Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.MarketIfTouchedOrderTransaction(instrument: InstrumentName, units: DecimalNumber, price: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: MarketIfTouchedOrderReason= sentinel, 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, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarketIfTouchedOrderTransaction represents the creation of a MarketIfTouched Order in the user’s Account.
-
instrument¶ InstrumentNameThe MarketIfTouched Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
price_bound¶ PriceValueThe worst market price that may be used to fill this MarketIfTouched Order.
-
time_in_force¶ TimeInForceThe time-in-force requested for the MarketIfTouched Order. Restricted to “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.
-
gtd_time¶ DateTimeThe date/time when the MarketIfTouched Order will be cancelled if its timeInForce is “GTD”.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ MarketIfTouchedOrderReasonThe reason that the Market-if-touched Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
-
class
async_v20.MarketIfTouchedOrderRejectTransaction(instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, price: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, price_bound: PriceValue= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, position_fill: OrderPositionFill=DEFAULT, trigger_condition: OrderTriggerCondition=DEFAULT, reason: MarketIfTouchedOrderReason= sentinel, 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, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarketIfTouchedOrderRejectTransaction represents the rejection of the creation of a MarketIfTouched Order.
-
instrument¶ InstrumentNameThe MarketIfTouched Order’s Instrument.
-
units¶ DecimalNumberThe 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¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
price_bound¶ PriceValueThe worst market price that may be used to fill this MarketIfTouched Order.
-
time_in_force¶ TimeInForceThe time-in-force requested for the MarketIfTouched Order. Restricted to “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.
-
gtd_time¶ DateTimeThe date/time when the MarketIfTouched Order will be cancelled if its timeInForce is “GTD”.
-
position_fill¶ OrderPositionFillSpecification of how Positions in the Account are modified when the Order is filled.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ MarketIfTouchedOrderReasonThe reason that the Market-if-touched Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
take_profit_on_fill¶ TakeProfitDetailsThe specification of the Take Profit Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
stop_loss_on_fill¶ StopLossDetailsThe specification of the Stop Loss Order that should be created for a Trade opened when the Order is filled (if such a Trade is created).
-
trailing_stop_loss_on_fill¶ TrailingStopLossDetailsThe specification of the Trailing Stop Loss Order that should be created for a Trade that is opened when the Order is filled (if such a Trade is created).
-
trade_client_extensions¶ ClientExtensionsClient Extensions to add to the Trade created when the Order is filled (if such a Trade is created). Do not set, modify, delete tradeClientExtensions if your account is associated with MT4.
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.TakeProfitOrderTransaction(trade_id: TradeID, price: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: TakeProfitOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TakeProfitOrderTransaction represents the creation of a TakeProfit Order in the user’s Account.
-
price¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ ClientIDThe client ID of the Trade to be closed when the price threshold is breached.
-
time_in_force¶ TimeInForceThe time-in-force requested for the TakeProfit Order. Restricted to “GTC”, “GFD” and “GTD” for TakeProfit Orders.
-
gtd_time¶ DateTimeThe date/time when the TakeProfit Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ TakeProfitOrderReasonThe reason that the Take Profit Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
-
class
async_v20.TakeProfitOrderRejectTransaction(trade_id: TradeID= sentinel, price: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: TakeProfitOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TakeProfitOrderRejectTransaction represents the rejection of the creation of a TakeProfit Order.
-
price¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe client ID of the Trade to be closed when the price threshold is breached.
-
time_in_force¶ TimeInForceThe time-in-force requested for the TakeProfit Order. Restricted to “GTC”, “GFD” and “GTD” for TakeProfit Orders.
-
gtd_time¶ DateTimeThe date/time when the TakeProfit Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ TakeProfitOrderReasonThe reason that the Take Profit Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.StopLossOrderTransaction(trade_id: TradeID, price: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: StopLossOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel, guaranteed: bool= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA StopLossOrderTransaction represents the creation of a StopLoss Order in the user’s Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe client ID of the Trade to be closed when the price threshold is breached.
-
price¶ PriceValueThe 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¶ TimeInForceThe time-in-force requested for the StopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for StopLoss Orders.
-
gtd_time¶ DateTimeThe date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ StopLossOrderReasonThe reason that the Stop Loss Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
guaranteed¶ boolFlag 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.
-
-
class
async_v20.StopLossOrderRejectTransaction(trade_id: TradeID= sentinel, price: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: StopLossOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA StopLossOrderRejectTransaction represents the rejection of the creation of a StopLoss Order.
-
price¶ PriceValueThe 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¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe client ID of the Trade to be closed when the price threshold is breached.
-
time_in_force¶ TimeInForceThe time-in-force requested for the StopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for StopLoss Orders.
-
gtd_time¶ DateTimeThe date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ StopLossOrderReasonThe reason that the Stop Loss Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.TrailingStopLossOrderTransaction(trade_id: TradeID, distance: PriceValue, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: TrailingStopLossOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, replaces_order_id: OrderID= sentinel, cancelling_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TrailingStopLossOrderTransaction represents the creation of a TrailingStopLoss Order in the user’s Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe client ID of the Trade to be closed when the price threshold is breached.
-
distance¶ PriceValueThe price distance specified for the TrailingStopLoss Order.
-
time_in_force¶ TimeInForceThe time-in-force requested for the TrailingStopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.
-
gtd_time¶ DateTimeThe date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ TrailingStopLossOrderReasonThe reason that the Trailing Stop Loss Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
replaces_order_id¶ OrderIDThe ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).
-
cancelling_transaction_id¶ TransactionIDThe ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).
-
-
class
async_v20.TrailingStopLossOrderRejectTransaction(trade_id: TradeID= sentinel, distance: PriceValue= sentinel, id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, client_trade_id: ClientID= sentinel, time_in_force: TimeInForce=GTC, gtd_time: DateTime= sentinel, trigger_condition: OrderTriggerCondition=DEFAULT, reason: TrailingStopLossOrderReason= sentinel, client_extensions: ClientExtensions= sentinel, order_fill_transaction_id: TransactionID= sentinel, intended_replaces_order_id: OrderID= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TrailingStopLossOrderRejectTransaction represents the rejection of the creation of a TrailingStopLoss Order.
-
distance¶ PriceValueThe price distance specified for the TrailingStopLoss Order.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe client ID of the Trade to be closed when the price threshold is breached.
-
time_in_force¶ TimeInForceThe time-in-force requested for the TrailingStopLoss Order. Restricted to “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.
-
gtd_time¶ DateTimeThe date/time when the StopLoss Order will be cancelled if its timeInForce is “GTD”.
-
trigger_condition¶ OrderTriggerConditionSpecification of what component of a price should be used for comparison when determining if the Order should be filled.
-
reason¶ TrailingStopLossOrderReasonThe reason that the Trailing Stop Loss Order was initiated
-
client_extensions¶ ClientExtensionsClient Extensions to add to the Order (only provided if the Order is being created with client extensions).
-
order_fill_transaction_id¶ TransactionIDThe ID of the OrderFill Transaction that caused this Order to be created (only provided if this Order was created automatically when another Order was filled).
-
intended_replaces_order_id¶ OrderIDThe ID of the Order that this Order was intended to replace (only provided if this Order was intended to replace an existing Order).
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.OrderFillTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, instrument: InstrumentName= sentinel, units: DecimalNumber= sentinel, price: PriceValue= sentinel, full_price: ClientPrice= sentinel, reason: OrderFillReason= sentinel, pl: AccountUnits= sentinel, financing: AccountUnits= sentinel, commission: AccountUnits= sentinel, account_balance: AccountUnits= sentinel, trade_opened: TradeOpen= sentinel, trades_closed: ArrayTradeReduce= sentinel, trade_reduced: TradeReduce= sentinel, gain_quote_home_conversion_factor: DecimalNumber= sentinel, loss_quote_home_conversion_factor: DecimalNumber= sentinel, guaranteed_execution_fee: AccountUnits= sentinel, half_spread_cost: AccountUnits= sentinel, requested_units: AccountUnits= sentinel, full_vwap: DecimalNumber= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionAn OrderFillTransaction represents the filling of an Order in the client’s Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_order_id¶ ClientIDThe client Order ID of the Order filled (only provided if the client has assigned one).
-
instrument¶ InstrumentNameThe name of the filled Order’s instrument.
-
units¶ DecimalNumberThe number of units filled by the Order.
-
gain_quote_home_conversion_factor¶ This is the conversion factor in effect for the Account at the time of the OrderFill for converting any gains realized in Instrument quote units into units of the Account’s home currency.
-
loss_quote_home_conversion_factor¶ This is the conversion factor in effect for the Account at the time of the OrderFill for converting any losses realized in Instrument quote units into units of the Account’s home currency.
-
price¶ PriceValueThe average market price that the Order was filled at.
-
full_price¶ PriceValueThe price in effect for the account at the time of the Order fill.
-
reason¶ OrderFillReasonThe reason that an Order was filled
-
pl¶ AccountUnitsThe profit or loss incurred when the Order was filled.
-
financing¶ AccountUnitsThe financing paid or collected when the Order was filled.
-
commission¶ AccountUnitsThe commission charged in the Account’s home currency as a result of filling the Order. The commission is always represented as a positive quantity of the Account’s home currency, however it reduces the balance in the Account.
-
guaranteed_execution_fee¶ The total guaranteed execution fees charged for all Trades opened, closed or reduced with guaranteed Stop Loss Orders.
-
account_balance¶ AccountUnitsThe Account’s balance after the Order was filled.
-
trade_opened¶ TradeOpenThe Trade that was opened when the Order was filled (only provided if filling the Order resulted in a new Trade).
-
trades_closed¶ (
ArrayTradeReduceThe Trades that were closed when the Order was filled (only provided if filling the Order resulted in a closing open Trades).
-
trade_reduced¶ TradeReduceThe Trade that was reduced when the Order was filled (only provided if filling the Order resulted in reducing an open Trade).
-
half_spread_cost¶ The half spread cost for the OrderFill, which is the sum of the halfSpreadCost values in the tradeOpened, tradesClosed and tradeReduced fields. This can be a positive or negative value and is represented in the home currency of the Account.
-
-
class
async_v20.OrderCancelTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, reason: OrderCancelReason= sentinel, replaced_by_order_id: OrderID= sentinel, closed_trade_id: OrderID= sentinel, trade_close_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionAn OrderCancelTransaction represents the cancellation of an Order in the client’s Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
order_id¶ TransactionIDThe ID of the Order cancelled
-
reason¶ OrderCancelReasonThe reason that the Order was cancelled.
-
replaced_by_order_id¶ TransactionIDThe ID of the Order that replaced this Order (only provided if this Order was cancelled for replacement).
-
-
class
async_v20.OrderCancelRejectTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, reason: OrderCancelReason= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionAn OrderCancelRejectTransaction represents the rejection of the cancellation of an Order in the client’s Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_order_id¶ OrderIDThe client ID of the Order intended to be cancelled (only provided if the Order has a client Order ID).
-
reason¶ OrderCancelReasonThe reason that the Order was to be cancelled.
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.OrderClientExtensionsModifyTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, client_extensions_modify: ClientExtensions= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA OrderClientExtensionsModifyTransaction represents the modification of an Order’s Client Extensions.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_order_id¶ OrderIDThe original Client ID of the Order who’s client extensions are to be modified.
-
client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Order.
-
trade_client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Order’s Trade on fill.
-
-
class
async_v20.OrderClientExtensionsModifyRejectTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, order_id: OrderID= sentinel, client_order_id: ClientID= sentinel, client_extensions_modify: ClientExtensions= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA OrderClientExtensionsModifyRejectTransaction represents the rejection of the modification of an Order’s Client Extensions.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_order_id¶ OrderIDThe original Client ID of the Order who’s client extensions are to be modified.
-
client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Order.
-
trade_client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Order’s Trade on fill.
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.TradeClientExtensionsModifyTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, trade_id: TradeID= sentinel, client_trade_id: ClientID= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TradeClientExtensionsModifyTransaction represents the modification of a Trade’s Client Extensions.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ TradeIDThe original Client ID of the Trade who’s client extensions are to be modified.
-
trade_client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Trade.
-
-
class
async_v20.TradeClientExtensionsModifyRejectTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, trade_id: TradeID= sentinel, client_trade_id: ClientID= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA TradeClientExtensionsModifyRejectTransaction represents the rejection of the modification of a Trade’s Client Extensions.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
client_trade_id¶ ClientIDThe original Client ID of the Trade who’s client extensions are to be modified.
-
trade_client_extensions_modify¶ ClientExtensionsThe new Client Extensions for the Trade.
-
reject_reason¶ TransactionRejectReasonThe reason that the Reject Transaction was created
-
-
class
async_v20.MarginCallEnterTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarginCallEnterTransaction is created when an Account enters the margin call state.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.MarginCallExtendTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, extension_number: int= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarginCallExtendTransaction is created when the margin call state for an Account has been extended.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
extension_number¶ intThe number of the extensions to the Account’s current margin call that have been applied. This value will be set to 1 for the first MarginCallExtend Transaction
-
-
class
async_v20.MarginCallExitTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA MarginCallExitnterTransaction is created when an Account leaves the margin call state.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.DelayedTradeClosureTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, reason: MarketOrderReason= sentinel, trade_ids: TradeID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA DelayedTradeClosure Transaction is created administratively to indicate open trades that should have been closed but weren’t because the open trades’ instruments were untradeable at the time. Open trades listed in this transaction will be closed once their respective instruments become tradeable.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
reason¶ MarketOrderReasonThe reason for the delayed trade closure
-
-
class
async_v20.DailyFinancingTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel, financing: AccountUnits= sentinel, account_balance: AccountUnits= sentinel, account_financing_mode: AccountFinancingMode= sentinel, position_financings: ArrayPositionFinancing= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA DailyFinancingTransaction represents the daily payment/collection of financing for an Account.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
financing¶ AccountUnitsThe amount of financing paid/collected for the Account.
-
account_balance¶ AccountUnitsThe Account’s balance after daily financing.
-
account_financing_mode¶ AccountFinancingModeThe account financing mode at the time of the daily financing.
-
position_financings¶ (
PositionFinancing, …) The financing paid/collected for each Position in the Account.
-
-
class
async_v20.ResetResettablePLTransaction(id: TransactionID= sentinel, time: DateTime= sentinel, user_id: int= sentinel, account_id: AccountID= sentinel, batch_id: TransactionID= sentinel, request_id: RequestID= sentinel)[source]¶ Bases:
async_v20.definitions.types.TransactionA ResetResettablePLTransaction represents the resetting of the Account’s resettable PL counters.
-
id¶ TransactionIDThe Transaction’s Identifier.
-
user_id¶ intThe ID of the user that initiated the creation of the Transaction.
-
batch_id¶ TransactionIDThe ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.
-
-
class
async_v20.ClientExtensions(id: ClientID= sentinel, tag: ClientTag= sentinel, comment: ClientComment= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA ClientExtensions object allows a client to attach a clientID, tag and comment to Orders and Trades in their Account. Do not set, modify, or delete this field if your account is associated with MT4.
-
comment¶ ClientCommentA comment associated with the Order/Trade
-
-
class
async_v20.TakeProfitDetails(price: PriceValue= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, client_extensions: ClientExtensions= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelTakeProfitDetails 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.
-
price¶ PriceValueThe price that the Take Profit Order will be triggered at.
-
time_in_force¶ TimeInForceThe time in force for the created Take Profit Order. This may only be GTC, GTD or GFD.
-
client_extensions¶ ClientExtensionsThe Client Extensions to add to the Take Profit Order when created.
-
-
class
async_v20.StopLossDetails(price: PriceValue= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, client_extensions: ClientExtensions= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelStopLossDetails 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.
-
price¶ PriceValueThe price that the Stop Loss Order will be triggered at.
-
time_in_force¶ TimeInForceThe time in force for the created Stop Loss Order. This may only be GTC, GTD or GFD.
-
client_extensions¶ ClientExtensionsThe Client Extensions to add to the Stop Loss Order when created.
-
-
class
async_v20.TrailingStopLossDetails(distance: PriceValue= sentinel, time_in_force: TimeInForce= sentinel, gtd_time: DateTime= sentinel, client_extensions: ClientExtensions= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelTrailingStopLossDetails 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.
-
distance¶ PriceValueThe distance (in price units) from the Trade’s fill price that the Trailing Stop Loss Order will be triggered at.
-
time_in_force¶ TimeInForceThe time in force for the created Trailing Stop Loss Order. This may only be GTC, GTD or GFD.
-
gtd_time¶ DateTimeThe date when the Trailing Stop Loss Order will be cancelled on if timeInForce is GTD.
-
client_extensions¶ ClientExtensionsThe Client Extensions to add to the Trailing Stop Loss Order when created.
-
-
class
async_v20.TradeOpen(price: DecimalNumber= sentinel, trade_id: TradeID= sentinel, units: DecimalNumber= sentinel, client_extensions: ClientExtensions= sentinel, guaranteed_execution_fee: AccountUnits= sentinel, half_spread_cost: AccountUnits= sentinel, initial_margin_required: AccountUnits= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA TradeOpen object represents a Trade for an instrument that was opened in an Account. It is found embedded in Transactions that affect the position of an instrument in the Account, specifically the OrderFill Transaction.
-
units¶ DecimalNumberThe number of units opened by the Trade
-
client_extensions¶ ClientExtensionsThe client extensions for the newly opened Trade
-
initial_margin_required¶ AccountUnitsThe margin required at the time the Trade was created. Note, this is the ‘pure’ margin required, it is not the ‘effective’ margin used that factors in the trade risk if a GSLO is attached to the trade.
-
-
class
async_v20.TradeReduce(trade_id: TradeID= sentinel, units: DecimalNumber= sentinel, realized_pl: AccountUnits= sentinel, financing: AccountUnits= sentinel, price: DecimalNumber= sentinel, guaranteed_execution_fee: AccountUnits= sentinel, half_spread_cost: AccountUnits= sentinel, client_trade_id: ClientID= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA TradeReduce object represents a Trade for an instrument that was reduced (either partially or fully) in an Account. It is found embedded in Transactions that affect the position of an instrument in the account, specifically the OrderFill Transaction.
-
units¶ DecimalNumberThe number of units that the Trade was reduced by
-
realized_pl¶ AccountUnitsThe PL realized when reducing the Trade
-
financing¶ AccountUnitsThe financing paid/collected when reducing the Trade
-
-
class
async_v20.MarketOrderTradeClose(trade_id: TradeID= sentinel, client_trade_id: str= sentinel, units: str= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA MarketOrderTradeClose specifies the extensions to a Market Order that has been created specifically to close a Trade.
-
units¶ strIndication of how much of the Trade to close. Either “ALL”, or a DecimalNumber reflection a partial close of the Trade.
-
-
class
async_v20.MarketOrderMarginCloseout(reason: MarketOrderMarginCloseoutReason= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelDetails for the Market Order extensions specific to a Market Order placed that is part of a Market Order Margin Closeout in a client’s account
-
reason¶ MarketOrderMarginCloseoutReasonThe reason the Market Order was created to perform a margin closeout
-
-
class
async_v20.MarketOrderDelayedTradeClose(trade_id: TradeID= sentinel, client_trade_id: TradeID= sentinel, source_transaction_id: TransactionID= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelDetails for the Market Order extensions specific to a Market Order placed with the intent of fully closing a specific open trade that should have already been closed but wasn’t due to halted market conditions
-
source_transaction_id¶ TransactionIDThe Transaction ID of the DelayedTradeClosure transaction to which this Delayed Trade Close belongs to
-
-
class
async_v20.MarketOrderPositionCloseout(instrument: InstrumentName= sentinel, units: str= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA MarketOrderPositionCloseout specifies the extensions to a Market Order when it has been created to closeout a specific Position.
-
instrument¶ InstrumentNameThe instrument of the Position being closed out.
-
units¶ strIndication of how much of the Position to close. Either “ALL”, or a DecimalNumber reflection a partial close of the Trade. The DecimalNumber must always be positive, and represent a number that doesn’t exceed the absolute size of the Position.
-
-
class
async_v20.VWAPReceipt(units: DecimalNumber= sentinel, price: PriceValue= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA VWAP Receipt provides a record of how the price for an Order fill is constructed. If the Order is filled with multiple buckets in a depth of market, each bucket will be represented with a VWAP Receipt.
-
units¶ DecimalNumberThe number of units filled
-
price¶ PriceValueThe price at which the units were filled
-
-
class
async_v20.LiquidityRegenerationSchedule(steps: ArrayLiquidityRegenerationScheduleStep= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA LiquidityRegenerationSchedule indicates how liquidity that is used when filling an Order for an instrument is regenerated following the fill. A liquidity regeneration schedule will be in effect until the timestamp of its final step, but may be replaced by a schedule created for an Order of the same instrument that is filled while it is still in effect.
-
steps¶ (
LiquidityRegenerationScheduleStep, …) The steps in the Liquidity Regeneration Schedule
-
-
class
async_v20.LiquidityRegenerationScheduleStep(timestamp: DateTime= sentinel, bid_liquidity_used: DecimalNumber= sentinel, ask_liquidity_used: DecimalNumber= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA liquidity regeneration schedule Step indicates the amount of bid and ask liquidity that is used by the Account at a certain time. These amounts will only change at the timestamp of the following step.
-
bid_liquidity_used¶ DecimalNumberThe amount of bid liquidity used at this step in the schedule.
-
ask_liquidity_used¶ DecimalNumberThe amount of ask liquidity used at this step in the schedule.
-
-
class
async_v20.OpenTradeFinancing(trade_id: TradeID= sentinel, financing: AccountUnits= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelOpenTradeFinancing is used to pay/collect daily financing charge for an open Trade within an Account
-
financing¶ AccountUnitsThe amount of financing paid/collected for the Trade.
-
-
class
async_v20.PositionFinancing(instrument: InstrumentName= sentinel, financing: AccountUnits= sentinel, open_trade_financings: ArrayOpenTradeFinancing= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelOpenTradeFinancing is used to pay/collect daily financing charge for a Position within an Account
-
instrument¶ InstrumentNameThe instrument of the Position that financing is being paid/collected for.
-
financing¶ AccountUnitsThe amount of financing paid/collected for the Position.
-
open_trade_financings¶ (
OpenTradeFinancing, …) The financing paid/collecte for each open Trade within the Position.
-
-
class
async_v20.TransactionHeartbeat(type: str= sentinel, last_transaction_id: TransactionID= sentinel, time: DateTime= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA TransactionHeartbeat object is injected into the Transaction stream to ensure that the HTTP connection remains active.
-
type¶ strThe string “HEARTBEAT”
-
last_transaction_id¶ TransactionIDThe ID of the most recent Transaction created for the Account
-