[−][src]Struct fxoanda_definitions::Instrument
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]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Instrument
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,