c8beb7e3ae
One class per provider (TwelveData, Oanda, Tiingo), all subclassing BaseDataProvider which owns cache, validation/cleaning, freshness + boundary guarantees, fetch_range pagination, and streaming stubs — subclasses implement only _fetch_raw. config.json data_providers.active selects the live feed; data_provider.py / oanda_provider.py stay as back-compat shims. Module 16 provider-abstraction tests (253 total green). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mc7XKYyPySVXiUpcN82QEK
25 lines
787 B
Python
Executable File
25 lines
787 B
Python
Executable File
"""
|
|
ForexBot2 — Data Provider (back-compat shim)
|
|
=============================================
|
|
The provider implementations live in the `providers/` package:
|
|
|
|
providers/base.py BaseDataProvider (shared contract + behavior)
|
|
providers/twelve_data.py TwelveDataProvider (SDK fetch, throttle, WS)
|
|
providers/oanda.py OandaDataProvider (v20 REST, real spread)
|
|
|
|
`ForexDataProvider` is the historical name of the Twelve Data provider and
|
|
is kept as an alias so existing imports keep working.
|
|
"""
|
|
|
|
from providers import ( # noqa: F401
|
|
BaseDataProvider,
|
|
DataIntegrityError,
|
|
PROVIDER_REGISTRY,
|
|
TwelveDataProvider,
|
|
make_data_provider,
|
|
_is_forex_weekend,
|
|
)
|
|
|
|
# Historical name for the Twelve Data provider.
|
|
ForexDataProvider = TwelveDataProvider
|