[−][src]Struct fxoanda_definitions::PositionBook
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]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for PositionBook
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Send for PositionBook
impl Sync for PositionBook
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
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>,