https://github.com/maurizuki/ecb.data.exchangerates
Provides access to the EXR Dataflow (currency exchange rates) of ECB Data Portal web services.
https://github.com/maurizuki/ecb.data.exchangerates
csharp dot-net ecb-rates exchange-rates rest-api webservice-client
Last synced: 12 months ago
JSON representation
Provides access to the EXR Dataflow (currency exchange rates) of ECB Data Portal web services.
- Host: GitHub
- URL: https://github.com/maurizuki/ecb.data.exchangerates
- Owner: maurizuki
- License: mit
- Created: 2023-03-16T14:59:52.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T13:45:11.000Z (over 1 year ago)
- Last Synced: 2025-03-25T22:30:11.151Z (over 1 year ago)
- Topics: csharp, dot-net, ecb-rates, exchange-rates, rest-api, webservice-client
- Language: C#
- Homepage: https://www.nuget.org/packages/ECB.Data.ExchangeRates
- Size: 62.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ECB.Data.ExchangeRates
[](https://github.com/maurizuki/ECB.Data.ExchangeRates/actions/workflows/build.yml)
[](https://github.com/maurizuki/ECB.Data.ExchangeRates/issues)
[](https://www.nuget.org/packages/ECB.Data.ExchangeRates)
[](https://www.nuget.org/packages/ECB.Data.ExchangeRates)
Provides access to the EXR Dataflow (currency exchange rates) of [ECB Data Portal](https://data.ecb.europa.eu) web services.
## Getting started
To add ECB.Data.ExchangeRates to your project, you can use the following NuGet Package Manager command:
```PowerShell
Install-Package ECB.Data.ExchangeRates
```
More options are available on the [ECB.Data.ExchangeRates page](https://www.nuget.org/packages/ECB.Data.ExchangeRates) of the NuGet Gallery website.
The console application ECB.Data.ExchangeRates.ConsoleApp (ECBEXR.exe) is intended as an example on how to use the web services client in a real scenario.
## Remarks
The class ExchangeRatesClient is derived from [HttpClient](https://docs.microsoft.com/dotnet/api/system.net.http.httpclient) that is intended to be instantiated once and re-used throughout the life of an application. Instantiating an ExchangeRatesClient class for every request will exhaust the number of sockets available under heavy loads. This will result in SocketException errors. Below is an example using ExchangeRatesClient correctly.
```C#
public class GoodController : ApiController
{
private static readonly ExchangeRatesClient ExchangeRatesClient;
static GoodController()
{
ExchangeRatesClient = new ExchangeRatesClient();
}
}
```
## Documentation
* [ECB.Data.ExchangeRates API reference](https://github.com/maurizuki/ECB.Data.ExchangeRates/blob/main/docs/ECB.Data.ExchangeRates.md)
* [Official ECB Data Portal web services documentation](https://data.ecb.europa.eu/help/api)