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
//! Historical data retrieval — clean architecture for fetching TradingView
//! chart data via WebSocket.
//!
//! # Architecture
//!
//! ```text
//! HistoricalClient::retrieve(request)
//! ├── HistoricalRequest (what to fetch)
//! ├── HistoricalState (mutable state during fetch)
//! └── returns HistoricalResult
//!
//! HistoricalClient::retrieve_batch(symbols, interval, num_bars, config)
//! ├── Runs N concurrent HistoricalClient::retrieve() calls
//! ├── Semaphore-controlled concurrency
//! └── returns BatchResult (successful + failed)
//! ```
//!
//! # Migration from v1
//!
//! The old `retrieve()` function in `single.rs` used scattered
//! `Arc<Mutex<...>>` fields and unbounded channels. The new
//! `HistoricalClient` consolidates state, uses bounded channels, and
//! provides a builder-based `HistoricalRequest`.
//!
//! The old batch implementation used a complex `CommandRunner` +
//! `BatchTracker` + `DataRx` architecture. The new `retrieve_batch()`
//! uses `JoinSet` + `Semaphore` for dramatically simpler concurrent
//! fetching.
// Re-export the public API.
pub use ;
pub use HistoricalClient;
pub use HistoricalRequest;
pub use HistoricalResult;