crypto-ws-client 0.1.7

A versatile websocket client that supports many cryptocurrency exchanges.
Documentation

crypto-ws-client

A versatile websocket client that supports many cryptocurrency exchanges.

Usage

use crypto_ws_client::{BinanceSpotWSClient, WSClient};

fn main() {
    let mut ws_client = BinanceSpotWSClient::new(Box::new(|msg| println!("{}", msg)), None);
    let channels = vec!["btcusdt@aggTrade".to_string(), "btcusdt@depth".to_string(),];
    ws_client.subscribe(&channels);
    ws_client.run(None);
    ws_client.close();
}