[][src]Struct fxoanda_definitions::Instrument

pub struct Instrument {
    pub minimum_trade_size: Option<f32>,
    pub display_name: Option<String>,
    pub name: Option<String>,
    pub display_precision: Option<i32>,
    pub maximum_trailing_stop_distance: Option<f32>,
    pub minimum_trailing_stop_distance: Option<f32>,
    pub margin_rate: Option<f32>,
    pub commission: Option<InstrumentCommission>,
    pub trade_units_precision: Option<i32>,
    pub pip_location: Option<i32>,
    pub maximum_order_units: Option<f32>,
    pub maximum_position_size: Option<f32>,
    pub otype: Option<String>,
}

Fields

minimum_trade_size: Option<f32>

The smallest number of units allowed to be traded for this instrument. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

display_name: Option<String>

The display name of the Instrument

name: Option<String>

The name of the Instrument format: A string containing the base currency and quote currency delimited by a "_".

display_precision: Option<i32>

The number of decimal places that should be used to display prices for this instrument. (e.g. a displayPrecision of 5 would result in a price of "1" being displayed as "1.00000")

maximum_trailing_stop_distance: Option<f32>

The maximum trailing stop distance allowed for a trailing stop loss created for this instrument. Specified in price units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

minimum_trailing_stop_distance: Option<f32>

The minimum trailing stop distance allowed for a trailing stop loss created for this instrument. Specified in price units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

margin_rate: Option<f32>

The margin rate for this instrument. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

commission: Option<InstrumentCommission>

An InstrumentCommission represents an instrument-specific commission

trade_units_precision: Option<i32>

The amount of decimal places that may be provided when specifying the number of units traded for this instrument.

pip_location: Option<i32>

The location of the "pip" for this instrument. The decimal position of the pip in this Instrument's price can be found at 10 ^ pipLocation (e.g. -4 pipLocation results in a decimal pip position of 10 ^ -4 = 0.0001).

maximum_order_units: Option<f32>

The maximum units allowed for an Order placed for this instrument. Specified in units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

maximum_position_size: Option<f32>

The maximum position size allowed for this instrument. Specified in units. 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 Instrument

Methods

impl Instrument[src]

pub fn new() -> Instrument[src]

pub fn with_minimum_trade_size(self, x: f32) -> Self[src]

The smallest number of units allowed to be traded for this instrument. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

pub fn with_display_name(self, x: String) -> Self[src]

The display name of the Instrument

  • param String
  • return Instrument

pub fn with_name(self, x: String) -> Self[src]

The name of the Instrument format: A string containing the base currency and quote currency delimited by a "_".

  • param String
  • return Instrument

pub fn with_display_precision(self, x: i32) -> Self[src]

The number of decimal places that should be used to display prices for this instrument. (e.g. a displayPrecision of 5 would result in a price of "1" being displayed as "1.00000")

  • param i32
  • return Instrument

pub fn with_maximum_trailing_stop_distance(self, x: f32) -> Self[src]

The maximum trailing stop distance allowed for a trailing stop loss created for this instrument. Specified in price units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

pub fn with_minimum_trailing_stop_distance(self, x: f32) -> Self[src]

The minimum trailing stop distance allowed for a trailing stop loss created for this instrument. Specified in price units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

pub fn with_margin_rate(self, x: f32) -> Self[src]

The margin rate for this instrument. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

pub fn with_commission(self, x: InstrumentCommission) -> Self[src]

An InstrumentCommission represents an instrument-specific commission

  • param InstrumentCommission
  • return Instrument

pub fn with_trade_units_precision(self, x: i32) -> Self[src]

The amount of decimal places that may be provided when specifying the number of units traded for this instrument.

  • param i32
  • return Instrument

pub fn with_pip_location(self, x: i32) -> Self[src]

The location of the "pip" for this instrument. The decimal position of the pip in this Instrument's price can be found at 10 ^ pipLocation (e.g. -4 pipLocation results in a decimal pip position of 10 ^ -4 = 0.0001).

  • param i32
  • return Instrument

pub fn with_maximum_order_units(self, x: f32) -> Self[src]

The maximum units allowed for an Order placed for this instrument. Specified in units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

pub fn with_maximum_position_size(self, x: f32) -> Self[src]

The maximum position size allowed for this instrument. Specified in units. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.

  • param f32
  • return Instrument

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

The type of the Instrument

  • param String
  • return Instrument

Trait Implementations

impl Debug for Instrument[src]

impl Serialize for Instrument[src]

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

Auto Trait Implementations

impl Send for Instrument

impl Sync for Instrument

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]