TCMBRatesClient 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package TCMBRatesClient --version 1.0.1
                    
NuGet\Install-Package TCMBRatesClient -Version 1.0.1
                    
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="TCMBRatesClient" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TCMBRatesClient" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="TCMBRatesClient" />
                    
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 TCMBRatesClient --version 1.0.1
                    
#r "nuget: TCMBRatesClient, 1.0.1"
                    
#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 TCMBRatesClient@1.0.1
                    
#: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=TCMBRatesClient&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=TCMBRatesClient&version=1.0.1
                    
Install as a Cake Tool

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:

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.
  • 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.

Version Downloads Last Updated
2.0.1 201 12/3/2024
2.0.0 141 12/2/2024
1.0.1 167 11/25/2024
1.0.0 159 11/25/2024