The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the FXMacroData listing page.
The FXMacroData Python SDK provides a simple and efficient interface for fetching macroeconomic indicators, forex prices, release calendars, COT positioning, and commodity prices from FXMacroData.
It includes both synchronous and asynchronous clients, and USD macro endpoints work without an API key.
get_fx_price.requests and aiohttp.Install from PyPI:
Or install the latest version from GitHub:
FXMacroData supports all practical OpenBB integration paths from this package:
obb.fxmacrodata.*./api/v1/fxmacrodata/* routes through openbb-api.openbb-api from inline metadata.widgets.json, apps.json, and data endpoints.openbb-mcp.openbb-build.OpenBB packages require Python 3.10+. Install the OpenBB Python extra:
Then use FXMacroData from the OpenBB Python interface:
Run the OpenBB REST API and generated Workspace backend:
Workspace can be connected to http://127.0.0.1:6900. The generated
/widgets.json uses FXMacroData's inline OpenBB widget metadata.
Run the OpenBB Workspace custom backend:
Default backend URL:
Workspace exposes /widgets.json, /apps.json, /catalogue,
/release_calendar, /macro_indicator, /forex, /cot, and /commodity.
Swagger/OpenAPI docs are disabled by default for this backend. For local
debugging only, set FXMACRODATA_OPENBB_ENABLE_DOCS=1 before starting it.
Run OpenBB MCP:
Run OpenBB CLI:
See docs/openbb-integration.md for the full integration matrix and the
separate upstream OpenBB repository contribution path.
get_indicator(currency, indicator, start_date=None, end_date=None)Fetches macroeconomic indicator time series data.
currency: "usd", "aud", "eur", "gbp", "cad", "nok", "nzd", "jpy", "brl", "cny", "dkk", "pln", "sek", "sgd", etc.indicator: "policy_rate", "inflation", "gdp", "unemployment", "trade_balance", "current_account_balance", "gov_bond_10y", etc.get_fx_price(base, quote, start_date=None, end_date=None, indicators=None)Fetches daily FX spot rates between two currencies.
indicators: Optional comma-separated technical indicators — "sma_20", "sma_50", "sma_200", "rsi_14", "macd", "ema_12", "ema_26", "bollinger_bands", or "all".get_calendar(currency, indicator=None)Fetches upcoming economic data release dates for a currency.
indicator: Optional filter to a specific indicator slug.announcement_datetime (Unix timestamp) and release (indicator slug).get_data_catalogue(currency, include_capabilities=False, include_coverage=False, indicator=None)Discovers available macroeconomic indicators for a given currency.
name, unit, frequency, and has_official_forecast.get_cot(currency, start_date=None, end_date=None)Fetches CFTC Commitment of Traders (COT) positioning data.
AUD, CAD, CHF, EUR, GBP, JPY, NZD, USD.get_commodities(indicator, start_date=None, end_date=None)Fetches commodity price time series.
indicator: "gold", "silver", or "platinum".18 currencies supported: AUD, BRL, CAD, CHF, CNH, CNY, DKK, EUR, GBP, ILS, JPY, NGN, NOK, NZD, PEN, SEK, THB, USD.
The table below shows a sample of indicator coverage across four major currencies. Use get_data_catalogue() to discover the full list for any currency.
| Category | Metric | USD | EUR | AUD | GBP |
|---|---|---|---|---|---|
| Economy | GDP Growth | ✓ | ✓ | ✓ | ✓ |
| Inflation Rate | ✓ | ✓ | ✓ | ✓ | |
| Trade Balance | ✓ | ✓ | ✓ | ✓ | |
| Current Account Balance | ✓ | ✓ | ✓ | ✓ | |
| Retail Sales | ✓ | ✓ | ✓ | ✓ | |
| Industrial Production | ✓ | — | — | — | |
| Labor Market | Unemployment Rate | ✓ | ✓ | ✓ | ✓ |
| Employment Level | ✓ | ✓ | ✓ | ✓ | |
| Full-Time Employment | ✓ | ✓ | ✓ | — | |
| Part-Time Employment | ✓ | ✓ | ✓ | ✓ | |
| Participation Rate | ✓ | ✓ | ✓ | ✓ | |
| Non-Farm Payrolls | ✓ | — | — | — | |
| Monetary Policy | Policy Rate | ✓ | ✓ | ✓ | ✓ |
| Risk-Free Rate | ✓ | ✓ | ✓ | ✓ | |
| Central Bank Assets | ✓ | — | ✓ | — | |
| Government Bond Yields | 2-Year Govt Bond | ✓ | ✓ | ✓ | ✓ |
| 5-Year Govt Bond | ✓ | ✓ | ✓ | ✓ | |
| 10-Year Govt Bond | ✓ | ✓ | ✓ | ✓ | |
| Inflation-Linked Bond | ✓ | ✓ | ✓ | ✓ |
MIT License © FXMacroData