getExchangeRate()

Purpose

Returns the exchange rate between two currencies on the given date.

Syntax

getExchangeRate(string sessionId, string srcCode, string destCode, Calendar date);

Parameters

sessionId

A string containing the session ID obtained at log in.

srcCode

The currency code to convert from.

destCode

The currency code to convert to.

date

The Calandar object containing the date.

Output

Exchange rate as decimal

Example

Calendar today = Calendar.getInstance();
today.setTime(new Date());

double rate = binding.getExchangeRate(sessionId, "EUR", "USD", today);