Tor.Mnb.Client 1.0.0

dotnet add package Tor.Mnb.Client --version 1.0.0
                    
NuGet\Install-Package Tor.Mnb.Client -Version 1.0.0
                    
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="Tor.Mnb.Client" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tor.Mnb.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Tor.Mnb.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 Tor.Mnb.Client --version 1.0.0
                    
#r "nuget: Tor.Mnb.Client, 1.0.0"
                    
#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.
#addin nuget:?package=Tor.Mnb.Client&version=1.0.0
                    
Install Tor.Mnb.Client as a Cake Addin
#tool nuget:?package=Tor.Mnb.Client&version=1.0.0
                    
Install Tor.Mnb.Client as a Cake Tool

Tor.Mnb.Client

alternate text is missing from this package README image alternate text is missing from this package README image

A C# client library for MNB - Magyar Nemzeti Bank API with dependency injection support.

Installation

Install-Package Tor.Mnb.Client

Usage

NOTE: The base currency is always HUF (Hungarian Forint), but you don't have to hard code this, you can get this information from the IMnbClient.BaseCurrencyCode property.

Registering to .NET Core service collection

You have to register the MnbClient with the dependencies in the Program.cs file.

services.AddMnb();

IMnbClient usage

You can get the IMnbClient via dependency injection:

public class MyService
{
    public MyService(IMnbClient client)
    {
    }   
}
IMnbClient.GetCurrenciesAsync method

No method parameters.

Response: A string list with the available currency codes

IMnbClient.GetInfoAsync method

No method parameters.

Response:

Property Description
FirstDate First available date
LastDate Last available date
CurrencyCodes Available currency codes
IMnbClient.GetCurrencyUnitsAsync method

Method parameters:

Parameter Description Optional / Required
currencyCodes The requested three letter currency codes Required

Response: a list of the following opject

Property Description
CurrencyCode Three letter currency code
Unit The unit of the currency
IMnbClient.GetDateIntervalAsync method

No method parameters.

Response:

Property Description
StartDate First available date
EndDate Last available date
IMnbClient.GetExchangeRatesAsync method

Method parameters:

Parameter Description Optional / Required
startDate The start date Required
endDate The end date Required
currencyCodes The requested three letter currency codes Required

Response: a list of the following opject

Property Description
Date Date of the rates
BaseCurrencyCode Base currency code
Rates → CurrencyCode The three letter currency code
Rates → Unit Unit
Rates → ExchangeRate Exchange rate
IMnbClient.GetCurrentExchangeRatesAsync method

No method parameters.

Response:

Property Description
Date Date of the rates
BaseCurrencyCode Base currency code
Rates → CurrencyCode The three letter currency code
Rates → Unit Unit
Rates → ExchangeRate Exchange rate
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.0 166 3/9/2025