Currensees

Crates.io Build Status

A Rust library to interact with the Currency API.

Usage

Add this library as a dependency in your Cargo.toml:

toml [dependencies] currensees = "0.1.0"

Authentication

```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),
}

} ```

Convert

Converting between two currencies

```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),
}

} ```

Convert All

Converting between two currencies

```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),
}

} ```

Setting up Currency API Account

Subscribe here for a user account.

Using the Currency API

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.

License

This project is licensed under the BSD 3-Clause License.

Copyright

(c) 2020 - 2023 Moat Systems Limited.