[−][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
Structs
BinanceFutureWSClient | Binance Coin-margined Future market. |
BinanceInverseSwapWSClient | Binance Coin-margined Perpetual Swap market |
BinanceLinearSwapWSClient | Binance USDT-margined Perpetual Swap market. |
BinanceSpotWSClient | Binance Spot market. |
BitMEXWSClient | The WebSocket client for BitMEX. |
BitfinexWSClient | The WebSocket client for Bitfinex, including all markets. |
BitstampWSClient | The WebSocket client for Bitstamp Spot market. |
CoinbaseProWSClient | The WebSocket client for CoinbasePro. |
HuobiFutureWSClient | Huobi Future market. |
HuobiInverseSwapWSClient | Huobi Inverse Swap market. |
HuobiLinearSwapWSClient | Huobi Linear Swap market. |
HuobiOptionWSClient | Huobi Option market. |
HuobiSpotWSClient | Huobi Spot market. |
KrakenWSClient | The WebSocket client for Kraken. |
MXCSpotWSClient | MXC Spot market. |
MXCSwapWSClient | MXC Swap market. |
OKExWSClient | The WebSocket client for OKEx. |
Traits
WSClient | The public interface of every WebSocket client. |