Struct fxoanda_definitions::OrderBookBucket
source · pub struct OrderBookBucket {
pub price: Option<f32>,
pub short_count_percent: Option<f32>,
pub long_count_percent: Option<f32>,
}
Fields§
§price: Option<f32>
The lowest price (inclusive) covered by the bucket. The bucket covers the price range from the price to price + the order book’s bucketWidth. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
short_count_percent: Option<f32>
The percentage of the total number of orders represented by the short orders found in this bucket. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.
long_count_percent: Option<f32>
The percentage of the total number of orders represented by the long orders found in this bucket. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.
Implementations§
source§impl OrderBookBucket
impl OrderBookBucket
pub fn new() -> OrderBookBucket
sourcepub fn with_price(self, x: f32) -> Self
pub fn with_price(self, x: f32) -> Self
The lowest price (inclusive) covered by the bucket. The bucket covers the price range from the price to price + the order book’s bucketWidth. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
- param f32
- return OrderBookBucket
sourcepub fn with_short_count_percent(self, x: f32) -> Self
pub fn with_short_count_percent(self, x: f32) -> Self
The percentage of the total number of orders represented by the short orders found in this bucket. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.
- param f32
- return OrderBookBucket
sourcepub fn with_long_count_percent(self, x: f32) -> Self
pub fn with_long_count_percent(self, x: f32) -> Self
The percentage of the total number of orders represented by the long orders found in this bucket. format: A decimal number encoded as a string. The amount of precision provided depends on what the number represents.
- param f32
- return OrderBookBucket