pub fn crawl_l3_event(
    exchange: &str,
    market_type: MarketType,
    symbols: Option<&[String]>,
    on_msg: Arc<Mutex<dyn FnMut(Message) + 'static + Send>>,
    duration: Option<u64>,
) {
    let func = match exchange {
        "binance" => panic!("Binance does NOT provide level3 orderbook data"),
        "bitfinex" => crawlers::bitfinex::crawl_l3_event,
        "bitstamp" => crawlers::bitstamp::crawl_l3_event,
        "coinbase_pro" => crawlers::coinbase_pro::crawl_l3_event,
        "kucoin" => crawlers::kucoin::crawl_l3_event,
        _ => panic!("Unknown exchange {}", exchange),
    };
    let handle = func(market_type, symbols, on_msg, duration);
    if let Some(h) = handle {
        h.join().expect("The thread panicked");
    }
}
/// Crawl level3 orderbook update events.
Crawl level3 orderbook update events.
Crawl level3 orderbook update events .
pub fn crawl_l3_event(
    exchange: &str,
    market_type: MarketType,
    symbols: Option<&[String]>,
    on_msg: Arc<Mutex<dyn FnMut(Message) + 'static + Send>>,
    duration: Option<u64>,
) {
    let func = match exchange {
        "binance" => panic!("Binance does NOT provide level3 orderbook data"),
        "bitfinex" => crawlers::bitfinex::crawl_l3_event,
        "bitstamp" => crawlers::bitstamp::crawl_l3_event,
        "coinbase_pro" => crawlers::coinbase_pro::crawl_l3_event,
        "kucoin" => crawlers::kucoin::crawl_l3_event,
        _ => panic!("Unknown exchange {}", exchange),
    };
    let handle = func(market_type, symbols, on_msg, duration);
    if let Some(h) = handle {
        h.join().expect("The thread panicked");
    }
}
pub fn crawl_l3_event ( exchange : & str , market_type : MarketType , symbols : Option < & [ String ] > , on_msg : Arc < Mutex < dyn FnMut ( Message ) + ' static + Send > > , duration : Option < u64 > , ) { let func = match exchange { " " => panic ! ( " " ) , " " => crawlers :: bitfinex :: crawl_l3_event , " " => crawlers :: bitstamp :: crawl_l3_event , " " => crawlers :: coinbase_pro :: crawl_l3_event , " " => crawlers :: kucoin :: crawl_l3_event , _ => panic ! ( " " exchange ) , } ; let handle = func ( market_type , symbols , on_msg , duration ) ; if let Some ( h ) = handle { h . join ( ) . expect ( " " ) ; } }
Crawl level3 orderbook update events.
Crawl level3 orderbook update events .
exchange
&str
market_type
MarketType
symbols
Option<&[String]>
on_msg
Arc<Mutex<dyn FnMut(Message) + 'static + Send>>
duration
Option<u64>