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
//! Polymarket Real-Time Data Service (RTDS) WebSocket client.
//!
//! This module provides a WebSocket client for receiving real-time data from Polymarket,
//! including market activity, comments, crypto/equity prices, and CLOB updates.
//!
//! # Example
//!
//! ```no_run
//! use polymarket_hft::client::polymarket::rtds::{RtdsClient, Subscription};
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! let mut client = RtdsClient::builder()
//! .auto_reconnect(true)
//! .build();
//!
//! client.connect().await?;
//!
//! // Subscribe to crypto prices
//! client.subscribe(vec![
//! Subscription::new("crypto_prices", "update")
//! .with_filter(r#"{"symbol":"BTCUSDT"}"#)
//! ]).await?;
//!
//! // Process messages
//! while let Some(message) = client.next_message().await {
//! println!("Received: {:?}", message);
//! }
//!
//! Ok(())
//! }
//! ```
pub use ;
pub use ;