1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//! Real-Time Data Socket (RTDS) client for streaming Polymarket data.
//!
//! **Feature flag:** `rtds` (required to use this module)
//!
//! This module provides a WebSocket-based client for subscribing to real-time
//! data streams from Polymarket's RTDS service.
//!
//! # Available Streams
//!
//! - **Crypto Prices (Binance)**: Real-time cryptocurrency price data from Binance
//! - **Crypto Prices (Chainlink)**: Price data from Chainlink oracle networks
//! - **Comments**: Comment events including creations, removals, and reactions
//!
//! # Example
//!
//! ```rust, no_run
//! use polymarket_client_sdk::rtds::Client;
//! use futures::StreamExt;
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let client = Client::default();
//!
//! // Subscribe to BTC prices
//! let stream = client.subscribe_crypto_prices(Some(vec!["btcusdt".to_owned()]))?;
//! let mut stream = Box::pin(stream);
//!
//! while let Some(price) = stream.next().await {
//! println!("BTC Price: {:?}", price?);
//! }
//!
//! Ok(())
//! }
//! ```
// Re-export commonly used types
pub use Client;
pub use RtdsError;
pub use SubscriptionInfo;
pub use ;
pub use ;