This functionality looks at the exchange rates between the currency of the historical data and the currency of the financial statements. Given that these can deviate from each other, e.g. the historical data is in USD but the financial statements are in EUR, it is important to adjust for this. This is especially relevant for models that use the historical data and the financial statements.

This function therefore shows the exchange rates that are used to convert the financial statements to the currency of the historical data. The historical market data is quote currency and the financial statements are base currency.

Note that you can get currency data from any currency as well by supplying the currency as a ticker. For example, if you want to get the exchange rates between USD and EUR you can use USDEUR=X as a ticker.

Important to note is that when an api_key is included in the Toolkit initialization that the data collection defaults to FinancialModelingPrep which is a more stable source and utilises your subscription. However, if this is undesired, it can be disabled by setting enforce_source to “YahooFinance”. If data collection fails from FinancialModelingPrep it automatically reverts back to YahooFinance.

Also known as: currency exchange, FX rates, foreign exchange rates.

Exchange Rates in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_exchange_rates as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    "ASML",
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.get_exchange_rates(period="monthly")

Or, after setting up the Finance Toolkit MCP, ask:

What were the monthly euro to US dollar exchange rates over the last ten months of 2025, with the returns since 2021?

Which returns:

Date Open High Low Close Adj Close Volume Return Cumulative Return
2025-03 1.0402 1.0954 1.0388 1.0815 1.08 1.1265e+07 0.0385 0.8926
2025-04 1.0815 1.1573 1.0778 1.1328 1.13 1.3243e+07 0.0463 0.9339
2025-05 1.1328 1.1422 1.1065 1.1346 1.13 9.02118e+06 0 0.9339
2025-06 1.1346 1.1788 1.1345 1.1787 1.18 8.07454e+06 0.0442 0.9752
2025-07 1.1787 1.183 1.1401 1.1415 1.14 7.03696e+06 -0.0339 0.9421
2025-08 1.1417 1.1743 1.1392 1.1707 1.17 3.44184e+06 0.0263 0.9669
2025-09 1.1696 1.1919 1.1608 1.1734 1.17 3.49176e+06 0 0.9669
2025-10 1.1736 1.1779 1.1522 1.1536 1.15 4.08101e+06 -0.0171 0.9504
2025-11 1.153 1.1656 1.1469 1.1601 1.16 3.2838e+06 0.0087 0.9587
2025-12 1.1594 1.1808 1.1589 1.1746 1.17 2.67505e+06 0.0086 0.9669

Parameters

get_exchange_rates accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe interval at which the historical data should be returned - daily, weekly, monthly, quarterly, or yearly. Defaults to “daily”."weekly"
return_columnstrThe column to use for the return calculation. Defaults to “Adj Close”."Close"
fill_nanboolDefines whether to forward fill NaN values. This defaults to True to prevent holes in the dataset. This is especially relevant for technical indicators.False
overwriteboolDefines whether to overwrite the existing data. Defaults to False.True
roundingintDefines the number of decimal places to round the returned data to. Defaults to None, which uses the rounding of the Toolkit. The rates the financial statements are translated with are never rounded.2
show_ticker_separationboolA boolean representing whether to show which tickers acquired data from FinancialModelingPrep and which tickers acquired data from YahooFinance. Defaults to True.False
Share