Skip to content

Add FXMacroData forex data source - #164

Open
roberttidball wants to merge 3 commits into
OpenByteInc:mainfrom
roberttidball:agent/fxmacrodata-source
Open

Add FXMacroData forex data source#164
roberttidball wants to merge 3 commits into
OpenByteInc:mainfrom
roberttidball:agent/fxmacrodata-source

Conversation

@roberttidball

Copy link
Copy Markdown

Summary

Adds FXMacroData as a daily FX reference-rate source in the existing ForexDataSource fallback chain.

The integration:

  • fetches https://fxmacrodata.com/api/v1/forex/{base}/{quote} for 1D forex requests
  • supports API keys via FXMACRODATA_API_KEY or FXMD_API_KEY
  • converts FXMacroData daily reference rows into close-only kline rows with volume = 0
  • falls through to the existing Twelve Data, Tiingo, and yfinance sources for unsupported/intraday requests
  • adds config support through FXMacroDataConfig

FXMacroData provides official-source daily reference rates, so the adapter is intentionally limited to daily candles.

Validation

  • python -m pytest tests\test_fxmacrodata_forex_source.py -q
  • python -m compileall -q app\data_sources\forex.py app\config\data_sources.py tests\test_fxmacrodata_forex_source.py
  • git diff --check

roberttidball and others added 3 commits July 8, 2026 16:05
Switches the base URL from the undocumented fxmacrodata.com/api/v1
alias to the published api.fxmacrodata.com/v1 host, so the client
matches the public API reference.
Switches the base URL from the undocumented fxmacrodata.com/api/v1
alias to the published api.fxmacrodata.com/v1 host, so the client
matches the public API reference.
@roberttidball
roberttidball marked this pull request as ready for review August 26, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant