Skip to main content

OhlcClient

Trait OhlcClient 

Source
pub trait OhlcClient: Send + Sync {
    // Required method
    fn fetch_ohlc<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        pair_symbol: &'life1 str,
        interval: &'life2 str,
        limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Candle>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}
Expand description

Trait for clients that can fetch OHLC (candlestick / kline) data.

Required Methods§

Source

fn fetch_ohlc<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, pair_symbol: &'life1 str, interval: &'life2 str, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<Candle>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fetch OHLC candlesticks for the given pair symbol.

  • interval — candle width (e.g., “1m”, “5m”, “15m”, “1h”, “4h”, “1d”).
  • limit — maximum number of candles to return.

Implementors§