[−][src]Crate crypto_ws_client
A versatile websocket client that supports many cryptocurrency exchanges.
Example
use crypto_ws_client::{BinanceSpotWSClient, WSClient}; 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(Some(2)); // run for 2 seconds ws_client.close();
Structs
Traits
WSClient | The public interface of every WebSocket client. |