Skip to main content

MarketData

Trait MarketData 

Source
pub trait MarketData: Send + Sync {
    // Required methods
    fn markets<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketInfo>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn last_price<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 Symbol,
    ) -> Pin<Box<dyn Future<Output = Result<LastPrice>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn last_prices<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbols: Option<&'life1 [Symbol]>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<LastPrice>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn order_book<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 Symbol,
        depth: Option<u16>,
    ) -> Pin<Box<dyn Future<Output = Result<OrderBook>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn recent_trades<'life0, 'life1, 'async_trait>(
        &'life0 self,
        symbol: &'life1 Symbol,
        limit: Option<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Trade>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn klines<'life0, 'async_trait>(
        &'life0 self,
        request: KlineRequest,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Kline>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn markets<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<MarketInfo>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn last_prices<'life0, 'life1, 'async_trait>( &'life0 self, symbols: Option<&'life1 [Symbol]>, ) -> Pin<Box<dyn Future<Output = Result<Vec<LastPrice>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn order_book<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 Symbol, depth: Option<u16>, ) -> Pin<Box<dyn Future<Output = Result<OrderBook>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn recent_trades<'life0, 'life1, 'async_trait>( &'life0 self, symbol: &'life1 Symbol, limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Trade>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn klines<'life0, 'async_trait>( &'life0 self, request: KlineRequest, ) -> Pin<Box<dyn Future<Output = Result<Vec<Kline>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§