[][src]Struct fxoanda_definitions::Price

pub struct Price {
    pub asks: Option<Vec<PriceBucket>>,
    pub base_ask: Option<f32>,
    pub timestamp: Option<DateTime<Utc>>,
    pub closeout_bid: Option<f32>,
    pub bids: Option<Vec<PriceBucket>>,
    pub instrument: Option<String>,
    pub base_bid: Option<f32>,
    pub closeout_ask: Option<f32>,
    pub tradeable: Option<bool>,
}

Fields

asks: Option<Vec<PriceBucket>>

The list of prices and liquidity available on the Instrument's ask side. It is possible for this list to be empty if there is no ask liquidity currently available for the Instrument in the Account.

base_ask: Option<f32>

The base ask price as calculated by pricing. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

timestamp: Option<DateTime<Utc>>

The date/time when the Price 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).

closeout_bid: Option<f32>

The closeout bid price. This price is used when a bid is required to closeout a Position (margin closeout or manual) yet there is no bid liquidity. The closeout bid is never used to open a new position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

bids: Option<Vec<PriceBucket>>

The list of prices and liquidity available on the Instrument's bid side. It is possible for this list to be empty if there is no bid liquidity currently available for the Instrument in the Account.

instrument: Option<String>

The Price's Instrument. format: A string containing the base currency and quote currency delimited by a "_".

base_bid: Option<f32>

The base bid price as calculated by pricing. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

closeout_ask: Option<f32>

The closeout ask price. This price is used when an ask is required to closeout a Position (margin closeout or manual) yet there is no ask liquidity. The closeout ask is never used to open a new position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

tradeable: Option<bool>

Flag indicating if the Price is tradeable or not

Methods

impl Price[src]

pub fn new() -> Price[src]

pub fn with_asks(self, x: Vec<PriceBucket>) -> Self[src]

The list of prices and liquidity available on the Instrument's ask side. It is possible for this list to be empty if there is no ask liquidity currently available for the Instrument in the Account.

  • param Vec
  • return Price

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

The base ask price as calculated by pricing. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return Price

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

The date/time when the Price 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 Price

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

The closeout bid price. This price is used when a bid is required to closeout a Position (margin closeout or manual) yet there is no bid liquidity. The closeout bid is never used to open a new position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return Price

pub fn with_bids(self, x: Vec<PriceBucket>) -> Self[src]

The list of prices and liquidity available on the Instrument's bid side. It is possible for this list to be empty if there is no bid liquidity currently available for the Instrument in the Account.

  • param Vec
  • return Price

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

The Price's Instrument. format: A string containing the base currency and quote currency delimited by a "_".

  • param String
  • return Price

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

The base bid price as calculated by pricing. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return Price

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

The closeout ask price. This price is used when an ask is required to closeout a Position (margin closeout or manual) yet there is no ask liquidity. The closeout ask is never used to open a new position. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return Price

pub fn with_tradeable(self, x: bool) -> Self[src]

Flag indicating if the Price is tradeable or not

  • param bool
  • return Price

Trait Implementations

impl Debug for Price[src]

impl Serialize for Price[src]

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

Auto Trait Implementations

impl Send for Price

impl Sync for Price

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]