Skip to content

1Forge/dotnet-forex-quotes

Repository files navigation

dotnet-forex-quotes

dotnet-forex-quotes is a .NET library for fetching realtime forex quotes. Any contributions or issues opened are greatly appreciated.

Table of Contents

Requirements

Known Issues

Please see the list of known issues here: Issues

Installation

Need to add to Nuget package manager.

Usage

Initialize the client

var client = new ForexDataClient("YOUR_API_KEY");

Get the list of available symbols:

var symbols = client.GetSymbols();
foreach (var symbol in symbols)
{
    Console.WriteLine(symbol);
}

Get quotes for specified symbols:

var quotes = client.GetQuotes(new string[] {"EURUSD", "GBPJPY", "BTCUSD"});
foreach (var quote in quotes)
{
    Console.WriteLine(quote);
}

Convert from one currency to another:

var conversion = client.Convert("EUR", "USD", 100);
Console.WriteLine(conversion);

Check if the market is open:

var marketStatus = client.GetMarketStatus();
if (marketStatus.marketIsOpen)
{
    Console.WriteLine("The market is open!");
}
else
{
    Console.WriteLine("The market is closed!");
}

Quota used

var quota = client.GetQuota();
Console.WriteLine(quota);

## Support and Contact
Please contact me at contact@1forge.com if you have any questions or requests.

## License and Terms
This library is provided without warranty under the MIT license.

Releases

No releases published

Packages

No packages published

Languages