Skip to main content
ExchangeRate contains data on the rate to be used when converting amounts from one currency into another.

Schema ID

https://gobl.org/draft-0/currency/exchange-rate

Properties

TitlePropertyTypeDescription
Fromfromcurrency.CodeCurrency code this will be converted from.
Totocurrency.CodeCurrency code this exchange rate will convert into.
Atatcal.DateTimeAt represents the effective date and time at which the exchange rate is determined by the source. The time may be zero if referring to a specific day only.
Sourcesourcecbc.KeySource key provides a reference to the source the exchange rate was obtained from. Typically this will be determined by an application used to update exchange rates automatically.
Amountamountnum.AmountHow much is 1 of the “from” currency worth in the “to” currency.

Validation Rules

FieldTestValidation Code / Message
from
  • Present
GOBL-CURRENCY-EXCHANGERATE-01
From currency is required
to
  • Present
GOBL-CURRENCY-EXCHANGERATE-02
To currency is required
at
  • Not zero
GOBL-CURRENCY-EXCHANGERATE-03
Date/time must not be zero
amount
  • Min 0
GOBL-CURRENCY-EXCHANGERATE-04
Amount must be positive