Skip to main content

HyperliquidInstrument

Trait HyperliquidInstrument 

Source
pub trait HyperliquidInstrument {
    // Required method
    fn hyperliquid_market(&self) -> HyperliquidMarket;
}
Expand description

An instrument representation a Hyperliquid perpetual subscription can name as a market.

Implemented for every instrument type this crate subscribes with: MarketDataInstrument, Keyed over it, and MarketInstrumentData. One blanket Identifier impl covers them all, which is also what lets DynamicStreams route to this integration through a single bound on the instrument type.

Required Methods§

Source

fn hyperliquid_market(&self) -> HyperliquidMarket

The perpetual market this instrument subscribes to.

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>