Skip to content

GetCurrencyHistory

Leandro Rowies edited this page Feb 22, 2023 · 4 revisions

The GetCurrencyHistory receives a CurrencyCode as a parameter and retrieves the history of it, including detailed information about the Date it was changed, the Exchange Rate, etc.

Declaration

C#

public WSResult2<CurrencyHistory[]> GetCurrencyHistory(String token, String currencyCode)

Parameter List

Parameter Type Description
token String The session token retrieved during authentication.
currencyCode String The code of the currency for which the history is being requested.

Example

C#

Integration ws = new Integration();

String auth = ws.Login(entityID, partnerKey, userKey);
if (auth != null)
{
  var currencyHistoryResult = ws.GetCurrencyHistory(auth, "GBP");
  if (currencyHistoryResult.Status == OperationStatus.Success)
  {
      // Do something with the history result
  }
  else
  {
      // Examine ErrorCode to get more information on the failure
  }
}

See Also

Clone this wiki locally