TCMBRatesClient 1.0.1
See the version list below for details.
dotnet add package TCMBRatesClient --version 1.0.1
NuGet\Install-Package TCMBRatesClient -Version 1.0.1
<PackageReference Include="TCMBRatesClient" Version="1.0.1" />
paket add TCMBRatesClient --version 1.0.1
#r "nuget: TCMBRatesClient, 1.0.1"
// Install TCMBRatesClient as a Cake Addin #addin nuget:?package=TCMBRatesClient&version=1.0.1 // Install TCMBRatesClient as a Cake Tool #tool nuget:?package=TCMBRatesClient&version=1.0.1
TCMBRatesClient
TCMBRatesClient is a .NET library for fetching exchange rates from the Central Bank of Turkey (TCMB). This package simplifies retrieving hourly exchange rate data as XML from the TCMB's official service.
Features
- Fetch exchange rate data for specific dates and times.
- Parse XML responses into strongly-typed models.
- Easy integration with .NET applications.
Installation
Install the package via NuGet Package Manager:
dotnet add package TCMBRatesClient
Or use the Visual Studio NuGet Package Manager UI to search for TCMBRatesClient.
Usage
Basic Example
Below is an example of fetching exchange rate data for a specific date and time:
using TCMBRatesClient.TCMBClient;
var client = TcmbRates.CreateClient();
var rates = await client.GetRatesAsync(DateTime.Now);
foreach (var rate in rates.ExchangeRates)
{
Console.WriteLine($"{rate.CurrencyCode}: {rate.BuyRate}");
}
Models
TcmbResponse
The response model contains the following properties:
- HeaderInfo: Metadata about the response, such as the timestamp.
- ExchangeRates: A list of ExchangeRate objects.
ExchangeRate
Represents individual exchange rates with:
- CurrencyCode (e.g., USD, EUR)
- BuyRate (decimal)
Contribution
Contributions are welcome! If you encounter a bug or have suggestions, please open an issue or submit a pull request on the GitHub repository.
License
This package is licensed under the MIT License. See the LICENSE file for more details.
Contact
For inquiries or support, please contact:
- Email: emrah.atalay@outlook.com
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. |
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.