Tools
Data sources
One get_market_data call reaches 28 sources. With source auto, each symbol is routed by its market and walks that market's fallback chain, with the sources least likely to block you first.
Fallback chains
| Market | Chain, in order |
|---|---|
| China A-shares | tencent, eastmoney, baostock, akshare, tushare, local |
| US equities | yahoo, stooq, sina, eastmoney, yfinance, tiingo, fmp, finnhub, alphavantage, longbridge, akshare, local |
| Hong Kong | tencent, eastmoney, yahoo, futu, akshare, yfinance, tushare, longbridge, local |
| India | yahoo, yfinance, india_broker, local |
| Korea | pykrx, yahoo, yfinance, local |
| Canada, UK, Vietnam, Argentina, indices | yahoo, yfinance, local |
| Crypto | okx, binance, ccxt, yfinance, local |
| China futures | akshare, local |
| Forex and metals | mt5, akshare, yfinance, local |
| Funds | tushare, akshare, local |
| Macro | akshare, tushare, local |
These sources are used only when you name them: gildata (requires market quotes enabled), tickerall (hosted MT5 feed), and nobitex / wallex (Iranian Toman pairs). Set MARKET_DATA_ORDER_<MARKET>, for example MARKET_DATA_ORDER_US_EQUITY, to reorder a chain.
The base install includes Tencent's standard-library HTTP loader and AKShare. BaoStock is an optional token-free TCP source for daily A-share bars: install it with pip install --upgrade "vibe-trading-ai[ashare]", or use uv tool install --force --python 3.12 "vibe-trading-ai[ashare]" for a uv tool installation that previously used only the base package. Missing optional SDKs are skipped during automatic fallback.
For uv tool users, --force rebuilds the existing tool environment. Keep previously used extras when adding ashare, for example "vibe-trading-ai[ashare,deepseek]", and repeat any existing --with arguments to retain those additional dependencies.
The legacy mootdx loader is also explicit-only: it has been retired from automatic fallback and is not included in the base install or the ashare extra. Installing its SDK does not guarantee compatibility with the TDX server protocol. Prefer source: "auto" or an available alternative such as tencent or baostock when an Eastmoney-backed request is throttled. Startup preflight covers selected services, not every optional loader, and an installed SDK does not prove remote-service availability.
Symbol formats
| Market | Examples |
|---|---|
| China A-shares | 600519.SH, 000001.SZ |
| Hong Kong | 0700.HK |
| US | AAPL.US, SPY.US — the suffix is required |
| Crypto | BTC-USDT (uppercase, hyphen) |
| Korea / India / UK / Canada | 005930.KS, RELIANCE.NS, VOD.L, SHOP.TO |
| Vietnam / Argentina | VNM.VN, GGAL.BA |
| China futures | RB0 (main continuous), IF2412 |
| Forex and metals | EURUSD, XAUUSD |
| Your own files | local: prefix — CSV, Parquet or DuckDB |
A suffix names the exchange, not the currency. A London line must declare GBP or GBp, and a Hong Kong counter is priced by the currency its stock code belongs to.
Choosing a source
Ask in plain language ("use Longbridge to fetch QQQ.US") or set "source" in a backtest config. An explicit local: symbol never falls back to a network source.
Beyond prices
22 read-only data tools cover fund flow, dragon-tiger lists, northbound flow, margin trading, block trades, shareholder counts, lock-up expiries, sectors, research reports, news, SEC filings, financial statements, option chains, company profiles, market screening, symbol search, macro series, iwencai, 13F institutional holdings, ETF look-through, prediction markets and research papers.