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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! # Finnhub Rust Client
//!
//! A comprehensive, type-safe Rust client for the Finnhub.io financial data API.
//!
//! ## Features
//!
//! - 📊 Extensive API coverage (103/107 endpoints - 96.3%)
//! - 🚀 Full async/await support via Tokio
//! - ⚡ Built-in rate limiting with flexible strategies
//! - 🔄 Basic WebSocket structure (feature-gated, not production-ready)
//! - 🛡️ Comprehensive error handling with retry helpers
//! - 🔒 Type-safe request and response models
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use finnhub::FinnhubClient;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), finnhub::Error> {
//! let client = FinnhubClient::new("your-api-key");
//!
//! // Get a stock quote
//! let quote = client.stock().quote("AAPL").await?;
//! println!("AAPL price: ${}", quote.current_price);
//!
//! // Get company profile
//! let profile = client.stock().company_profile("AAPL").await?;
//! println!("Company: {}", profile.name.unwrap_or_default());
//!
//! Ok(())
//! }
//! ```
//!
//! ## Design Philosophy
//!
//! This library follows a minimalist design philosophy:
//! - **No automatic retries**: Applications implement context-aware retry logic
//! - **No response caching**: Applications manage cache based on their needs
//! - **Flexible rate limiting**: Choose between strict per-second or burst-friendly strategies
//!
//! The library provides the tools (`is_retryable()`, `retry_after()`) but lets you decide how to use them.
pub use ;
pub use ;
pub use RateLimiter;