Crates.io | tdameritrade_rust-async |
lib.rs | tdameritrade_rust-async |
version | 0.1.0 |
source | src |
created_at | 2022-09-20 03:34:27.428364 |
updated_at | 2022-09-20 03:34:27.428364 |
description | A Fully Automated Unofficial Asynchronous Rust Library For The TD Ameritrade API |
homepage | |
repository | https://github.com/Lolser9/tdameritrade_rust-async |
max_upload_size | |
id | 669561 |
size | 117,003 |
An Unofficial Asynchronous Rust Library For TD Ameritrade's API. The library automatically handles authentification so you don't have to worry about it.
Add this to your Cargo.toml
[dependencies]
tdameritrade_rust-async = "0.1.0"
use tdameritrade_rust_async::TDAClient;
#[tokio::main]
async fn main() {
// Get Token File
TDAClient::init_start(
"chrome_driver_path".into(), // Path To Chromedriver
"client_id@AMER.OAUTHAP".into(), // Client Id (Consumer Key)
"redirect_uri".into(), // Redirect URI (Callback URL)
"token_file_path".into(), // Where To Put Token File After Completion
)
.await;
}
use tdameritrade_rust_async::TDAClient;
#[tokio::main]
async fn main() {
// Create TDAClient
let mut client = TDAClient::new(
"client_id@AMER.OAUTHAP".into(), // Client Id (Consumer Key)
"redirect_uri".into(), // Redirect URI (Callback URL)
"token_file_path".into(), // Location Of Token File
);
// Get Quote
let res = client.get_quote("AAPL").await;
println!("{}", res);
}
tdameritrade_rust-async is released under the MIT license
tdameritrade_rust-async is an unofficial API wrapper. It is in no way endorsed by or affiliated with TD Ameritrade or any associated organization. The authors will accept no responsibility for any damage that might stem from use of this package. See the LICENSE file for more details.