twelvedata/
lib.rs

1//! # Twelve Data API Wrapper
2//!
3//! This crate provides a wrappers for the [Twelve Data API](https://twelvedata.com/docs).
4//!
5//! The Twelve Data API provides financial market data for developers.
6//!
7//! ## Quick Start
8//!
9//! - First subscribe to the [Twelve Data API](https://twelvedata.com). You can use the free tier to get started. Or don't, most of the endpoints in reference do not require an API key.
10//! - Then create a new client with your API key.
11//! - Now you can start using the wrappers to get data from the Twelve Data API.
12//!
13//! ```rust
14//! use twelvedata::core;
15//!
16//! #[tokio::main]
17//! async fn main() {
18//!     let end_of_day = core::EndOfDay::builder()
19//!         .symbol("AAPL")
20//!         .apikey("your_api_key")
21//!         .execute()
22//!         .await;
23//!
24//!     match end_of_day {
25//!         Ok(eod) => println!("{:?}", eod),
26//!         Err(e) => eprintln!("Error: {}", e),
27//!     }
28//! }
29//! ```
30//!
31//! ## Notes
32//! - You need an async runtime to use this crate. I recommend [tokio](https://tokio.rs/). It is actually what to run async tests.
33//! - This crate is not yet complete. I will be adding more endpoints in the future.
34//! - Paid endpoints/features are not fully supported. They are in the library, but are not neccessarily guaranteed to work. This is because I do not have a paid subscription to test them.
35
36/// Core Data
37pub mod core;
38// Internal Library Tooling
39mod internal;
40/// Reference Twelve Data
41pub mod reference;
42// Mutal Funds Data
43pub mod mutualfunds;