Fixer.Api.Client 1.0.3

dotnet add package Fixer.Api.Client --version 1.0.3
                    
NuGet\Install-Package Fixer.Api.Client -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fixer.Api.Client" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Fixer.Api.Client" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Fixer.Api.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Fixer.Api.Client --version 1.0.3
                    
#r "nuget: Fixer.Api.Client, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Fixer.Api.Client@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Fixer.Api.Client&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Fixer.Api.Client&version=1.0.3
                    
Install as a Cake Tool

Fixer.Api.Client Nuget .NET Tests

Fixer.Api.Client

A simple, strongly-typed, and configurable .NET API client for the Fixer.io currency exchange rates API.
Supports latest rates, historical data, currency conversion, time series, and fluctuations with built-in error handling and easy DI integration.


Features

  • Retrieve latest exchange rates with optional base currency and symbols filter
  • Fetch historical exchange rates for specific dates
  • Convert currency amounts between currencies
  • Query time series and fluctuation data
  • Automatic error handling with explicit exceptions for API errors
  • Supports cancellation tokens for async calls
  • Easy integration with IHttpClientFactory and Dependency Injection

Installation

Install the NuGet package via:

dotnet add package Fixer.Api.Client

Getting Started

Registering the client

Configure your services in Startup.cs or wherever you configure DI:

services.AddFixerClient(Configuration.GetSection("Fixer"));

Your configuration should include at least:

{
  "Fixer": {
    "ApiKey": "your_api_key_here",
    "BaseUrl": "https://data.fixer.io/api/"
  }
}

Usage example

Inject IFixerClient into your service or controller:

public class CurrencyService
{
    private readonly IFixerClient _fixerClient;

    public CurrencyService(IFixerClient fixerClient)
    {
        _fixerClient = fixerClient;
    }

    public async Task PrintLatestRatesAsync()
    {
        var response = await _fixerClient.GetLatestRatesAsync(baseSymbol: "EUR", symbols: new[] { "USD", "GBP" });
        if (response?.Success == true)
        {
            foreach (var rate in response.Rates)
            {
                Console.WriteLine($"{rate.Key}: {rate.Value}");
            }
        }
    }
}

Error Handling

API errors throw explicit exceptions derived from FixerApiException such as:

  • BadRequestException (400)
  • UnauthorizedException (401)
  • TooManyRequestsException (429)
  • And others per the Fixer API error codes

Use try-catch blocks to handle these gracefully.


Testing

Includes integration tests using xUnit to verify live API behavior. Configure your FIXER_API_KEY environment variable before running tests.


Contributing

Contributions welcome! Please open issues or pull requests.


License

This project is licensed under the MIT License - see the LICENSE file for details.


Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 245 8/26/2025
1.0.2 236 8/26/2025
1.0.1 195 7/17/2025
1.0.0 143 6/21/2025