[][src]Struct fxoanda_definitions::PositionBook

pub struct PositionBook {
    pub buckets: Option<Vec<PositionBookBucket>>,
    pub instrument: Option<String>,
    pub price: Option<f32>,
    pub bucket_width: Option<f32>,
    pub time: Option<DateTime<Utc>>,
}

Fields

buckets: Option<Vec<PositionBookBucket>>

The partitioned position book, divided into buckets using a default bucket width. These buckets are only provided for price ranges which actually contain order or position data.

instrument: Option<String>

The position book's instrument format: A string containing the base currency and quote currency delimited by a "_".

price: Option<f32>

The price (midpoint) for the position book's instrument at the time of the position book snapshot format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

bucket_width: Option<f32>

The price width for each bucket. Each bucket covers the price range from the bucket's price to the bucket's price + bucketWidth. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

time: Option<DateTime<Utc>>

The time when the position book snapshot 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).

Methods

impl PositionBook[src]

pub fn new() -> PositionBook[src]

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

The partitioned position book, divided into buckets using a default bucket width. These buckets are only provided for price ranges which actually contain order or position data.

  • param Vec
  • return PositionBook

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

The position book's instrument format: A string containing the base currency and quote currency delimited by a "_".

  • param String
  • return PositionBook

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

The price (midpoint) for the position book's instrument at the time of the position book snapshot format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return PositionBook

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

The price width for each bucket. Each bucket covers the price range from the bucket's price to the bucket's price + bucketWidth. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.

  • param f32
  • return PositionBook

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

The time when the position book snapshot 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 PositionBook

Trait Implementations

impl Debug for PositionBook[src]

impl Serialize for PositionBook[src]

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

Auto Trait Implementations

Blanket Implementations

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

impl<T> From for 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]