getExchangeRate
Get the exchange rate for a specific currency on any given day.
An example can be found here Get exchange rate example
Request
Data
Property | Required | Type | Description |
---|---|---|---|
currency | true | string | The currency code. |
date | false | string | The date for the exchange rate. The date must be in the format YYYY-MM-DD. If omitted the current date will be used. If the date is a Saturday or Sunday then the last Friday before that date will be used. |
Function
Property | Required | Type | Description |
---|---|---|---|
function | true | string | The function name to be used, for this page it’s getExchangeRate |
Response
Property | Type | Description |
---|---|---|
rate | decimal | The exchange rate for the currency on the given date. |
result | int | 0 if success. -1 if no exchange rate found for this date. If no date is given as an argument then the current date will be used. If the current date hasn't been set yet this will return -1 |
date | string | The date for for which this exchange rate is valid. This might differ from the requested date since weekends results in the last fridays rate. |