Guide · Agent skill
How to use the Data Source Router agent skill (data-routing)
Updated · written with AI from the project's own documentation and checked against our catalogue data
The data-routing skill is a reference file for an AI agent that works with financial market data. It tells the agent which data source and tool fit a given market (A-shares, US, Hong Kong, crypto, forex, macro), which API key each one needs, and which providers to avoid because they are throttled or likely to block requests. This guide explains what the skill does, how to install it, how to trigger it, and what to check before relying on its output.
Quick start
- 1Download the ZIP. Download the data-routing skill ZIP from this page.
- 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use or into .claude/skills/ in your project.
- 3Or upload it in the Claude apps. In the Claude apps, open Settings → Capabilities → Skills and upload the skill.
- 4Set the keys you need. Export only the environment keys for the sources you plan to use, such as TUSHARE_TOKEN or FRED_API_KEY.
- 5Ask for data in plain language. Request a backtest, price fetch or research task and name the market, for example A-shares or US stocks.
- 6Check which source was used. Ask the agent which source and tool served the data, and confirm any missing key is reported.
What is an agent skill, and what does data-routing do?
An agent skill is a folder containing a SKILL.md file of instructions that an AI agent reads when a task matches the skill's description. The data-routing skill is the single router for data needs in the Vibe-Trading backtest platform. Its description says to load it before any backtest, data-fetch, or research task.
The file does not fetch data itself. It maps each registered backtest data source to its markets, its auth requirement and its network dependency, and maps each research data need (such as OHLCV price bars, northbound flow, SEC filings or macro series) to the tool that serves it and the environment key it requires.
Install the data-routing skill
Download the ZIP for the data-routing skill from this page and unzip it. You can install it in one of two ways.
Option 1: unzip it into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder so that it applies only to that project.
Option 2: in the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills.
- Personal folder: ~/.claude/skills/
- Project folder: .claude/skills/ inside your project
- Claude apps: Settings → Capabilities → Skills
Trigger the skill with natural requests
You do not need a special command. The agent loads the skill when your request involves data for a backtest, a price fetch, or research. Ask in plain language and name the market or data type you need.
The skill also matters when you ask the agent to configure a backtest. In that case the agent writes config.json and the source is usually set to auto, so the runner picks a source by symbol pattern and falls back across sources in the same market.
- "Backtest a moving-average strategy on 600000.SH from 2020 to today."
- "Get daily OHLCV for AAPL and MSFT and tell me which source you used."
- "Which API key do I need to pull FRED macro series?"
- "Fetch northbound flow for the A-share market."
Understand how the agent chooses a source
For analysis and research, the agent first identifies the data need, then reads the capability table for the matching tool and env key. For plain OHLCV, it calls get_market_data and lets source fallback run. If a required key is missing, the agent should report the missing key instead of failing silently.
Source priority depends on the market. For A-shares, tencent is listed first because it is marked never banned, followed by tushare (which needs TUSHARE_TOKEN), then baostock or akshare, then eastmoney, which is throttled. For US stocks, stooq or yahoo come first. For crypto, okx is used for a single exchange and ccxt for multiple exchanges. Explicit-only sources such as tickerall and mootdx are never part of the automatic chain.
Set up API keys and local gateways
Many sources are free and need no key. Others need an environment variable. The file lists these keys: TUSHARE_TOKEN, FINNHUB_API_KEY, ALPHAVANTAGE_API_KEY, TIINGO_API_KEY, FMP_API_KEY, FRED_API_KEY, GILDATA_TOKEN, QVERIS_API_KEY, VIBE_TRADING_IWENCAI_KEY, and TICKERALL_API_KEY with TICKERALL_ACCOUNT_ID. You only need the keys for the sources you plan to use.
Some sources need a local program running. futu requires the OpenD gateway to be running. mt5 requires a running, logged-in MetaTrader 5 terminal on Windows, with an optional ~/.vibe-trading/mt5.json file. The tickerall source is a hosted alternative to the same broker feed and works on any OS, but it is used only when you explicitly ask for source="tickerall".
- Set each key as an environment variable before the agent runs.
- Keys are listed by name in the skill; the file does not provide values or sign-up links.
- Keep broker credentials out of automatic routing by using explicit requests only.
Check the symbol format before you ask
The skill uses a fixed symbol format per market, so write symbols the way the file expects. Using the wrong format is a common reason a fetch returns nothing.
- A-shares: NNNNNN.SZ, .SH or .BJ (for example 000001.SZ, 600000.SH)
- US stocks: TICKER.US (for example AAPL.US)
- HK stocks: NNNNN.HK (for example 00700.HK)
- Canada TSX/TSXV: TICKER.TO or TICKER.V (for example TD.TO, PNG.V)
- Crypto: SYMBOL-USDT (for example BTC-USDT)
Safety notes: scripts, network and data quality
The skill does not run scripts. It does use the network, because the sources it points to are remote APIs or local gateways. Several sources depend on unofficial endpoints, IP throttling, or a local gateway that can stop working, so do not treat them as guaranteed uptime.
The data itself may be delayed, incomplete, or wrong. The skill does not give trading advice or price predictions. Some listed providers may be restricted or unlawful to access in your region, and the file itself notes regional network dependencies. Check the rules that apply where you live before using a source.
- No scripts are run by this skill.
- Network use: yes, including China network, Yahoo access, or a local gateway for some sources.
- Verify important numbers against an official source before acting on them.
What people use it for
- Backtesting a strategy across A-shares and US stocks without choosing each provider by hand.
- Finding which API key a macro series such as FRED needs before running a research task.
- Pulling Hong Kong or Canadian (TSX/TSXV) price data and checking the correct symbol suffix.
- Looking up a registered source and its auth requirement when extending the Vibe-Trading backtest platform.
- Getting a reminder of which sources are throttled so a batch job is less likely to stall.
Frequently asked questions
Is the data-routing skill free?
The source file is published under the MIT licence. Many of the data sources it lists need no key, while others need an API key from their provider, and those providers set their own terms and any costs.
What do I need to use the data-routing skill?
You need the Vibe-Trading backtest platform (HKUDS/Vibe-Trading) with its data loaders. Some sources also need an API key set as an environment variable, or a local MT5 terminal on Windows or the futu OpenD gateway.
Where do I put the skill files?
Unzip the downloaded ZIP into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. You can also upload it in the Claude apps under Settings → Capabilities → Skills.
Does the skill fetch data or give trading advice?
No. It is a routing guide that tells the agent where to look for data. The file does not give trading advice or price predictions, and the data may be delayed, incomplete, or wrong.
Why does a data request fail or return nothing?
Common causes are a missing environment key, a symbol in the wrong format, a source that needs a local gateway that is not running, or an IP-throttled provider. The skill says the agent should report a missing key rather than failing silently.
How does it compare with choosing a data source by hand?
The skill gives a ranked source order per market and marks throttled and explicit-only sources. It does not replace checking a provider's own terms or verifying the data.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Use data-routing if you run backtests or research across several markets in the Vibe-Trading platform and want the agent to pick data sources and tell you which keys it needs. Pick something else if you need trading advice, guaranteed uptime for live trading, or if the listed providers are restricted where you live.
Download the skill