Skip to content

"Vibe-Trading: Your Personal Trading Agent"

fix(registry): move longbridge to key-gated section of fallback chains

fanfpy0088fba68265
diff --git a/agent/backtest/loaders/registry.py b/agent/backtest/loaders/registry.py
index 5624c982e..03f0f33fc 100644
--- a/agent/backtest/loaders/registry.py
+++ b/agent/backtest/loaders/registry.py
@@ -129,8 +129,8 @@ _NO_NETWORK_FALLBACK_SOURCES: frozenset[str] = frozenset({"local", "qveris"}) #
# REST fallbacks placed deeper in the chain.
FALLBACK_CHAINS: dict[str, list[str]] = {
"a_share": ["tencent", "mootdx", "eastmoney", "baostock", "akshare", "tushare", "local"],
- "us_equity": ["yahoo", "stooq", "sina", "eastmoney", "yfinance", "longbridge", "tiingo", "fmp", "finnhub", "alphavantage", "akshare", "local"],
- "hk_equity": ["eastmoney", "yahoo", "futu", "longbridge", "yfinance", "akshare", "local"],
+ "us_equity": ["yahoo", "stooq", "sina", "eastmoney", "yfinance", "tiingo", "fmp", "finnhub", "alphavantage", "longbridge", "akshare", "local"],
+ "hk_equity": ["eastmoney", "yahoo", "futu", "yfinance", "akshare", "longbridge", "local"],
"india_equity": ["yahoo", "yfinance", "india_broker", "local"],
"crypto": ["okx", "ccxt", "yfinance", "local"],
"futures": ["tushare", "akshare", "local"],
diff --git a/agent/tests/test_registry.py b/agent/tests/test_registry.py
index 98b95129d..98fd52f1b 100644
--- a/agent/tests/test_registry.py
+++ b/agent/tests/test_registry.py
@@ -154,10 +154,10 @@ class TestFallbackChains:
]
assert FALLBACK_CHAINS["us_equity"] == [
"yahoo", "stooq", "sina", "eastmoney", "yfinance", "tiingo", "fmp",
- "finnhub", "alphavantage", "akshare", "local",
+ "finnhub", "alphavantage", "longbridge", "akshare", "local",
]
assert FALLBACK_CHAINS["hk_equity"] == [
- "eastmoney", "yahoo", "futu", "yfinance", "akshare", "local",
+ "eastmoney", "yahoo", "futu", "yfinance", "akshare", "longbridge", "local",
]
def test_us_equity_includes_sina_fallback(self) -> None: