[][src]Struct fxoanda::OrderFillTransaction

pub struct OrderFillTransaction {
    pub guaranteed_execution_fee: Option<f32>,
    pub full_vwap: Option<f32>,
    pub trade_reduced: Option<TradeReduce>,
    pub account_balance: Option<f32>,
    pub request_id: Option<String>,
    pub id: Option<String>,
    pub client_order_id: Option<String>,
    pub commission: Option<f32>,
    pub user_id: Option<i32>,
    pub instrument: Option<String>,
    pub loss_quote_home_conversion_factor: Option<f32>,
    pub units: Option<f32>,
    pub otype: Option<String>,
    pub pl: Option<f32>,
    pub account_id: Option<String>,
    pub full_price: Option<ClientPrice>,
    pub price: Option<f32>,
    pub gain_quote_home_conversion_factor: Option<f32>,
    pub batch_id: Option<String>,
    pub reason: Option<String>,
    pub half_spread_cost: Option<f32>,
    pub order_id: Option<String>,
    pub financing: Option<f32>,
    pub time: Option<DateTime<Utc>>,
    pub trade_opened: Option<TradeOpen>,
    pub trades_closed: Option<Vec<TradeReduce>>,
}

Fields

guaranteed_execution_fee: Option<f32>

The total guaranteed execution fees charged for all Trades opened, closed or reduced with guaranteed Stop Loss Orders. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

full_vwap: Option<f32>

The price that all of the units of the OrderFill should have been filled at, in the absence of guaranteed price execution. This factors in the Account's current ClientPrice, used liquidity and the units of the OrderFill only. If no Trades were closed with their price clamped for guaranteed stop loss enforcement, then this value will match the price fields of each Trade opened, closed, and reduced, and they will all be the exact same. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

trade_reduced: Option<TradeReduce>

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.

account_balance: Option<f32>

The Account's balance after the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

request_id: Option<String>

The Request ID of the request which generated the transaction.

id: Option<String>

The Transaction's Identifier. format: String representation of the numerical OANDA-assigned TransactionID

client_order_id: Option<String>

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

commission: Option<f32>

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. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

user_id: Option<i32>

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

instrument: Option<String>

The name of the filled Order's instrument. format: A string containing the base currency and quote currency delimited by a "_".

loss_quote_home_conversion_factor: Option<f32>

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. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

units: Option<f32>

The number of units filled by the OrderFill. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

otype: Option<String>

The Type of the Transaction. Always set to "ORDER_FILL" for an OrderFillTransaction.

pl: Option<f32>

The profit or loss incurred when the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

account_id: Option<String>

The ID of the Account the Transaction was created for. format: "-"-delimited string with format "{siteID}-{divisionID}-{userID}-{accountNumber}"

full_price: Option<ClientPrice>

The specification of an Account-specific Price.

price: Option<f32>

This field is now deprecated and should no longer be used. The individual tradesClosed, tradeReduced and tradeOpened fields contain the exact/official price each unit was filled at. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

gain_quote_home_conversion_factor: Option<f32>

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. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

batch_id: Option<String>

The ID of the "batch" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously. format: String representation of the numerical OANDA-assigned TransactionID

reason: Option<String>

The reason that an Order was filled

half_spread_cost: Option<f32>

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. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

order_id: Option<String>

The ID of the Order filled. format: The string representation of the OANDA-assigned OrderID. OANDA- assigned OrderIDs are positive integers, and are derived from the TransactionID of the Transaction that created the Order.

financing: Option<f32>

The financing paid or collected when the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

time: Option<DateTime<Utc>>

The date/time when the Transaction was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

trade_opened: Option<TradeOpen>

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.

trades_closed: Option<Vec<TradeReduce>>

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

Methods

impl OrderFillTransaction[src]

pub fn new() -> OrderFillTransaction[src]

pub fn with_guaranteed_execution_fee(self, x: f32) -> OrderFillTransaction[src]

The total guaranteed execution fees charged for all Trades opened, closed or reduced with guaranteed Stop Loss Orders. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_full_vwap(self, x: f32) -> OrderFillTransaction[src]

The price that all of the units of the OrderFill should have been filled at, in the absence of guaranteed price execution. This factors in the Account's current ClientPrice, used liquidity and the units of the OrderFill only. If no Trades were closed with their price clamped for guaranteed stop loss enforcement, then this value will match the price fields of each Trade opened, closed, and reduced, and they will all be the exact same. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return OrderFillTransaction

pub fn with_trade_reduced(self, x: TradeReduce) -> OrderFillTransaction[src]

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.

  • param TradeReduce
  • return OrderFillTransaction

pub fn with_account_balance(self, x: f32) -> OrderFillTransaction[src]

The Account's balance after the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_request_id(self, x: String) -> OrderFillTransaction[src]

The Request ID of the request which generated the transaction.

  • param String
  • return OrderFillTransaction

pub fn with_id(self, x: String) -> OrderFillTransaction[src]

The Transaction's Identifier. format: String representation of the numerical OANDA-assigned TransactionID

  • param String
  • return OrderFillTransaction

pub fn with_client_order_id(self, x: String) -> OrderFillTransaction[src]

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

  • param String
  • return OrderFillTransaction

pub fn with_commission(self, x: f32) -> OrderFillTransaction[src]

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. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_user_id(self, x: i32) -> OrderFillTransaction[src]

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

  • param i32
  • return OrderFillTransaction

pub fn with_instrument(self, x: String) -> OrderFillTransaction[src]

The name of the filled Order's instrument. format: A string containing the base currency and quote currency delimited by a "_".

  • param String
  • return OrderFillTransaction

pub fn with_loss_quote_home_conversion_factor(
    self,
    x: f32
) -> OrderFillTransaction
[src]

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. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return OrderFillTransaction

pub fn with_units(self, x: f32) -> OrderFillTransaction[src]

The number of units filled by the OrderFill. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return OrderFillTransaction

pub fn with_otype(self, x: String) -> OrderFillTransaction[src]

The Type of the Transaction. Always set to "ORDER_FILL" for an OrderFillTransaction.

  • param String
  • return OrderFillTransaction

pub fn with_pl(self, x: f32) -> OrderFillTransaction[src]

The profit or loss incurred when the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_account_id(self, x: String) -> OrderFillTransaction[src]

The ID of the Account the Transaction was created for. format: "-"-delimited string with format "{siteID}-{divisionID}-{userID}-{accountNumber}"

  • param String
  • return OrderFillTransaction

pub fn with_full_price(self, x: ClientPrice) -> OrderFillTransaction[src]

The specification of an Account-specific Price.

  • param ClientPrice
  • return OrderFillTransaction

pub fn with_price(self, x: f32) -> OrderFillTransaction[src]

This field is now deprecated and should no longer be used. The individual tradesClosed, tradeReduced and tradeOpened fields contain the exact/official price each unit was filled at. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return OrderFillTransaction

pub fn with_gain_quote_home_conversion_factor(
    self,
    x: f32
) -> OrderFillTransaction
[src]

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. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return OrderFillTransaction

pub fn with_batch_id(self, x: String) -> OrderFillTransaction[src]

The ID of the "batch" that the Transaction belongs to. Transactions in the same batch are applied to the Account simultaneously. format: String representation of the numerical OANDA-assigned TransactionID

  • param String
  • return OrderFillTransaction

pub fn with_reason(self, x: String) -> OrderFillTransaction[src]

The reason that an Order was filled

  • param String
  • return OrderFillTransaction

pub fn with_half_spread_cost(self, x: f32) -> OrderFillTransaction[src]

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. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_order_id(self, x: String) -> OrderFillTransaction[src]

The ID of the Order filled. format: The string representation of the OANDA-assigned OrderID. OANDA- assigned OrderIDs are positive integers, and are derived from the TransactionID of the Transaction that created the Order.

  • param String
  • return OrderFillTransaction

pub fn with_financing(self, x: f32) -> OrderFillTransaction[src]

The financing paid or collected when the Order was filled. format: A decimal number encoded as a string. The amount of precision provided depends on the Account's home currency.

  • param f32
  • return OrderFillTransaction

pub fn with_time(self, x: DateTime<Utc>) -> OrderFillTransaction[src]

The date/time when the Transaction was created. format: The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).

  • param DateTime
  • return OrderFillTransaction

pub fn with_trade_opened(self, x: TradeOpen) -> OrderFillTransaction[src]

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.

  • param TradeOpen
  • return OrderFillTransaction

pub fn with_trades_closed(self, x: Vec<TradeReduce>) -> OrderFillTransaction[src]

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

  • param Vec
  • return OrderFillTransaction

Trait Implementations

impl<'de> Deserialize<'de> for OrderFillTransaction[src]

impl Serialize for OrderFillTransaction[src]

impl Debug for OrderFillTransaction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> Erased for T