Foreign Exchange Rates

The foreign_exchange_rate object is how Modern Treasury represents exchange rate information between two currencies with high precision. The rate itself is not a resource that can be queried for, but will serialized as part of the object it applies to.

Attribute

Type

Description

base_amount

integer

Amount in the lowest denomination of the base_currency to convert, often called the "sell" amount.

base_currency

string
ISO 4217

Currency to convert, often called the "sell" currency.

exponent

integer

The exponent component of the rate. The decimal is calculated as value / (10 ^ exponent)

rate_string

string

A string representation of the rate, e.g. "1.234"

target_amount

integer

Amount in the lowest denomination of the target_currency, often called the "buy" amount.

target_currency

string
ISO 4217

Currency to convert the base_currency to, often called the "buy" currency.

value

integer

The whole number component of the rate. The decimal is calculated as value / (10 ^ exponent)