Skip to main content

HyperliquidInstrument

Trait HyperliquidInstrument 

Source
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§

Source

fn hyperliquid_perp_market(&self) -> HyperliquidMarket

The perpetual market this instrument subscribes to with Hyperliquid.

Source

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

Source§

impl<InstrumentKey> HyperliquidInstrument for Keyed<InstrumentKey, MarketDataInstrument>

Implementors§

Source§

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.