A Rust library to interact with the Currency API.
Add this library as a dependency in your Cargo.toml
:
toml
[dependencies]
currensees = "0.1.0"
```rs use currensees::auth;
async fn main() { let username = "yourusername"; let password = "yourpassword";
match auth::login(username, password).await {
Ok(response) => println!("Login successful: {:?}", response),
Err(error) => println!("Error: {:?}", error),
}
} ```
```rs use currensees::convert;
async fn main() { let usertype = "member"; let username = "yourusername"; let date = "20230402"; let basecurrency = "GBP"; let targetcurrency = "EUR"; let amount = "500";
match convert::convert(user_type, username, date, base_currency, target_currency, amount).await {
Ok(response) => println!("Conversion result: {:?}", response),
Err(error) => println!("Error: {:?}", error),
}
} ```
```rs use currensees::convert_all;
async fn main() { let usertype = "member"; let username = "yourusername"; let basecurrency = "GBP"; let amount = "500"; let date = "202304_02";
match convert_all::convert_all(user_type, username, base_currency, amount, date).await {
Ok(response) => println!("Conversion result: {:?}", response),
Err(error) => println!("Error: {:?}", error),
}
} ```
Subscribe here for a user account.
You can read the API documentation to understand what's possible with the Currency API. If you need further assistance, don't hesitate to contact us.
This project is licensed under the BSD 3-Clause License.
(c) 2020 - 2023 Moat Systems Limited.