Hithink Financial Data Services (hithink-finance)

repository·main·Indexed 42 days ago

https://github.com/hithink-tech/financial-api

A comprehensive A-share financial data provider for AI Agents, quantitative researchers, and developers. Offers REST APIs, MCP, CLI, and Python SDKs covering Chinese stock market quotes, financial statements, public funds, futures, options, and index/sector data. Includes specialized data such as Dragon-Tiger lists and anomaly analysis, as well as fund performance, holdings, and manager details.

Tokens
333.4K
Snippets
1.1K
Records
1.6K
Agent score
69%

What's inside Hithink Financial Data Services

  1. Overview of Market Dumps endpoints

    main

    Market Dumps allow you to retrieve entire market datasets in Parquet format. This is significantly more efficient than calling individual stock endpoints for bulk operations like backtesting, offline analysis, or building a data warehouse. Instead of thousands of HTTP requests, you can use these three endpoints to get all necessary data in just a few requests.

    Available Endpoints:

    EndpointDump TypeContentScaleUse Case
    GET /api/dump/market-dumps/daily-k/download-urldaily-kFull market 10-year daily K-lines (unadjusted)~9.45M rowsInitial full data load
    GET /api/dump/market-dumps/daily-k-10d/download-urldaily-k-10dFull market last 10 trading days~250k rowsDaily incremental updates
    GET /api/dump/market-dumps/adjustment-factors/download-urladjustment-factorsFull market adjustment events (dividends/bonus/rights)~52k rowsCalculating adjusted prices
  2. Overview of Hithink Financial Data Services

    main

    Hithink Financial Data Services (hithink-finance) provides official A-share (Chinese stock market) financial data designed for AI Agents, quantitative researchers, and application developers. It offers a unified API Key to access a wide range of data including real-time quotes, financial reports, valuations, indices, funds, futures, and specialized market sentiment data (e.g., limit up/down pools, dragon-tiger lists).

    Key access methods include:

    • REST API: For zero-dependency HTTP integration into websites or apps.
    • MCP (Model Context Protocol): For connecting chat tools like Claude or Cursor.
    • hithink-finance CLI: For terminal-based bulk queries, downloads, and exports.
    • Python SDK/Toolkit: For research scripts and data processing in Python/Notebooks.
    • hithink-finance Skill: The recommended entry point for AI Agents to automatically select the best tool (API, MCP, CLI, or SDK).
    • marketdb: For building and maintaining a local DuckDB database for SQL-based research.
  3. Overview of Futures API domains

    main

    The Futures API allows users to query financial data related to futures markets. The typical workflow is to first identify a specific variety (品种) or contract (合约), and then use those identifiers to query related data such as positions, warehouse receipts, basis, trading schedules, and market prices.

    Available data domains include:

    • Information & Identifiers: Variety lists and contract details.
    • Market Prices: Intraday and daily K-line data.
    • Trading Schedules: Trading days and session timelines.
    • Positions: Data categorized by variety, company, or specific contract (including historical sequences).
    • Basis: Latest basis for main continuous contracts and historical basis for specific contracts.
    • Warehouse Receipts: Historical warehouse receipt data.
    • Extended Data (Internal/Coming Soon): Macro indicators, variety plates, main/secondary main contracts, and commodity indices.
  4. Overview of Futures (期货) data services

    main

    The Futures domain provides data services for futures markets. The standard workflow is to first identify a specific variety (品种) or contract (合约), and then use those identifiers to query related data such as positions, warehouse receipts, basis, trading schedules, and market quotes.

    Available data categories include:

    • Information & Identifiers (资料与标识): Query directories, search for contracts, or get basic variety information to obtain identifiers needed for subsequent requests.
    • Market Quotes (行情): Access intraday (分时) or daily K-line (日K) data.
    • Trading Schedules (交易日程): Access trading days, trading sessions, and session times.
    • Positions (持仓): Query positions by variety, company, or specific contract, including daily and historical data.
    • Basis (基差): Access latest basis for main continuous contracts or historical basis for specific contracts.
    • Warehouse Receipts (仓单): Access historical warehouse receipt data and changes.
  5. Overview of Public Fund APIs

    main

    The Public Fund (公募基金) API domain provides comprehensive data services for mutual funds. The data is organized into several functional groups:

    • Information & Identifiers: Query fund companies and basic fund profiles to obtain identifiers needed for subsequent requests.
    • Market Data: Access ETF trading prices via snapshots or historical daily lines. Note that fund Net Asset Value (NAV) is located under the 'Performance' group.
    • Financial Statements & Indicators: Access income statements, balance sheets, and specific financial indicators for defined reporting periods.
    • Net Value & Performance: Retrieve NAV sequences, interval returns, historical performance indicators, and maximum drawdowns.
    • Holdings & Allocation: Access current top holdings, historical stock/bond holdings, and asset/industry allocation data. For historical queries, you must first retrieve the relevant report dates.
    • Holders: View holder structures and the top ten holders.
    • Fund Managers: Access manager details, investment styles, performance, and professional experience (Manager IDs are obtained from fund profile data).
    • Backtesting: Perform online backtesting by first querying available indicators and then constructing test conditions.
    • General Indicators: Retrieve data for charting (line) or tabular displays.
    • QDII Quota: Summary and detailed lists of QDII quotas.
    • News & Offerings: Fund news articles and lists of funds currently being offered or pending offering.
    • Diagnostics & Corporate Actions: Access fund diagnostic details and dividend records.
  6. Overview of Futures Data Services

    main

    The Futures domain provides data related to specific varieties or contracts. The standard workflow is to first identify a variety or contract using the 资料与标识 (Information & Identifiers) tools, and then perform queries for market data, trading schedules, positions, basis, or warehouse receipts.

    Available data categories include:

    • 资料与标识 (Information & Identifiers): Search for directories, contracts, or basic variety information to obtain identifiers required for subsequent API calls.
    • 行情 (Market Data): Access intraday (分时) or daily (日K) price trends.
    • 交易日程 (Trading Schedule): Query trading days, sessions, and time slots.
    • 持仓 (Positions): Query positions at the variety, contract, or company level, supporting both specific dates and historical sequences.
    • 基差 (Basis): Access latest basis for main continuous contracts or historical basis for specific contracts.
    • 仓单 (Warehouse Receipts): Access historical warehouse receipt data and changes.
  7. Overview of A-share Special Data APIs

    main

    The A-share special data service provides several endpoints for tracking market heat and trends:

    • Skyrocket List (GET /api/a-share/special-data/skyrocket-list): Top 30 A-share heat ranking surge list (supports daily and hourly).
    • Hot Stock List (GET /api/a-share/special-data/hot-stock-list): Top 30 A-share hot stock list (supports 24h and hourly).
    • Historical Hot Stock Ranking (GET /api/a-share/special-data/hot-stock-list-history): Returns historical hot stock rankings by natural day.
    • Individual Stock Rank Trend (GET /api/a-share/special-data/hot-stock-rank-trend): Queries the ranking trend of a single A-share stock over a period of time.
  8. Access A-Share Market Data APIs

    main

    The A-Share (A 股) domain provides APIs for stock prices, financial statements, valuations, auction data, and specialized market indicators.

    Note on Scope:

    • For index trends, use the Index domain.
    • For fund net values, use the Fund domain.
    • Most endpoints are marked as 公开 (Public), while some high-frequency and capital flow endpoints are 端内专用 (Internal only, pending release).
  9. Use the hithink-finance-special-data skill for characteristic market data

    main

    The hithink-finance-special-data skill provides access to characteristic market rankings and event-driven data via the hithink-finance CLI. This includes data such as limit-up/down pools, anomaly lists, dragon-tiger boards, and hot-stock rankings.

    Note: This skill is intended for specialized rankings and event data; it does not replace standard market quotes or financial report data (which are handled by hithink-finance-market).

    Prerequisites

    • Before any CLI call, ensure you have read and followed the hithink-finance-shared documentation.
    • For large datasets (full market, paginated, or long intervals), use the --output <path> flag to save results to a file. Remote stdout only returns summaries.
  10. Explore Public Fund (公募基金) API capabilities

    main

    The Public Fund (公募基金) domain provides a comprehensive set of APIs for querying mutual fund data. The data is organized into several functional groups:

    • Information & Identifiers (资料与标识): Search for fund companies and basic fund profiles to obtain necessary identifiers for subsequent requests.
    • Market Data (行情): Access ETF historical daily lines or real-time market snapshots. Note that fund Net Asset Values (NAV) are located in the 'Net Value & Performance' group.
    • Financial Statements & Indicators (财务报表与指标): Retrieve balance sheets, income statements, and financial indicators for specific reporting periods.
    • Net Value & Performance (净值与业绩): Access NAV sequences, interval returns, drawdowns, and historical performance indicators.
    • Holdings & Allocation (持仓与配置): Query asset allocation, industry allocation, top holdings, and historical stock/bond holdings. For historical data, you must first retrieve the relevant report dates.
    • Holders (持有人): Analyze holder structures and the top ten holders.
    • Fund Managers (基金经理): Get manager details, professional experience, investment styles, and performance metrics. Manager IDs can be obtained from fund profile data.
    • Online Backtesting (在线回测): Query available indicators and execute backtesting based on specific conditions.
    • General Indicators (通用指标): Retrieve indicators formatted for line charts or data tables.
    • QDII Quota (QDII 额度): Access summaries and detailed lists of QDII quotas.
    • News & Offerings (资讯与募集): Access fund news articles and lists of funds currently being offered or pending offering.
    • Diagnostics & Corporate Actions (诊断与公司行动): Access fund diagnostic data and dividend records.