data-routing

Selects market data providers for symbol sets and workflow types via decision tree.

Updated May 5, 2026
One-click install
npx skills add https://github.com/wudye/traderAssistHK --skill data-routing-wudye
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-routing
Source: https://github.com/wudye/traderAssistHK/tree/main/backend/src/skills/data-routing
Command: npx skills add https://github.com/wudye/traderAssistHK --skill data-routing-wudye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents backtests and research workflows from failing or slowing down due to missing or incompatible market data sources by automatically selecting the best available provider for the user’s requested symbols and scenario.

Core Features & Use Cases

  • Automatic data-source selection: Uses a decision tree to pick tushare, akshare, yfinance, okx, or ccxt based on market type and request context.
  • Backtest-first routing: Supports config-driven backtests with source: "auto" to pick the right provider and fall back transparently.
  • Scenario-aware API requirements: Guides analysis scripts to choose the correct priority chain (e.g., tushare token checks, crypto exchange selection, and fallback behavior) so researchers can focus on logic rather than plumbing.

Quick Start

Use the data-routing skill to route your request for market data by writing source: "auto" in your backtest config or by loading the skill before running your data-fetching analysis scripts.

Frequently Asked Questions about data-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically select a market data provider for backtesting without manual wiring?

Automatically select a market data provider for backtesting by setting `source: "auto"` in your config to trigger the routing decision tree to pick tushare, akshare, yfinance, okx, or ccxt based on your symbols.

Can I fetch A-shares, US stocks, and crypto data using the same data sourcing script?

Yes, you can fetch A-shares, US stocks, and crypto data using the same script, because the routing logic applies market-appropriate priority rules and fallbacks across A-shares, US stocks, HK stocks, crypto, futures, and forex.

What happens if my tushare token environment variable is missing during market routing?

If your tushare token environment variable is missing, the routing mechanism skips it and falls back transparently to other available financial data providers like akshare or yfinance to return usable data.

What is the best way to handle API fallback logic for financial data providers in research scripts?

The best way to handle API fallback for financial data providers is to load the routing skill before running your analysis scripts to apply scenario-aware priority chains for your specific market type.

Does the automatic data routing work for macro and economics data scenarios?

Yes, automatic data routing works for macro and economics data scenarios, applying market-appropriate priority rules to ensure the runner loads the correct skill and returns usable data.