-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
backendBackend/API/database workBackend/API/database workbugSomething isn't workingSomething isn't workingin-progressWork currently being implementedWork currently being implemented
Description
Summary
Recent commit 6608f5cd5e4d8840ee80f7bdfd20236df262c0e6 added Yahoo Finance OHLCV fallback in run_daily_fetch(), but the new path assumes every symbol in eod_prices is TWSE. The schema explicitly supports both TWSE and TPEx.
Evidence
src/openclaw/market_data_fetcher.pywrote Yahoo fallback rows with a hardcodedmarket='TWSE'.src/openclaw/agents/eod_analysis.pyandsrc/openclaw/eod_ingest.pypassSELECT DISTINCT symbol FROM eod_prices, which includes TPEx holdings.- This causes TPEx symbols to go through the wrong fallback path and be persisted back with the wrong market.
Minimal fix
- Look up each symbol's market from existing
eod_pricesrows. - Skip TWSE
STOCK_DAYfor TPEx symbols. - Use Yahoo
.TWOfor TPEx symbols and preserve the original market on insert.
Verification
- Add a regression test in
src/tests/test_market_data_fetcher.pycovering a TPEx symbol through Yahoo fallback. - Run
pytest -q src/tests/test_market_data_fetcher.py.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendBackend/API/database workBackend/API/database workbugSomething isn't workingSomething isn't workingin-progressWork currently being implementedWork currently being implemented