pub struct HyperliquidInstrumentDef {Show 15 fields
pub symbol: Ustr,
pub raw_symbol: Ustr,
pub base: Ustr,
pub quote: Ustr,
pub market_type: HyperliquidMarketType,
pub asset_index: u32,
pub price_decimals: u32,
pub size_decimals: u32,
pub tick_size: Decimal,
pub lot_size: Decimal,
pub max_leverage: Option<u32>,
pub only_isolated: bool,
pub is_hip3: bool,
pub active: bool,
pub raw_data: String,
}Expand description
Normalized instrument definition produced by this parser.
This deliberately avoids any tight coupling to Nautilus’ Cython types.
The InstrumentProvider can later convert this into Nautilus Instruments.
Fields§
§symbol: UstrHuman-readable symbol (e.g., “BTC-USD-PERP”, “PURR-USDC-SPOT”).
raw_symbol: UstrRaw symbol used in Hyperliquid WebSocket subscriptions/messages.
For perps: base currency (e.g., “BTC”).
For spot: @{pair_index} format (e.g., “@107” for HYPE-USDC).
base: UstrBase currency/asset (e.g., “BTC”, “PURR”).
quote: UstrQuote currency (e.g., “USD” for perps, “USDC” for spot).
market_type: HyperliquidMarketTypeMarket type (perpetual or spot).
asset_index: u32Asset index used for order submission. For perps: index in meta.universe (0, 1, 2, …). For spot: 10000 + index in spotMeta.universe.
price_decimals: u32Number of decimal places for price precision.
size_decimals: u32Number of decimal places for size precision.
tick_size: DecimalPrice tick size as decimal.
lot_size: DecimalSize lot increment as decimal.
max_leverage: Option<u32>Maximum leverage (for perps).
only_isolated: boolWhether requires isolated margin only.
is_hip3: boolWhether this is a HIP-3 builder-deployed perpetual.
active: boolWhether the instrument is active/tradeable.
raw_data: StringRaw upstream data for debugging.
Trait Implementations§
Source§impl Clone for HyperliquidInstrumentDef
impl Clone for HyperliquidInstrumentDef
Source§fn clone(&self) -> HyperliquidInstrumentDef
fn clone(&self) -> HyperliquidInstrumentDef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HyperliquidInstrumentDef
impl Debug for HyperliquidInstrumentDef
Source§impl<'de> Deserialize<'de> for HyperliquidInstrumentDef
impl<'de> Deserialize<'de> for HyperliquidInstrumentDef
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>,
Source§impl PartialEq for HyperliquidInstrumentDef
impl PartialEq for HyperliquidInstrumentDef
Source§impl Serialize for HyperliquidInstrumentDef
impl Serialize for HyperliquidInstrumentDef
impl StructuralPartialEq for HyperliquidInstrumentDef
Auto Trait Implementations§
impl Freeze for HyperliquidInstrumentDef
impl RefUnwindSafe for HyperliquidInstrumentDef
impl Send for HyperliquidInstrumentDef
impl Sync for HyperliquidInstrumentDef
impl Unpin for HyperliquidInstrumentDef
impl UnsafeUnpin for HyperliquidInstrumentDef
impl UnwindSafe for HyperliquidInstrumentDef
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
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>
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>
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