How drager/tradingview works
Project Type and Purpose
• This is an open-source Rust library that provides bindings to interact with TradingView functionalities. It enables Rust applications to fetch financial data (like historical data and instruments) and subscribe to realtime data via TradingView.
• The primary goal is to abstract the complexity of communicating with TradingView, offering a simple API for data retrieval and realtime updates.
File Structure
• Top-level Files and Folders:
– The Cargo.toml, Cargo.lock, and src folder indicate this is a standard Rust library.
– The examples folder shows how the library is used. Each example (fetch_historical_data.rs, fetch_instruments.rs, realtime.rs) demonstrates different features.
– The .github folder with workflows (including a Rust CI workflow) indicates that continuous integration is part of the project.
• Inside src:
– lib.rs: Likely contains the core functionality and public API.
– websocket.rs: Suggests that realtime communication (probably over secure websockets using native-tls) is handled separately, representing a lower-level module that deals with persistent connections.
Insights from the README
• The README highlights that the library supports both historical data fetching and realtime subscriptions using secure TLS connections (enabled with the "native-tls" feature).
Final Advice
• Don’t over-complicate: While it's good to capture all critical elements, focus on clarity and readability.
• Including notes that describe the CI/CD integration, as it plays a role in ensuring the stability and quality of the library.