Visit the Forex reference area for background details.

The forex API client allows a forex rate group to be created as well as retrieving a specific group specific to you. Below are code samples that show how this client can be used.

It is also possible to retrieve indicative rates and more detailed information about this feature can be found here Indicative FX rates and the API documentation can be found here Indicative Rates.

Configure a new forex API client

var config = new Configuration("{api-token}", Environment.Staging);
IForexApiClient forexClient = new ForexApiClient(config);

Create forex rate group

var durationInDays = 1;
Response<ForexInfo> response = await forexClient.CreateAsync(durationInDays);

Retrieve forex rate group

int rateGroupId = reponse.Resource.RateGroupId;
ForexInfo forexGroup = await forexClient.RetrieveAsync(rateGroupId);

Retrieve indicative forex rates

It is possible to retrieve indicative rates for all currencies or a list of currencies.

// retrieve all indicative rates
ForexInfo indicativeRates = await forexClient.GetIndicativeRatesAsync();

// retrieve indicative rates for specific currencies
var currencies = new List<Currency>{ Currency.GBP, Currency.USD };
ForexInfo specificRates = await forexClient.GetIndicativeRatesAsync(currencies);