#[non_exhaustive]pub struct OrderBook {
pub instrument: Option<InstrumentName>,
pub time: Option<DateTime>,
pub price: Option<PriceValue>,
pub bucket_width: Option<PriceValue>,
pub buckets: Vec<OrderBookBucket>,
pub unix_time: Option<DateTime>,
}Expand description
The representation of an instrument’s order book at a point in time
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.instrument: Option<InstrumentName>The order book’s instrument
time: Option<DateTime>The time when the order book snapshot was created.
price: Option<PriceValue>The price (midpoint) for the order book’s instrument at the time of the order book snapshot
bucket_width: Option<PriceValue>The price width for each bucket. Each bucket covers the price range from the bucket’s price to the bucket’s price + bucketWidth.
buckets: Vec<OrderBookBucket>The partitioned order book, divided into buckets using a default bucket width. These buckets are only provided for price ranges which actually contain order or position data.
unix_time: Option<DateTime>The book’s creation time as a Unix timestamp (seconds), string-encoded. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for OrderBook
impl<'de> Deserialize<'de> for OrderBook
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for OrderBook
Auto Trait Implementations§
impl Freeze for OrderBook
impl RefUnwindSafe for OrderBook
impl Send for OrderBook
impl Sync for OrderBook
impl Unpin for OrderBook
impl UnsafeUnpin for OrderBook
impl UnwindSafe for OrderBook
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more