FXMacroData

by fxmacrodata

Not rated
GitHub

About

Macroeconomic and FX data API + MCP server for 18 currencies with central bank announcements, calendar, COT, commodities, and forex.

Details

Author
fxmacrodata
Categories
Finance, Other, API

Setup

Install FXMacroData in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/fxmacrodata/fxmacrodata

Follow the installation instructions in the repository README, then restart your MCP client.

TheFXMacroData Python SDKprovides a simple and efficient interface for fetchingmacroeconomic indicators,forex prices,release calendars,COT positioning, andcommodity pricesfromFXMacroData.

It includes both synchronous and asynchronous clients and supports free USD macro endpoints.

- Fetch:

- Macroeconomic indicators— policy rates, inflation, GDP, unemployment, bond yields, and 100+ more
- FX spot rateswith optional technical indicators (SMA, RSI, MACD, Bollinger Bands)
- Release calendars— upcoming economic data release dates
- Data catalogue— discover available indicators per currency
- COT data— CFTC Commitment of Traders positioning
- Commodity prices— gold, silver, platinum

Or install the latest version from GitHub:

pip install git+https://github.com/fxmacrodata/fxmacrodata.git
from fxmacrodata import Client client = Client(api_key="YOUR_API_KEY") # Fetch macroeconomic indicators data = client.get_indicator( "aud", "policy_rate", start_date="2023-01-01", end_date="2023-11-01" ) print(data) # Forex price endpoint fx = client.get_fx_price("usd", "gbp", start_date="2025-01-01") print(fx) # Forex with technical indicators fx = client.get_fx_price("eur", "usd", indicators="sma_20,rsi_14,macd") print(fx) # Release calendar calendar = client.get_calendar("usd") print(calendar) # Data catalogue — discover available indicators catalogue = client.get_data_catalogue("usd") print(catalogue) # COT positioning data cot = client.get_cot("eur", start_date="2025-01-01") print(cot) # Commodity prices gold = client.get_commodities("gold", start_date="2026-01-01") print(gold)
import asyncio from fxmacrodata import AsyncClient async def main(): async with AsyncClient(api_key="YOUR_API_KEY") as client: # Fetch macroeconomic indicators data = await client.get_indicator("eur", "inflation") print(data) # Forex price endpoint fx = await client.get_fx_price("usd", "jpy") print(fx) # Release calendar calendar = await client.get_calendar("usd") print(calendar) # Data catalogue catalogue = await client.get_data_catalogue("usd") print(catalogue) # COT positioning cot = await client.get_cot("jpy") print(cot) # Commodity prices gold = await client.get_commodities("gold") print(gold) asyncio.run(main())

FXMacroData supports all practical OpenBB integration paths from this package:

- OpenBB Python: installable provider/router extension forobb.fxmacrodata..
- OpenBB REST API:/api/v1/fxmacrodata/
routes throughopenbb-api.
- OpenBB Workspace, generated: widgets generated byopenbb-apifrom inline metadata.
- OpenBB Workspace, custom: standalone backend servingwidgets.json,apps.json, and data endpoints.
- OpenBB MCP: tools exposed throughopenbb-mcp.
- OpenBB CLI: commands available afteropenbb-build.

OpenBB packages require Python 3.10+. Install the OpenBB Python extra:

pip install "fxmacrodata[openbb]" openbb-build

Then use FXMacroData from the OpenBB Python interface:

from openbb import obb obb.user.credentials.fxmacrodata_api_key = "YOUR_API_KEY" catalogue = obb.fxmacrodata.data_catalogue( currency="USD", provider="fxmacrodata", ).to_df() inflation = obb.fxmacrodata.macro_indicators( currency="USD", indicator="inflation", start_date="2020-01-01", provider="fxmacrodata", ).to_df() eurusd = obb.fxmacrodata.fx_historical( base="EUR", quote="USD", start_date="2024-01-01", provider="fxmacrodata", ).to_df()

Run the OpenBB REST API and generated Workspace backend:

pip install "fxmacrodata[openbb-api]" openbb-build fxmacrodata-openbb-api --host 127.0.0.1 --port 6900

Workspace can be connected tohttp://127.0.0.1:6900. The generated/widgets.jsonuses FXMacroData's inline OpenBB widget metadata.

Run the OpenBB Workspace custom backend:

pip install "fxmacrodata[workspace]" fxmacrodata-openbb-backend

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, setFXMACRODATA_OPENBB_ENABLE_DOCS=1before starting it.

pip install "fxmacrodata[mcp]" openbb-build fxmacrodata-openbb-mcp --default-categories fxmacrodata --host 127.0.0.1 --port 8001
pip install "fxmacrodata[openbb-cli]" openbb-build openbb

Seedocs/openbb-integration.mdfor 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.
- API key required for non-USD.

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".
- API key required.

Fetches upcoming economic data release dates for a currency.

- indicator: Optional filter to a specific indicator slug.
- Returnsannouncement_datetime(Unix timestamp) andrelease(indicator slug).

get_data_catalogue(currency, include_capabilities=False, include_coverage=False, indicator=None)

Discovers available macroeconomic indicators for a given currency.

- Returns a dict keyed by indicator slug withname,unit,frequency, andhas_official_forecast.
- API key required for non-USD.

get_cot(currency, start_date=None, end_date=None)

Fetches CFTC Commitment of Traders (COT) positioning data.

- Supported currencies:AUD,CAD,CHF,EUR,GBP,JPY,NZD,USD.
- API key required for non-USD.

get_commodities(indicator, start_date=None, end_date=None)

- indicator:"gold","silver", or"platinum".
- API key required.

18 currencies supported:USD, EUR, GBP, JPY, AUD, CAD, CHF, NZD, HKD, SGD, NOK, PLN, SEK, DKK, BRL, CNY, KRW, MXN.

The table below shows a sample of indicator coverage across four major currencies. Useget_data_catalogue()to discover the full list for any currency.

- Website:https://fxmacrodata.com
- API Docs:
https://fxmacrodata.com/docs
- GitHub:
https://github.com/fxmacrodata/fxmacrodata
- PyPI:
https://pypi.org/project/fxmacrodata/
- Readthedocs:
https://fxmacrodata.readthedocs.io/en/latest/
- Zenodo:
https://zenodo.org/records/18280968

Brazilian Open Finance MCP — connect 30+ banks (Itaú, Nubank, Bradesco, Santander, Inter, BB, Caixa, C6 and more) to Claude/Cursor. 13 read-only tools.

Live MCP server connecting AI agents to 36+ business data sources. OAuth 2.1 PKCE.

US stock market & financial data — SEC filings full-text search, XBRL fundamentals, 13F institutional holdings, insider & congressional trades, earnings-call transcripts, short interest, and FRED macro; 90+ tools, free tier, self-hostable.

A Model Context Protocol (MCP) server that exposes the FINRA Query API as a set of tools.

Get financial data and details about Romanian companies straight from ONRC and ANAF

Access BIST and global market data directly

MCP (Model Context Protocol) server for Kontomierz.pl — a Polish personal finance platform. Enables AI assistants (Claude Desktop, LibreChat, Cline) to read and manage your bank accounts, transactions, budgets, and scheduled payments — all through a single API. Built in Python, runs locally or in Docker.

Company, KYB, VAT, sanctions, LEI and address data for 15 EU countries (DK, NO, SE, FI, IE, UK, FR, DE, CZ, PL, LV, EE, NL, BE, LU). Free tier 100 lookups/day at addonnordic.com.

Cert-free PSD2 bank data API for AI agents — read EU bank transactions and balances without buying an eIDAS QWAC certificate

A production-clean MCP server for exchange rates (ECB data via Frankfurter) — latest, convert, historical, and time-series, with SRE-grade rate limiting, backoff, and structured logging.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.