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: OrderID= 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.Model

The base Transaction specification. Contains all possible attributes a transaction may contain.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.Transaction

A CreateTransaction represents the creation of an Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

division_id

TransactionID The ID of the Division that the Account is in

site_id

TransactionID The ID of the Site that the Account was created at

account_user_id

int The ID of the user that the Account was created for

account_number

int The number of the Account within the site/division/user

home_currency

Currency The home currency of the Account

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.Transaction

A CloseTransaction represents the closing of an Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.Transaction

A ReopenTransaction represents the re-opening of a closed Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.Transaction

A ClientConfigureTransaction represents the configuration of an Account by a client.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

alias

str The client-provided alias for the Account.

margin_rate

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

A ClientConfigureRejectTransaction represents the reject of configuration of an Account by a client.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

alias

str The client-provided alias for the Account.

margin_rate

DecimalNumber The margin rate override for the Account.

reject_reason

TransactionRejectReason The 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.Transaction

A TransferFundsTransaction represents the transfer of funds in/out of an Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

amount

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

FundingReason The reason that an Account is being funded.

comment

str An optional comment that may be attached to a fund transfer for audit purposes

account_balance

AccountUnits The 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.Transaction

A TransferFundsRejectTransaction represents the rejection of the transfer of funds in/out of an Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

amount

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

FundingReason The reason that an Account is being funded.

comment

str An optional comment that may be attached to a fund transfer for audit purposes

reject_reason

TransactionRejectReason The 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.Transaction

A 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

InstrumentName The Market Order’s Instrument.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

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

reason

MarketOrderReason The reason that the Market Order was created

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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.Transaction

A MarketOrderRejectTransaction represents the rejection of the creation of a Market Order.

instrument

InstrumentName The Market Order’s Instrument.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

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

reason

MarketOrderReason The reason that the Market Order was created

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

TransactionRejectReason The 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)[source]

Bases: async_v20.definitions.types.Transaction

A LimitOrderTransaction represents the creation of a Limit Order in the user’s Account.

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

LimitOrderReason The reason that the Limit Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).

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.Transaction

A LimitOrderRejectTransaction represents the rejection of the creation of 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.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

LimitOrderReason The reason that the Limit Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

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

TransactionRejectReason The 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, 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.Transaction

A StopOrderTransaction represents the creation of a Stop Order in the user’s Account.

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

StopOrderReason The reason that the Stop Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The 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.Transaction

A StopOrderRejectTransaction represents the rejection of the creation of 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.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

StopOrderReason The reason that the Stop Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

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

TransactionRejectReason The 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.Transaction

A MarketIfTouchedOrderTransaction represents the creation of a MarketIfTouched Order in the user’s Account.

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

MarketIfTouchedOrderReason The reason that the Market-if-touched Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The 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.Transaction

A MarketIfTouchedOrderRejectTransaction represents the rejection of the creation of a MarketIfTouched 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.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

MarketIfTouchedOrderReason The reason that the Market-if-touched Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

take_profit_on_fill

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

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

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

ClientExtensions Client 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

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

TransactionRejectReason The 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.Transaction

A TakeProfitOrderTransaction represents the creation of a TakeProfit Order in the user’s Account.

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

TakeProfitOrderReason The reason that the Take Profit Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The 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.Transaction

A TakeProfitOrderRejectTransaction represents the rejection of the creation of a TakeProfit Order.

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

client_trade_id

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 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.

reason

TakeProfitOrderReason The reason that the Take Profit Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

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

TransactionRejectReason The 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)[source]

Bases: async_v20.definitions.types.Transaction

A StopLossOrderTransaction represents the creation of a StopLoss Order in the user’s Account.

trade_id

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

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

StopLossOrderReason The reason that the Stop Loss Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The ID of the Transaction that cancels the replaced Order (only provided if this Order replaces an existing Order).

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.Transaction

A StopLossOrderRejectTransaction represents the rejection of the creation of a StopLoss Order.

trade_id

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

client_trade_id

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.

reason

StopLossOrderReason The reason that the Stop Loss Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

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

TransactionRejectReason The 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.Transaction

A TrailingStopLossOrderTransaction represents the creation of a TrailingStopLoss Order in the user’s Account.

trade_id

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

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.

reason

TrailingStopLossOrderReason The reason that the Trailing Stop Loss Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

OrderID The ID of the Order that this Order replaces (only provided if this Order replaces an existing Order).

cancelling_transaction_id

TransactionID The 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.Transaction

A TrailingStopLossOrderRejectTransaction represents the rejection of the creation of a TrailingStopLoss Order.

trade_id

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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

client_trade_id

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.

reason

TrailingStopLossOrderReason The reason that the Trailing Stop Loss Order was initiated

client_extensions

ClientExtensions Client Extensions to add to the Order (only provided if the Order is being created with client extensions).

order_fill_transaction_id

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

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

TransactionRejectReason The 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: OrderID= 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.Transaction

An OrderFillTransaction represents the filling of an Order in the client’s Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

order_id

OrderID The ID of the Order filled.

client_order_id

OrderID The client Order ID of the Order filled (only provided if the client has assigned one).

instrument

InstrumentName The name of the filled Order’s instrument.

units

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

PriceValue The average market price that the Order was filled at.

full_price

PriceValue The price in effect for the account at the time of the Order fill.

reason

OrderFillReason The reason that an Order was filled

pl

AccountUnits The profit or loss incurred when the Order was filled.

financing

AccountUnits The financing paid or collected when the Order was filled.

commission

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

AccountUnits The Account’s balance after the Order was filled.

trade_opened

TradeOpen The Trade that was opened when the Order was filled (only provided if filling the Order resulted in a new Trade).

trades_closed

(ArrayTradeReduce The Trades that were closed when the Order was filled (only provided if filling the Order resulted in a closing open Trades).

trade_reduced

TradeReduce The 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: OrderID= 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.Transaction

An OrderCancelTransaction represents the cancellation of an Order in the client’s Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

order_id

TransactionID The ID of the Order cancelled

client_order_id

OrderID The reason that the Order was cancelled.

reason

OrderCancelReason The reason that the Order was cancelled.

replaced_by_order_id

TransactionID The 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: OrderID= sentinel, reason: OrderCancelReason= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]

Bases: async_v20.definitions.types.Transaction

An OrderCancelRejectTransaction represents the rejection of the cancellation of an Order in the client’s Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

order_id

OrderID The ID of the Order intended to be cancelled

client_order_id

OrderID The client ID of the Order intended to be cancelled (only provided if the Order has a client Order ID).

reason

OrderCancelReason The reason that the Order was to be cancelled.

reject_reason

TransactionRejectReason The 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: OrderID= sentinel, client_extensions_modify: ClientExtensions= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel)[source]

Bases: async_v20.definitions.types.Transaction

A OrderClientExtensionsModifyTransaction represents the modification of an Order’s Client Extensions.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

order_id

OrderID The ID of the Order who’s client extensions are to be modified.

client_order_id

OrderID The original Client ID of the Order who’s client extensions are to be modified.

client_extensions_modify

ClientExtensions The new Client Extensions for the Order.

trade_client_extensions_modify

ClientExtensions The 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: OrderID= sentinel, client_extensions_modify: ClientExtensions= sentinel, trade_client_extensions_modify: ClientExtensions= sentinel, reject_reason: TransactionRejectReason= sentinel)[source]

Bases: async_v20.definitions.types.Transaction

A OrderClientExtensionsModifyRejectTransaction represents the rejection of the modification of an Order’s Client Extensions.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

order_id

OrderID The ID of the Order who’s client extensions are to be modified.

client_order_id

OrderID The original Client ID of the Order who’s client extensions are to be modified.

client_extensions_modify

ClientExtensions The new Client Extensions for the Order.

trade_client_extensions_modify

ClientExtensions The new Client Extensions for the Order’s Trade on fill.

reject_reason

TransactionRejectReason The 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.Transaction

A TradeClientExtensionsModifyTransaction represents the modification of a Trade’s Client Extensions.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

trade_id

TradeID The ID of the Trade who’s client extensions are to be modified.

client_trade_id

TradeID The original Client ID of the Trade who’s client extensions are to be modified.

trade_client_extensions_modify

ClientExtensions The 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.Transaction

A TradeClientExtensionsModifyRejectTransaction represents the rejection of the modification of a Trade’s Client Extensions.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

trade_id

TradeID The ID of the Trade who’s client extensions are to be modified.

client_trade_id

ClientID The original Client ID of the Trade who’s client extensions are to be modified.

trade_client_extensions_modify

ClientExtensions The new Client Extensions for the Trade.

reject_reason

TransactionRejectReason The 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.Transaction

A MarginCallEnterTransaction is created when an Account enters the margin call state.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.Transaction

A MarginCallExtendTransaction is created when the margin call state for an Account has been extended.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

extension_number

int The 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.Transaction

A MarginCallExitnterTransaction is created when an Account leaves the margin call state.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

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.Transaction

A 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

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

reason

MarketOrderReason The reason for the delayed trade closure

trade_ids

TradeID List of Trade ID’s identifying the open trades that will be closed when their respective instruments become tradeable

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.Transaction

A DailyFinancingTransaction represents the daily payment/collection of financing for an Account.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

financing

AccountUnits The amount of financing paid/collected for the Account.

account_balance

AccountUnits The Account’s balance after daily financing.

account_financing_mode

AccountFinancingMode The 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.Transaction

A ResetResettablePLTransaction represents the resetting of the Account’s resettable PL counters.

id

TransactionID The Transaction’s Identifier.

time

DateTime The date/time when the Transaction was created.

user_id

int The ID of the user that initiated the creation of the Transaction.

account_id

AccountID The ID of the Account the Transaction was created for.

batch_id

TransactionID The ID of the “batch” that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously.

request_id

RequestID The Request ID of the request which generated the transaction.

class async_v20.ClientExtensions(id: ClientID= sentinel, tag: ClientTag= sentinel, comment: ClientComment= sentinel)[source]

Bases: async_v20.definitions.base.Model

A 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.

id

ClientID The Client ID of the Order/Trade

tag

ClientTag A tag associated with the Order/Trade

comment

ClientComment A 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.Model

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.

price

PriceValue The price that the Take Profit Order will be triggered at.

time_in_force

TimeInForce The time in force for the created Take Profit Order. This may only be GTC, GTD or GFD.

gtd_time

DateTime The date when the Take Profit Order will be cancelled on if timeInForce is GTD.

client_extensions

ClientExtensions The 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.Model

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.

price

PriceValue The price that the Stop Loss Order will be triggered at.

time_in_force

TimeInForce The time in force for the created Stop Loss Order. This may only be GTC, GTD or GFD.

gtd_time

DateTime The date when the Stop Loss Order will be cancelled on if timeInForce is GTD.

client_extensions

ClientExtensions The 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.Model

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.

distance

PriceValue The distance (in price units) from the Trade’s fill price that the Trailing Stop Loss Order will be triggered at.

time_in_force

TimeInForce The time in force for the created Trailing Stop Loss Order. This may only be GTC, GTD or GFD.

gtd_time

DateTime The date when the Trailing Stop Loss Order will be cancelled on if timeInForce is GTD.

client_extensions

ClientExtensions The 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.Model

A 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.

trade_id

TradeID The ID of the Trade that was opened

units

DecimalNumber The number of units opened by the Trade

client_extensions

ClientExtensions The client extensions for the newly opened Trade

initial_margin_required

AccountUnits The 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)[source]

Bases: async_v20.definitions.base.Model

A 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.

trade_id

TradeID The ID of the Trade that was reduced or closed

units

DecimalNumber The number of units that the Trade was reduced by

realized_pl

AccountUnits The PL realized when reducing the Trade

financing

AccountUnits The 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.Model

A MarketOrderTradeClose specifies the extensions to a Market Order that has been created specifically to close a Trade.

trade_id

TradeID The ID of the Trade requested to be closed

client_trade_id

str TradeID The client ID of the Trade requested to be closed

units

str Indication 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.Model

Details 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

MarketOrderMarginCloseoutReason The 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.Model

Details 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

trade_id

TradeID The ID of the Trade being closed

client_trade_id

TradeID The Client ID of the Trade being closed

source_transaction_id

TransactionID The 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.Model

A MarketOrderPositionCloseout specifies the extensions to a Market Order when it has been created to closeout a specific Position.

instrument

InstrumentName The instrument of the Position being closed out.

units

str Indication 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.Model

A 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

DecimalNumber The number of units filled

price

PriceValue The price at which the units were filled

class async_v20.LiquidityRegenerationSchedule(steps: ArrayLiquidityRegenerationScheduleStep= sentinel)[source]

Bases: async_v20.definitions.base.Model

A 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.Model

A 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.

timestamp

DateTime The timestamp of the schedule step.

bid_liquidity_used

DecimalNumber The amount of bid liquidity used at this step in the schedule.

ask_liquidity_used

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

OpenTradeFinancing is used to pay/collect daily financing charge for an open Trade within an Account

trade_id

TradeID The ID of the Trade that financing is being paid/collected for.

financing

AccountUnits The 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.Model

OpenTradeFinancing is used to pay/collect daily financing charge for a Position within an Account

instrument

InstrumentName The instrument of the Position that financing is being paid/collected for.

financing

AccountUnits The 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.Model

A TransactionHeartbeat object is injected into the Transaction stream to ensure that the HTTP connection remains active.

type

str The string “HEARTBEAT”

last_transaction_id

TransactionID The ID of the most recent Transaction created for the Account

time

DateTime The date/time when the TransactionHeartbeat was created.