pub struct PriceFilter {
pub min_price: Option<f64>,
pub max_price: Option<f64>,
pub tick_size: f64,
}Expand description
Price constraints for an instrument.
Defines the allowable price ranges and increments for orders. Bots must use these to place valid orders in perpetual futures.
Fields§
§min_price: Option<f64>The minimum price allowed (optional).
The lowest price at which orders can be placed. If None, there’s no lower bound. Bots should check this to avoid rejected orders due to prices being too low.
max_price: Option<f64>The maximum price allowed (optional).
The highest price at which orders can be placed. If None, there’s no upper bound. Bots should ensure order prices are below this to avoid rejections.
tick_size: f64The price tick size.
The increment for price changes (e.g., 0.01 for two decimal places). Bots must round order prices to this increment to comply with Bybit’s precision rules, avoiding rejection.
Trait Implementations§
Source§impl Clone for PriceFilter
impl Clone for PriceFilter
Source§fn clone(&self) -> PriceFilter
fn clone(&self) -> PriceFilter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PriceFilter
impl Debug for PriceFilter
Source§impl Default for PriceFilter
impl Default for PriceFilter
Source§fn default() -> PriceFilter
fn default() -> PriceFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PriceFilterwhere
PriceFilter: Default,
impl<'de> Deserialize<'de> for PriceFilterwhere
PriceFilter: Default,
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
Auto Trait Implementations§
impl Freeze for PriceFilter
impl RefUnwindSafe for PriceFilter
impl Send for PriceFilter
impl Sync for PriceFilter
impl Unpin for PriceFilter
impl UnwindSafe for PriceFilter
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