搜索

PythonReactSEOPDF
OpenClaw

akshare

Comprehensive free financial data library — A-shares, HK/US stocks, futures, options, funds, bonds, forex, macro, no API key required.

coderwpf0 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install coderwpf/aakshare

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

AKShare (开源财经数据接口库)

AKShare is a comprehensive, free Python financial data library covering A-shares, HK/US stocks, futures, options, funds, bonds, forex, and macro data. No registration or API key needed. All functions return pandas.DataFrame.

Docs: https://akshare.akfamily.xyz/

Install

pip install akshare --upgrade

Requires Python 3.9+ (64-bit).

Usage pattern

import akshare as ak

df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101", end_date="20240630")
print(df)

Function naming convention

{asset_class}_{market}_{data_type}_{source}
  • asset_class: stock, futures, fund, bond, forex, option, macro, index
  • market: zh (China), us (US), hk (Hong Kong), or exchange codes
  • data_type: spot (real-time), hist (historical), daily, minute
  • source: em (Eastmoney), sina (Sina Finance), exchange abbreviations

Stock data (A-shares)

Real-time quotes — all A-shares
import akshare as ak

df = ak.stock_zh_a_spot_em()
# columns: 序号, 代码, 名称, 最新价, 涨跌幅, 涨跌额, 成交量, 成交额, 振幅, 最高, 最低, 今开, 昨收, 量比, 换手率, 市盈率, 市净率, ...
Historical K-line
df = ak.stock_zh_a_hist(
    symbol="000001",       # stock code (no prefix)
    period="daily",        # "daily", "weekly", "monthly"
    start_date="20240101", # YYYYMMDD
    end_date="20240630",
    adjust=""              # "": no adj, "qfq": forward, "hfq": backward
)
# columns: 日期, 开盘, 收盘, 最高, 最低, 成交量, 成交额, 振幅, 涨跌幅, 涨跌额, 换手率
Minute K-line
df = ak.stock_zh_a_hist_min_em(
    symbol="000001",
    period="5",            # "1", "5", "15", "30", "60"
    start_date="2024-01-02 09:30:00",
    end_date="2024-01-02 15:00:00",
    adjust=""
)
Individual stock info
df = ak.stock_individual_info_em(symbol="000001")
# Returns: 总市值,...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/coderwpf/aakshare
Version
1.0.0
Commit
2675c2bb85e97a23449522c88b6288afe3a8f7cd
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# AKShare (开源财经数据接口库)

[AKShare](https://github.com/akfamily/akshare) is a comprehensive, free Python financial data library covering A-shares, HK/US stocks, futures, options, funds, bonds, forex, and macro data. No registration or API key needed. All functions return `pandas.DataFrame`.

> Docs: https://akshare.akfamily.xyz/

## Install

```bash
pip install akshare --upgrade
```

Requires Python 3.9+ (64-bit).

## Usage pattern

```python
import akshare as ak

df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101", end_date="20240630")
print(df)
```

## Function naming convention

```
{asset_class}_{market}_{data_type}_{source}
```

- **asset_class**: `stock`, `futures`, `fund`, `bond`, `forex`, `option`, `macro`, `index`
- **market**: `zh` (China), `us` (US), `hk` (Hong Kong), or exchange codes
- **data_type**: `spot` (real-time), `hist` (historical), `daily`, `minute`
- **source**: `em` (Eastmoney), `sina` (Sina Finance), exchange abbreviations

---

## Stock data (A-shares)

### Real-time quotes — all A-shares

```python
import akshare as ak

df = ak.stock_zh_a_spot_em()
# columns: 序号, 代码, 名称, 最新价, 涨跌幅, 涨跌额, 成交量, 成交额, 振幅, 最高, 最低, 今开, 昨收, 量比, 换手率, 市盈率, 市净率, ...
```

### Historical K-line

```python
df = ak.stock_zh_a_hist(
    symbol="000001",       # stock code (no prefix)
    period="daily",        # "daily", "weekly", "monthly"
    start_date="20240101", # YYYYMMDD
    end_date="20240630",
    adjust=""              # "": no adj, "qfq": forward, "hfq": backward
)
# columns: 日期, 开盘, 收盘, 最高, 最低, 成交量, 成交额, 振幅, 涨跌幅, 涨跌额, 换手率
```

### Minute K-line

```python
df = ak.stock_zh_a_hist_min_em(
    symbol="000001",
    period="5",            # "1", "5", "15", "30", "60"
    start_date="2024-01-02 09:30:00",
    end_date="2024-01-02 15:00:00",
    adjust=""
)
```

### Individual stock info

```python
df = ak.stock_individual_info_em(symbol="000001")
# Returns: 总市值,...

相关技能

OpenClaw

bambu-studio-ai

heyixuan2

Bambu Lab 3D printer control and automation. Activate when user mentions: printer status, 3D printing, slice, analyze model, generate 3D, AMS filament, print monitor, Bambu Lab, or any 3D printing task. Full pi...

OpenClaw

geo-optimization

capt-marbles

Generative Engine Optimization (GEO) for AI search visibility. Optimize content to appear in ChatGPT, Perplexity, Claude, and Google AI Overviews. Use when optimizing websites, pages, or content for LLM discove...

OpenClaw

0protocol

0isone

Agents can sign plugins, rotate credentials without losing identity, and publicly attest to behavior.

OpenClaw

0x0-messenger

eijiac24

Send and receive P2P messages using disposable numbers and PINs. No servers, no accounts. Use for human notifications, approval flows, and agent-to-agent communication.