Creates a new instance of ForexClient
Optional
options: ForexClientOptions = {}The options for configuring the client
Fetches the list of available currencies
Optional
date: Date | "latest" = 'latest'The date for fetching currencies, or "latest"
for the most recent
Optional
options: RequestInit = {}Additional request options
A list of available currencies
Fetches the exchange rates for a specific currency
Optional
code: string = ...The currency code or locale code to get rates for
Optional
date: Date | "latest" = 'latest'The date for the rates, or 'latest'
for the most recent
Optional
options: RequestInit = {}Additional request options
A list of exchange rates
Fetches the exchange rate between two currencies
Optional
baseCode: string = ...The base currency code or locale code
Optional
destCode: stringThe destination currency code or locale code
Optional
date: Date | "latest" = 'latest'The date for the rate, or 'latest'
for the most recent
Optional
options: RequestInit = {}Additional request options
The exchange rate
Converts an amount from one currency to another
Optional
baseCode: string = ...The base currency code or locale code
Optional
destCode: stringThe destination currency code or locale code
Optional
amount: string | number = 0The amount to convert
Optional
date: Date | "latest" = 'latest'The date for the conversion rate, or 'latest'
for the most recent
Optional
options: RequestInit = {}Additional request options
The converted amount
Protected
getProtected
_fetch
A client to interact with the Forex API for fetching currency rates and conversion data