Currencyrate

A currency exchange rate [Currencyrate] is the historical (dated, past or future) exchange rate used in the account for the currency.

Review the Usage Guidelines for the Currencyrate object.

XML

SOAP

REST

Database table

Object

Currencyrate

oaCurrencyrate

Supported Commands

Read

read()

The Currencyrate object has the following properties:

XML / SOAP

Database

Description

cname

[Read-only] The name of the counter currency (or quote currency).

crate

[Read-only] The foreign exchange rate indicating how much of the counter currency (or quote currency) is needed to purchase one unit of the base currency on either the date specified, dates after the last date or dates prior to the first date in the exchange cross rate table.

csymbol

[Read-only] The symbol for the counter currency (or quote currency).

date

[Read-only] The date the quoted exchange rate applied, if dated. See Date Fields.

type

[Read-only] An Empty value if the quoted exchange rate is dated. Otherwise:

  • PAST – If the quoted exchange rate applied on dates prior to exchange rates for dates prior to the first date in the exchange cross rate table.

  • FUTURE – If the quoted exchange rate applied on dates prior to exchange rates for dates after the last date in the exchange cross rate table.

Usage Guidelines

Use the Currencyrate to read current or historical exchange rates used for the account.

When reading Currencyrate objects:

  • Set the base_currency attribute to a three-letter currency code to get the exchange rates against the specified base currency. The foreign currency exchange rate is quoted against base currency for your company's OpenAir account otherwise. The base currency must be one of the currencies defined for the account in Administration > Global Settings > Organization > Currencies > Multi-currency.

  • Use the precision attribute to set the decimal precision (maximum number of digits to the right of the decimal point) for foreign currency exchange rate values.

  • To read the foreign exchange rates on a specific date or for a specific date range, use the filter and field attributes to specify a criteria, such as date-equal-to for example, based on the date property value.

For more information about using read attributes and filtering, see Read Attributes and Filtering.

Note:

There are three object types you can use in the XML API and SOAP API to interact with foreign currency exchange information:

  • Use the Currency object to set or read custom exchange rates. This is the equivalent of reading or setting custom exchange rates in Administration > Global Settings > Organization > Currencies > Set Exchange Rate when using the OpenAir UI. The exchange rates in the Currency object and in the currency table are quoted against the default currency for the account. The default currency for the company's OpenAir account is defined by the base_currency property for the Company object.

  • Use the Currencyrate to read current or historical exchange rates used for the account.

  • Use the ForexInput object to add or modify entries in the exchange cross rate table when the Multicurrency feature is enabled for your company's account. Make sure you review the Usage Guidelines for the ForexInput object. This is the equivalent of editing exchange cross rates using the Edit Exchange Cross Rates in the OpenAir UI.