ICurrencyExchangeRateService
public interface ICurrencyExchangeRateService
Namespace
Methods
GetExchangeRate
Gets the exchange between the given currencies on the supplied date
public decimal GetExchangeRate(string fromCurrencyIsoCode, string toCurrencyIsoCode, DateTime date)
Parameters
Parameter | Description |
---|---|
fromCurrencyIsoCode
|
The currency ISO code to exchange from
|
toCurrencyIsoCode
|
The currency ISO code to exchange to
|
date
|
The date
|
Returns
The exchange rate between the two currencies for the given date
GetExchangeRates
Gets a list of currency exchange rates from the given currency, to the list of target currencies between two dates
public Dictionary<string, Dictionary<string, decimal>> GetExchangeRates(string fromCurrencyIsoCode,
string[] toCurrencyIsoCodes, DateTime dateFrom, DateTime dateTo)
Parameters
Parameter | Description |
---|---|
fromCurrencyIsoCode
|
The currency ISO code to exchange from
|
toCurrencyIsoCodes
|
The currency ISO codes to exchange to
|
dateFrom
|
The from date
|
dateTo
|
The to date
|
Returns
A dictionary of dictionaries where the first dictionary is keyed by the day and the second dictionary is keyed by the target currency code