Skip to content

Add FXMacroData data source - #862

Open
roberttidball wants to merge 3 commits into
polakowo:masterfrom
roberttidball:agent/fxmacrodata-data
Open

roberttidball wants to merge 3 commits into
polakowo:masterfrom
roberttidball:agent/fxmacrodata-data

Conversation

@roberttidball

Copy link
Copy Markdown

Summary

Adds FXMacroData, a vectorbt.data.base.Data subclass for daily FX reference-rate data from FXMacroData.

The new data source:

  • fetches https://fxmacrodata.com/api/v1/forex/{base}/{quote} with start_date and end_date
  • accepts symbols such as EURUSD and EUR/USD
  • supports API keys via api_key, FXMACRODATA_API_KEY, or FXMD_API_KEY
  • converts FXMacroData daily spot/reference values into close-only OHLCV frames with Volume = 0
  • supports normal Data.download and update_symbol workflows

FXMacroData provides daily official-source reference rates, so this is intended for daily FX/macro research rather than intraday exchange-traded candles.

Validation

  • python -m pytest tests\test_fxmacrodata_data.py -q
  • python -m compileall -q vectorbt\data\custom.py tests\test_fxmacrodata_data.py
  • git diff --check

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