Skip to content

OpenExchangeAPI/sdk-dotnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenExchangeAPI .NET SDK

Minimal, idiomatic .NET client for OpenExchangeAPI

  • All endpoints supported
  • API key is optional
  • Async/await support
  • Strong types and precise decimal support

Installation

dotnet add package OpenExchangeApi

Or add OpenExchangeApiClient.cs to your project.

Usage

using OpenExchangeApi;

var client = new OpenExchangeApiClient("YOUR_API_KEY"); // API key optional

// Get latest rates
var latest = await client.GetLatestAsync();

// Convert currency
var result = await client.ConvertAsync("USD", "EUR", 100);

// List currencies
var currencies = await client.ListCurrenciesAsync();

// Get currency details
var eur = await client.GetCurrencyAsync("EUR");

API Reference

  • GetLatestAsync(base)
  • GetLatestPreciseAsync(base)
  • GetHistoricalAsync(date, base)
  • GetHistoricalPreciseAsync(date, base)
  • ConvertAsync(from, to, amount)
  • ConvertPreciseAsync(from, to, amount)
  • ListCurrenciesAsync(type)
  • GetCurrencyAsync(code)

All methods throw OpenExchangeApiException on error.

Error Handling

try {
    var data = await client.GetLatestAsync();
} catch (OpenExchangeApiException e) {
    // Handle error
}

License

MIT

About

Official .NET SDK for OpenExchangeAPI — seamlessly integrate real-time & historical exchange rate data into C# and .NET applications.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages