Get Fx Rates
get_fx_ratesExchange rates: the closing rate for a currency pair on a date, or a series over a range. Use when the user asks for an exchange rate, FX, a currency conversion, what the euro to dirham or pound to dollar rate is, what a currency move cost us, or whether it is cheaper to buy in one currency or another. With one date it returns that day's closing rate. With a range of 62 days or less it returns the daily closing series and the percentage change. Over 62 days it returns monthly averages (up to 36 months). Read-only, needs no company data. Quote rates from the result only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Currency to convert to, three-letter code, for example AED. | |
| date | No | A single date (YYYY-MM-DD). Defaults to today when no range is given. | |
| from | Yes | Currency to convert from, three-letter code, for example EUR. | |
| company | No | Which company to read, by name or id, when the account has more than one (see list_companies). Leave it out to use the only company, or the default. | |
| end_date | No | End of a range (YYYY-MM-DD). Use with start_date. | |
| start_date | No | Start of a range (YYYY-MM-DD). Use with end_date. |