Struct fxoanda_definitions::PositionBookBucket
source · pub struct PositionBookBucket {
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 position 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 positions represented by the short positions 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 positions represented by the long positions 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 PositionBookBucket
impl PositionBookBucket
pub fn new() -> PositionBookBucket
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 position book’s bucketWidth. format: A decimal number encodes as a string. The amount of precision provided depends on the Instrument.
- param f32
- return PositionBookBucket
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 positions represented by the short positions 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 PositionBookBucket
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 positions represented by the long positions 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 PositionBookBucket