#9603·Lean

Add FXMacroData macro custom data example

Author: roberttidballCreated Jul 10, 2026Updated Sep 8, 2026

Expected Behavior

LEAN should include a Python custom data example showing how to import public FXMacroData macroeconomic data without requiring credentials.

The example should demonstrate:

  • USD macro indicator history from FXMacroData announcements
  • USD release calendar rows with consensus, forecast, and source metadata
  • human-readable announcement datetimes for point-in-time backtests
  • parser coverage through fixture-based unit tests so CI does not depend on live network calls

Actual Behavior

LEAN has general Python custom data examples, but no FXMacroData example for macroeconomic indicators or official release-calendar data.

Potential Solution

Add a Python algorithm example with PythonData classes for FXMacroData public USD macro data:

  • FXMacroDataMacroIndicator for /v1/announcements/usd/{indicator}
  • FXMacroDataReleaseCalendar for /v1/calendar/usd

The first contribution would intentionally use public USD/no-key endpoints so maintainers and users can run the example without secrets. Authenticated FX spot history, COT positioning, commodities, broader currency coverage, market sessions, and seasonality can be considered as follow-up examples if this public baseline is accepted.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues