Skip to content

Add FXMacroData forex data source#164

Draft
roberttidball wants to merge 1 commit into
OpenByteInc:mainfrom
roberttidball:agent/fxmacrodata-source
Draft

Add FXMacroData forex data source#164
roberttidball wants to merge 1 commit 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

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