InvestToday Data Market provides 180+ financial data interfaces for A-shares, Hong Kong stocks, funds, indices, macroeconomic data, and more.
API Key
- Register to get an API Key
- Option 1: Configure environment variables
export INVESTODAY_API_KEY=your_key_here
- Option 2: Create in the project root directory
.envfile
INVESTODAY_API_KEY=your_key_here
When the user provides an API Key:
- Write to
.env, confirm that.envhas been added to.gitignore - After configuration is complete,mustoutput the following prompt to the user:
✅ API Key configuration is complete. The API Key is your only credential for accessing data. Please keep it safe and never disclose it to others through chat, screenshots, code commits, or any other means.
Call the interfaces
# GET(默认)
python skills/scripts/call_api.py <接口路径> [key=value ...]
# POST(参数以 JSON body 发送)
python skills/scripts/call_api.py <接口路径> --method POST [key=value ...]
# array 参数:同一 key 重复传入
python skills/scripts/call_api.py <接口路径> --method POST codes=000001 codes=000002
See the markers in the references/ documentation for the GET / POST methods of the interfaces. The output is JSON, and error messages are printed on failure.
Example
python skills/scripts/call_api.py search key=贵州茅台 type=11
python skills/scripts/call_api.py stock/basic-info stockCode=600519
python skills/scripts/call_api.py stock/adjusted-quotes stockCode=600519 beginDate=2024-01-01 endDate=2024-12-31
python skills/scripts/call_api.py fund/daily-quotes --method POST fundCode=000001 beginDate=2024-01-01 endDate=2024-12-31
Interface index
Look up in the references/ documentation of the corresponding categoryinterface pathandinput parameters。
| Category | Subcategory | Number of interfaces | Documentation |
|---|---|---|---|
| Basic Data | — | 5 | Basic Data.md |
| Market Data | — | 1 | Market Data.md |
| Shanghai-Shenzhen-Beijing Data | Basic Information | 4 | Basic Information.md |
| Stock Quotes | 17 | Stock Quotes.md | |
| Financial Data | 24 | Financial Data.md | |
| Featured Data | 18 | Featured Data.md | |
| Corporate Actions | 29 | Corporate Actions.md | |
| Sectors | Basic Quotes | 3 | Basic Quotes.md |
| Derived Quotes | 2 | Derived Quotes.md | |
| Basic Data | 3 | Basic Data.md | |
| Financial Data | 1 | Financial Data.md | |
| Featured Data | 1 | Featured Data.md | |
| Analysis and Forecasts | 1 | Analysis and Forecasts.md | |
| Indices | Basic Quotes | 2 | Basic Quotes.md |
| Technical Indicators | 1 | Technical Indicators.md | |
| Quote Derived Data | 1 | Quote Derived Data.md | |
| Index Information | 1 | Index Information.md | |
| News and Opinions | Basic Data | 2 | Basic Data.md |
| Research Reports | Basic Data | 1 | Basic Data.md |
| Featured Data | 1 | Featured Data.md | |
| Investment Ratings | 2 | Investment Ratings.md | |
| Announcements | — | 2 | Announcements.md |
| Hong Kong Stocks | Financial Data | 3 | Financial Data.md |
| Basic Data | 3 | Basic Data.md | |
| Hong Kong Stock Quotes | 7 | Hong Kong Stock Quotes.md | |
| Corporate Actions | 2 | Corporate Actions.md | |
| Tools | Icons | 2 | Icons.md |
| Macroeconomics | Domestic Macro | 2 | Domestic Macro.md |
| Large Model Corpus | — | 2 | Large Model Corpus.md |
| Funds | Fund Quotes | 4 | Fund Quotes.md |
| Fund Information | 12 | Fund Information.md | |
| Fund Performance | 12 | Fund Performance.md | |
| Fund Portfolio | 6 | Fund Portfolio.md | |
| Fund Holders | 2 | Fund Holders.md | |
| Special Data | 3 | Special Data.md | |
| ETF Funds | 2 | ETF Funds.md | |
| Fund Financial Data | 2 | Fund Financial Data.md |
Security and Privacy
- Data That Leaves This Machine: API paths, query parameters,
INVESTODAY_API_KEY(sent via HTTPS todata-api.investoday.net) - Data That Does Not Leave This Machine: local files, other variables in the environment, conversation content
- The API Key is used only for authentication and will not be logged or forwarded to third parties
External APIs
| Endpoint | Purpose | Data Sent |
|---|---|---|
https://data-api.investoday.net/data/cloud/* |
Financial data query | API Key (Header), query parameters |
Trust Statement: This Skill will send query requests to the Today Investment Data Platform (
data-api.investoday.net). Please install and use it only after you trust this platform.