https://github.com/maurizuki/biexchangerates.client
A .NET wrapper for the REST API of the currency exchange rates of Banca d'Italia (the central bank of Italy).
https://github.com/maurizuki/biexchangerates.client
c-sharp dot-net exchange-rates rest-api
Last synced: 5 months ago
JSON representation
A .NET wrapper for the REST API of the currency exchange rates of Banca d'Italia (the central bank of Italy).
- Host: GitHub
- URL: https://github.com/maurizuki/biexchangerates.client
- Owner: maurizuki
- License: mit
- Created: 2020-09-21T15:58:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-18T13:06:42.000Z (over 1 year ago)
- Last Synced: 2024-12-10T09:52:33.724Z (over 1 year ago)
- Topics: c-sharp, dot-net, exchange-rates, rest-api
- Language: C#
- Homepage: https://www.nuget.org/packages/BIExchangeRates.Client
- Size: 46.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BIExchangeRates.Client
[](https://github.com/maurizuki/BIExchangeRates.Client)
[](https://github.com/maurizuki/BIExchangeRates.Client/actions/workflows/build.yml)
[](https://github.com/maurizuki/BIExchangeRates.Client/issues)
[](https://www.nuget.org/packages/BIExchangeRates.Client)
[](https://www.nuget.org/packages/BIExchangeRates.Client)
A .NET wrapper for the REST API of the currency exchange rates of [Banca d'Italia](https://tassidicambio.bancaditalia.it) (the central bank of Italy).
## Getting started
To add BIExchangeRates.Client to your project, you can use the following NuGet Package Manager command:
```PowerShell
Install-Package BIExchangeRates.Client
```
More options are available on the [BIExchangeRates.Client page](https://www.nuget.org/packages/BIExchangeRates.Client) of the NuGet Gallery website.
The console application [BIExchangeRates.Console](./src/BIExchangeRates.Console) is intended as an example on how to use the REST API wrapper 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
* [BIExchangeRates.Client API Reference](./docs/BIExchangeRates.Client.md)
* [Official REST API documentation](https://tassidicambio.bancaditalia.it/terzevalute-wf-ui-web/assets/files/Operating_Instructions.pdf)