Skip to content

maurizuki/ECB.Data.ExchangeRates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECB.Data.ExchangeRates

GitHub Workflow Status (with event) issues Nuget Nuget

Provides access to the EXR Dataflow (currency exchange rates) of ECB Data Portal web services.

Getting started

To add ECB.Data.ExchangeRates to your project, you can use the following NuGet Package Manager command:

Install-Package ECB.Data.ExchangeRates

More options are available on the ECB.Data.ExchangeRates page 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 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.

public class GoodController : ApiController
{
    private static readonly ExchangeRatesClient ExchangeRatesClient;

    static GoodController()
    {
        ExchangeRatesClient = new ExchangeRatesClient();
    }
}

Documentation