Skip to content

fx_macro

fx_macro

Native FX and macroeconomic data tool backed by the FXMacroData REST API.

The tool answers four kinds of question: the release history of one indicator (CPI, policy rate, payrolls, GDP...), the upcoming release calendar, the list of indicators published for a currency, and daily FX rates. USD releases from the last 90 days, the USD calendar and every currency's catalogue answer without a key; other currencies, full history and FX rates need FXMACRODATA_API_KEY.

Classes

FXMacroDataError

Bases: RuntimeError

A credential-safe error from the FXMacroData API.

FXMacroDataTool

FXMacroDataTool(*, api_key: str | None = None)

Bases: BaseTool

Look up official macroeconomic releases, release calendars and FX rates.

Source code in src/openjarvis/tools/fx_macro.py
def __init__(self, *, api_key: str | None = None) -> None:
    self._api_key = (api_key or "").strip() or None

Functions