CurrencyConverterServiceOptions
katanakit-js / CurrencyConverterServiceOptions
Interface: CurrencyConverterServiceOptions
Section titled “Interface: CurrencyConverterServiceOptions”Defined in: types/core/currency-conversion.ts:44
Wiring options for CurrencyConverterService (dependency injection).
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
pivot? |
| "USD" | "EUR" | "GBP" | "JPY" | "CHF" | "CAD" | "AUD" | "NZD" | "MXN" | "BRL" | "ARS" | "COP" | "CLP" | "SEK" | "NOK" | "DKK" | "PLN" | "CZK" | "HUF" | "RON" | "TRY" | "ISK" | "CNY" | "HKD" | "SGD" | "INR" | "KRW" | "THB" | "IDR" | "MYR" | "PHP" | "ILS" | "ZAR" |
Currency every rate is quoted against before a pair is resolved by division. Defaults to "USD". Sources round their quotes (Frankfurter keeps 5 decimal places), so a small quote such as KRW → USD is starved of significant digits. Quoting everything against one pivot and dividing keeps the precision on the side of the pair that is well conditioned. |
types/core/currency-conversion.ts:58 |
provider? |
ICurrencyRateProvider |
Rate source. Defaults to the service’s own provider. | types/core/currency-conversion.ts:46 |
ttlMs? |
number |
Cache time-to-live in milliseconds. Defaults to 10 minutes. | types/core/currency-conversion.ts:48 |