GetCurrencies - accountsIQ/API-Wiki GitHub Wiki

The GetCurrencies function retrieves the list of available currencies, including detailed information on each currency.

Declaration

C#

public WSResult2<WSCurrency[]> GetCurrencies(String token)

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  WSResult2OfArrayOfWSCurrency currencies = ws.GetCurrencies(auth);
  if (currencies.Status == OperationStatus.Success)
  {
      foreach (WSCurrency currency in currencies.Result)
      {
        Console.WriteLine("Currency: " + currency.CurrencyCode);
        Console.WriteLine(" -> Base Currency: " + (currency.IsBaseCurrency ? "yes" : "no"));
        Console.WriteLine(" -> Exchange Rate: " + currency.ExchangeRate.ToString());
      }
  }
  else
  {
      // Examine ErrorCode to get more information on the failure
  }
}

See Also

⚠️ **GitHub.com Fallback** ⚠️