pub struct HyperliquidInstrumentInfo {
pub instrument_id: InstrumentId,
pub price_decimals: u8,
pub size_decimals: u8,
pub tick_size: Option<Decimal>,
pub step_size: Option<Decimal>,
pub min_notional: Option<Decimal>,
}Expand description
Configuration for price/size precision.
Fields§
§instrument_id: InstrumentId§price_decimals: u8§size_decimals: u8§tick_size: Option<Decimal>Minimum tick size for price (optional)
step_size: Option<Decimal>Minimum step size for quantity (optional)
min_notional: Option<Decimal>Minimum notional value for orders (optional)
Implementations§
Source§impl HyperliquidInstrumentInfo
impl HyperliquidInstrumentInfo
Sourcepub fn new(
instrument_id: InstrumentId,
price_decimals: u8,
size_decimals: u8,
) -> Self
pub fn new( instrument_id: InstrumentId, price_decimals: u8, size_decimals: u8, ) -> Self
Create config with specific precision
Sourcepub fn with_metadata(
instrument_id: InstrumentId,
price_decimals: u8,
size_decimals: u8,
tick_size: Decimal,
step_size: Decimal,
min_notional: Decimal,
) -> Self
pub fn with_metadata( instrument_id: InstrumentId, price_decimals: u8, size_decimals: u8, tick_size: Decimal, step_size: Decimal, min_notional: Decimal, ) -> Self
Create config with full metadata
Sourcepub fn with_precision(
instrument_id: InstrumentId,
price_decimals: u8,
size_decimals: u8,
) -> Self
pub fn with_precision( instrument_id: InstrumentId, price_decimals: u8, size_decimals: u8, ) -> Self
Create with basic precision config and calculated tick/step sizes
Sourcepub fn default_crypto(instrument_id: InstrumentId) -> Self
pub fn default_crypto(instrument_id: InstrumentId) -> Self
Default configuration for most crypto assets
Trait Implementations§
Source§impl Clone for HyperliquidInstrumentInfo
impl Clone for HyperliquidInstrumentInfo
Source§fn clone(&self) -> HyperliquidInstrumentInfo
fn clone(&self) -> HyperliquidInstrumentInfo
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 moreAuto Trait Implementations§
impl Freeze for HyperliquidInstrumentInfo
impl RefUnwindSafe for HyperliquidInstrumentInfo
impl Send for HyperliquidInstrumentInfo
impl Sync for HyperliquidInstrumentInfo
impl Unpin for HyperliquidInstrumentInfo
impl UnsafeUnpin for HyperliquidInstrumentInfo
impl UnwindSafe for HyperliquidInstrumentInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more