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 |
|
|
— |
— |
Supported Commands |
— |
— |
The Currencyrate
object has the following properties:
XML / SOAP |
Database |
Description |
---|---|---|
|
— |
[Read-only] The name of the counter currency (or quote currency). |
|
— |
[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 |
|
— |
[Read-only] The symbol for the counter currency (or quote currency). |
|
— |
[Read-only] The date the quoted exchange rate applied, if dated. See Date Fields. |
|
— |
[Read-only] An Empty value if the quoted exchange rate is dated. Otherwise:
|
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
andfield
attributes to specify a criteria, such asdate-equal-to
for example, based on thedate
property value.
For more information about using read attributes and filtering, see Read Attributes and Filtering.
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 theCurrency
object and in thecurrency
table are quoted against the default currency for the account. The default currency for the company's OpenAir account is defined by thebase_currency
property for theCompany
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 theForexInput
object. This is the equivalent of editing exchange cross rates using the Edit Exchange Cross Rates in the OpenAir UI.