Securely Redirecting...

Connecting to Stripe

Open Source Jupyter · Python

Notebook Gallery

Runnable Jupyter notebooks that demonstrate real FXMacroData workflows — from carry trade analysis and macro signal generation to AI-assisted currency research. Open directly in Google Colab or browse a static render on NBViewer.

5 notebooks

All Notebooks

Each notebook is a self-contained Python script with explanations. Click Open in Colab for a live interactive session or View on NBViewer for a static read-only render.

Quick Start via RapidAPI

Beginner

The fastest way to call FXMacroData endpoints. Shows how to authenticate with a RapidAPI key, retrieve interest-rate announcements for AUD, and parse the JSON response — all in under ten lines of Python.

Quickstart REST API RapidAPI Beginner-Friendly

Endpoints used

/v1/announcements/{currency}/policy_rate

Economic Calendar Explorer

Beginner

Fetches an iCalendar feed of upcoming macroeconomic data-release events, parses VEVENTs with the `icalendar` library, and prints a structured schedule of release names, dates, and times. Useful as a companion to the FXMacroData /v1/calendar endpoints.

Release Calendar iCalendar Event Parsing Scheduling

Endpoints used

/v1/calendar/{currency}

Carry Trade Analysis

Intermediate

Fetch policy rates for major currency pairs from the FXMacroData API, compute the daily interest rate differential (cost of carry), and plot it alongside the corresponding FX spot price using Plotly. Includes Pearson correlation coefficients for AUD/USD, EUR/USD, and AUD/EUR.

Carry Trade Policy Rate FX Spot Plotly Correlation

Endpoints used

/v1/announcements/{currency}/policy_rate

/v1/forex/{base}/{quote}

AUD/USD: A Data-Driven Currency Analysis

Intermediate

A full multi-indicator macro breakdown of AUD/USD. Pulls GDP, CPI, unemployment, trade balance, and policy rate data for both Australia and the US, visualises each series with Matplotlib and Seaborn, then uses Gemini AI to generate a research-grade buy/sell narrative.

Currency Analysis GDP CPI Trade Balance AI Seaborn

Endpoints used

/v1/announcements/{currency}/gdp

/v1/announcements/{currency}/cpi

/v1/announcements/{currency}/policy_rate

/v1/announcements/{currency}/trade_balance

/v1/announcements/{currency}/unemployment

Macro Signal Generator

Advanced

Loads cross-currency macro indicator data from the FXMacroData API, ranks each currency across GDP momentum, CPI surprise, and rate differential dimensions, and outputs a ranked buy/sell/hold signal table with Matplotlib visualisations.

Trading Signals Multi-Currency Macro Ranking Matplotlib

Endpoints used

/v1/announcements/{currency}/{indicator}

/v1/forex/{base}/{quote}

Ready to explore the data yourself?

All notebooks use the public FXMacroData REST API. Get a free API key to run them without restriction and unlock the full indicator catalogue.