AKShare Financial Data API for Openclaw

AKShare is a comprehensive, free, and open-source Python financial data library providing seamless access to stocks, futures, funds, and macroeconomic indicators without requiring an API key.

coderwpf
v1.0.3
Mar 23, 2026
8
2.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install aakshare

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install aakshare using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is AKShare Financial Data API?

AKShare serves as a powerful gateway to a vast array of financial markets, including A-shares, Hong Kong stocks, US stocks, futures, options, bonds, and foreign exchange. It is specifically designed for quantitative traders and data scientists who require high-quality financial data for academic research and strategy development. By sourcing data from reputable providers like East Money and Sina Finance, it consolidates fragmented market information into a unified Pythonic interface.

One of the standout features of this library within the Openclaw Skills ecosystem is its zero-barrier entry; users do not need to register or manage complex API keys. Every function is engineered to return data in the pandas.DataFrame format, making it immediately ready for statistical analysis, technical indicator calculation, or visualization with tools like mplfinance.

AKShare Financial Data API Use Cases

  • Quantitative trading strategy backtesting using historical K-line data.
  • Real-time market monitoring for A-shares, ETFs, and global indices.
  • Macroeconomic research utilizing GDP, CPI, and PMI datasets for China and the US.
  • Automated financial reporting by fetching individual stock info and fundamental data.
  • Multi-factor stock screening based on PE, PB, and turnover rates.

How AKShare Financial Data API Works

  1. The user calls a specific AKShare function following the asset_market_type_source naming convention.
  2. AKShare sends a request to the underlying public data source (e.g., East Money or Sina) to fetch the raw data.
  3. The library parses the retrieved data into a structured format.
  4. All output is converted into a pandas.DataFrame with appropriate column headers (Chinese for A-shares, English for international markets).
  5. The developer uses standard pandas operations to clean, transform, or visualize the financial information.

AKShare Financial Data API Setup

To get started with AKShare, ensure you have Python 3.9 or higher (64-bit) installed. You can install or update the library using the following command:

pip install akshare --upgrade

For users who prefer an HTTP API interface instead of direct Python calls, the AKTools wrapper can be utilized.

AKShare Financial Data API Data Schema & Taxonomy

AKShare uses a standardized naming convention for its API functions to help users navigate the library:

Component Examples
Asset Type stock, futures, fund, bond, forex, option, macro, index
Market zh (China), us (USA), hk (Hong Kong)
Data Type spot (real-time), hist (historical), daily, minute
Source em (East Money), sina (Sina Finance)

All results are returned as pandas.DataFrame objects. For A-share data, columns typically include '日期' (Date), '开盘' (Open), '收盘' (Close), '最高' (High), '最低' (Low), and '成交量' (Volume).

AKShare Financial Data API Advanced Features

  • Multi-agent data aggregation for cross-market comparison (e.g., comparing Shanghai Composite with S&P 500).
  • Dynamic monitoring of market anomalies such as limit-up/limit-down stocks.
  • Integration with technical analysis libraries for calculating MACD, RSI, and Bollinger Bands.
  • Batch processing capabilities for downloading large-scale historical datasets across multiple symbols.
  • Built-in error handling patterns for AI Agents to validate data integrity and handle missing values (NaN).

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*