qmetrics.net

Financial API

Official Tonghuashun A-share market data integration kit

Financial API screenshot

This monorepo documents and ships clients for Tonghuashun financial data: REST API, MCP, CLI, Python SDK, and agent skills.

Overview

The Financial API project bundles official Tonghuashun (HiThink) market data access for developers, researchers, and AI agents. The data service itself is operated by Tonghuashun; the distribution collects API contracts, command-line tools, Python libraries, agent skills, and examples so the same datasets can be used from chat tools, scripts, or applications.

Coverage spans A-share quotes and history, corporate actions, financial statements, indices, sectors, funds, listed derivatives, Hong Kong listing calendars, and news-style event feeds. Specialty A-share datasets include limit-up pools, consecutive board ladders, hot lists, and dragon-tiger board activity. Bulk dump files and a local DuckDB workflow support historical research.

Access modes include a Node-based CLI with OAuth login, HTTP REST with API keys, MCP for agent hosts, Python SDK installs, packaged agent skills, and plugins for DeepSeek Harness. Minute bars, tick, Level-2, and some offshore markets sit outside the public integration scope described in the docs.

Authentication uses Tonghuashun OAuth for some clients and API keys via the HITHINKFINANCEAPIKEY environment variable for REST, MCP, and Python. Rate limits and entitlements depend on account authorization stated in the interface documentation.

Key features

  • REST API for quotes and fundamentals
  • MCP tools for agent clients
  • CLI export and query commands
  • Python SDK and DuckDB marketdb
  • Agent skill packages for REST and MCP
  • DeepSeek Harness plugin
  • Bulk market dump downloads
  • OAuth and API key authentication

Use cases

  • Feeding AI agents with live A-share data
  • Quant research notebooks in Python
  • Embedding market data in web or mobile apps
  • Batch historical exports into local databases

Tags

Similar software

CCXT

Multi-language unified cryptocurrency exchange API

CCXT connects applications to many cryptocurrency and prediction-market exchanges through one normalized API. It ships for JavaScript, Python, PHP, Go, C#, Java, and Rust.

  • 100+ exchange integrations
  • Unified REST and WebSocket API
  • Public and private endpoints
PythonDetails →
★ 45.1k⟳ todayMIT

yfinance

Python access to Yahoo Finance market data

yfinance wraps Yahoo Finance public APIs so Python code can pull quotes, history, fundamentals, options, and related market metadata. It is unofficial and meant for research and education.

  • Single and multi-ticker objects
  • Historical price download helper
  • Fundamentals and calendar fields
PythonDetails →
★ 26.1k⟳ 6 days agoApache-2.0

AKShare

Python interface library for China financial market data

AKShare is a Python package that fetches stocks, futures, funds, bonds, FX, and macroeconomic series from many public sources. Results come back as pandas DataFrames with Chinese column names.

  • Nearly 1000 finance and macro data endpoints
  • pandas DataFrame output with Chinese headers
  • Offline keyword search across interface catalog
PythonDetails →
★ 23.6k⟳ todayMIT

TA Lib Python

Python bindings for TA-Lib technical analysis indicators

ta-lib-python wraps the TA-Lib C library with Cython and NumPy for technical analysis on financial price series. It exposes function, abstract, and streaming APIs with optional Pandas and Polars inputs.

  • 200+ technical indicators
  • Function, abstract, streaming APIs
  • NumPy, Pandas, Polars inputs
CythonDetails →
★ 12.5k⟳ 6 days agoBSD-2-Clause

PyPortfolioOpt

Portfolio optimization methods in Python

PyPortfolioOpt implements mean-variance optimization, Black-Litterman allocation, hierarchical risk parity, and related portfolio methods with scikit-learn-style APIs.

  • Mean-variance optimization
  • Black-Litterman allocation
  • Hierarchical risk parity
Jupyter NotebookDetails →
★ 6.2k⟳ 4 months agoMIT

GoPay

Go SDK for WeChat Alipay and other payment APIs

GoPay wraps many Chinese and international payment providers in one Go module. Separate packages cover WeChat, Alipay, Douyin, PayPal, Apple verification, and others.

  • Multi-provider payment clients
  • WeChat and Alipay v3
  • PayPal and Apple verify
GoDetails →
★ 5.8k⟳ 3 months agoApache-2.0