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
<PackageReference Include="Tor.Mnb.Client" Version="1.0.0" />
<PackageVersion Include="Tor.Mnb.Client" Version="1.0.0" />
<PackageReference Include="Tor.Mnb.Client" />
paket add Tor.Mnb.Client --version 1.0.0
#r "nuget: Tor.Mnb.Client, 1.0.0"
#addin nuget:?package=Tor.Mnb.Client&version=1.0.0
#tool nuget:?package=Tor.Mnb.Client&version=1.0.0
Tor.Mnb.Client
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 | Versions 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection (>= 8.0.1)
- System.ServiceModel.Duplex (>= 4.10.3)
- System.ServiceModel.Federation (>= 4.10.3)
- System.ServiceModel.Http (>= 4.10.3)
- System.ServiceModel.NetTcp (>= 4.10.3)
- System.ServiceModel.Security (>= 4.10.3)
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 |