Skip to main content

Crate allratestoday

Crate allratestoday 

Source
Expand description

§AllRatesToday Rust SDK

Official Rust client for the AllRatesToday exchange rate API. Provides access to real-time mid-market exchange rates for 160+ currencies.

§Quick Start

use allratestoday::AllRatesToday;

let client = AllRatesToday::new("art_live_your_api_key");

// Get latest rates for USD against EUR and GBP
let rates = client.latest("USD", Some(&["EUR", "GBP"])).unwrap();
println!("{:?}", rates);

// Convert 100 USD to EUR
let result = client.convert("USD", "EUR", 100.0).unwrap();
println!("{:?}", result);

Structs§

AllRatesToday
The main client for interacting with the AllRatesToday API.
ConvertResponse
Response from the /v1/convert endpoint.
CurrencySymbol
A single currency entry returned by the /v1/symbols endpoint.
HistoricalRatePoint
A single data point within a historical rate series.
HistoricalRateSeriesResponse
Response from the /v1/historical-rates endpoint (preset periods).
HistoricalRatesResponse
Response from the /v1/historical endpoint.
LatestRatesResponse
Response from the /v1/latest endpoint.
RateResponse
Response from the /v1/rate endpoint (single pair).
SymbolsResponse
Response from the /v1/symbols endpoint.
TimeSeriesResponse
Response from the /v1/timeseries endpoint.

Enums§

AllRatesTodayError
Errors that can occur when using the AllRatesToday SDK.

Type Aliases§

Result
Convenience alias used throughout the crate.