pub trait HyperliquidInstrument {
// Required methods
fn hyperliquid_perp_market(&self) -> HyperliquidMarket;
fn hyperliquid_spot_market(&self) -> HyperliquidMarket;
}Expand description
An instrument representation a Hyperliquid subscription can name as a market, perpetual or spot.
Implemented for every instrument type this crate subscribes with: MarketDataInstrument,
Keyed over it, and MarketInstrumentData. One blanket Identifier impl per connector
covers them all, which is also what lets
DynamicStreams route to both connectors
through a single bound on the instrument type.
Required Methods§
Sourcefn hyperliquid_perp_market(&self) -> HyperliquidMarket
fn hyperliquid_perp_market(&self) -> HyperliquidMarket
The perpetual market this instrument subscribes to with Hyperliquid.
Sourcefn hyperliquid_spot_market(&self) -> HyperliquidMarket
fn hyperliquid_spot_market(&self) -> HyperliquidMarket
The spot market this instrument subscribes to with HyperliquidSpot.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl HyperliquidInstrument for MarketDataInstrument
impl HyperliquidInstrument for MarketDataInstrument
fn hyperliquid_perp_market(&self) -> HyperliquidMarket
fn hyperliquid_spot_market(&self) -> HyperliquidMarket
Source§impl<InstrumentKey> HyperliquidInstrument for Keyed<InstrumentKey, MarketDataInstrument>
impl<InstrumentKey> HyperliquidInstrument for Keyed<InstrumentKey, MarketDataInstrument>
fn hyperliquid_perp_market(&self) -> HyperliquidMarket
fn hyperliquid_spot_market(&self) -> HyperliquidMarket
Implementors§
impl<InstrumentKey> HyperliquidInstrument for MarketInstrumentData<InstrumentKey>
Built from a HyperliquidMeta lookup, so name_exchange is
already the venue’s coin, whichever connector subscribes with it.