Skip to main content

CatalogReader

Trait CatalogReader 

Source
pub trait CatalogReader: Send + Sync {
    // Required methods
    fn get_market_catalog_state<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<MarketCatalogState>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_instruments_for_settlement<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<CatalogInstrument>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_distinct_strikes<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: i64,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Decimal>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_markets_for_underlying<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<(String, i64)>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn get_instruments_count<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: i64,
    ) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn market_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        underlying: &'life1 str,
        expiry: i64,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn instrument_exists<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Read-only catalog queries.

Required Methods§

Source

fn get_market_catalog_state<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: i64, ) -> Pin<Box<dyn Future<Output = Result<Option<MarketCatalogState>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get catalog state for a market (keyed by underlying + expiry).

Source

fn get_instruments_for_settlement<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<CatalogInstrument>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all instruments for a given underlying and expiry (for settlement).

Source

fn get_distinct_strikes<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: i64, ) -> Pin<Box<dyn Future<Output = Result<Vec<Decimal>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get distinct strike prices for an underlying and expiry.

Source

fn get_markets_for_underlying<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<(String, i64)>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all markets (underlying, expiry) for an underlying.

Source

fn get_instruments_count<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: i64, ) -> Pin<Box<dyn Future<Output = Result<i32>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count existing instruments for a market.

Source

fn market_exists<'life0, 'life1, 'async_trait>( &'life0 self, underlying: &'life1 str, expiry: i64, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if a market exists (underlying + expiry).

Source

fn instrument_exists<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check whether an instrument exists by symbol.

Implementors§