← Back to Skills Marketplace
codecanvas762

Akshare Finance 1.0.0

by CodeCanvas762 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
111
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install akshare-finance-1-0-0
Description
AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。
README (SKILL.md)

AKShare财经数据技能

快速开始

# 安装依赖
pip install akshare pandas

# 测试安装
python -c "import akshare; print(akshare.__version__)"

核心功能

1. 股票行情

import akshare as ak

# A股实时行情
stock_zh_a_spot_em()  # 东方财富A股

# 股票K线数据
stock_zh_kline(symbol="000001", period="daily", adjust="qfq")

# 港股行情
stock_hk_spot_em()  # 港股实时

# 美股
stock_us_spot()  # 美股实时

2. 宏观经济

# GDP数据
macro_china_gdp()  # 中国GDP

# CPI通胀
macro_china_cpi()  # 中国CPI

# PMI采购经理指数
macro_china_pmi()  # 中国PMI

# 货币供应量
macro_china_m2()  # M2广义货币

3. 加密货币

# 币种列表
crypto_binance_symbols()  # 币安交易对

# 实时价格
crypto_binance_btc_usdt_spot()  # BTC/USDT

# K线数据
crypto_binance_btc_usdt_kline(period="daily")

4. 外汇贵金属

# 外汇汇率
forex_usd_cny()  # 美元兑人民币

# 贵金属
metals_shibor()  # 上海银行间拆借利率

# 金银价格
metals_gold()  # 国际金价

5. 财务数据

# 股票基本面
stock_fundamental(symbol="000001")  # 基本面数据

# 估值指标
stock_valuation(symbol="000001")  # PE、PB等

# 盈利能力
stock_profit_em(symbol="000001")

常用组合

投资组合监控

import akshare as ak
import pandas as pd

# 监控自选股
tickers = ["000001", "000002", "600519"]
for ticker in tickers:
    df = ak.stock_zh_kline(symbol=ticker, period="daily", adjust="qfq", start_date="20240101")
    latest = df.iloc[-1]
    print(f"{ticker}: 收盘价={latest['close']}, 涨跌幅={latest['pct_chg']}%")

市场概览

# A股大盘
index_zh_a_spot()  # 大盘指数

# 涨跌幅排行
stock_zh_a_spot_em()[['代码', '名称', '涨跌幅']].sort_values('涨跌幅', ascending=False)

注意事项

  1. 数据来源: 公开财经网站,仅用于学术研究
  2. 商业风险: 投资有风险,决策需谨慎
  3. 更新频率: 实时数据可能有延迟
  4. 数据验证: 建议多数据源交叉验证

输出格式

默认返回Pandas DataFrame,可直接处理:

df = ak.stock_zh_a_spot_em()
print(df.head())  # 查看前5行
print(df.columns)  # 查看列名
df.to_csv("data.csv")  # 保存CSV

参考文档

Usage Guidance
This skill appears to be a straightforward AKShare wrapper and is coherent with its description. Before installing, verify you trust the akshare package/version (pip packages run code at install time), ensure your environment's network policy allows the external data calls you expect, and avoid pasting sensitive credentials into scripts. If you plan to use the data for automated trading, test thoroughly and treat data latency/accuracy as a risk. If you need higher assurance, review the akshare package source and pinned version for supply‑chain risk.
Capability Analysis
Type: OpenClaw Skill Name: akshare-finance-1-0-0 Version: 1.0.0 The skill bundle is a legitimate wrapper for the AKShare financial data library, providing scripts to fetch stock, cryptocurrency, and macroeconomic data. The Python scripts (crypto_price.py, macro_data.py, stock_price.py) and the SKILL.md instructions are well-documented and strictly follow the stated purpose without any signs of malicious intent, data exfiltration, or prompt injection.
Capability Tags
crypto
Capability Assessment
Purpose & Capability
Name/description match the provided code and instructions: the skill wraps AKShare to fetch equity, macro, crypto, forex and related market data. Required packages (akshare, pandas) are exactly what the skill needs.
Instruction Scope
SKILL.md and the three scripts only call AKShare functions and operate on returned DataFrames. There are no instructions to read unrelated local files, access credentials, or POST data to third‑party endpoints beyond AKShare's normal network calls.
Install Mechanism
Installation is via pip (akshare, pandas) as declared in SKILL.md. This is expected for a Python data wrapper but carries the usual pip risk: packages from PyPI can execute code at install time. No obscure download URLs or extract/install of arbitrary archives are present.
Credentials
The skill declares no environment variables or credentials and the code does not attempt to read secrets or config paths. No disproportionate access is requested.
Persistence & Privilege
always is false and the skill does not request persistent elevated privileges or modify other skills or global agent settings.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install akshare-finance-1-0-0
  3. After installation, invoke the skill by name or use /akshare-finance-1-0-0
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release: Provides an easy-to-use wrapper for the AKShare financial data library. - Supports fetching data for stocks, futures, options, funds, forex, bonds, indices, and cryptocurrencies. - Quickstart guide and code examples for common tasks like stock quotes, macroeconomic data, crypto prices, forex, and financial indicators. - Returns Pandas DataFrames for convenient data analysis. - Designed for academic research; real-time data may have delays. - Requires installation of AKShare (≥1.12) and pandas (≥1.5).
Metadata
Slug akshare-finance-1-0-0
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Akshare Finance 1.0.0?

AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。 It is an AI Agent Skill for Claude Code / OpenClaw, with 111 downloads so far.

How do I install Akshare Finance 1.0.0?

Run "/install akshare-finance-1-0-0" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Akshare Finance 1.0.0 free?

Yes, Akshare Finance 1.0.0 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Akshare Finance 1.0.0 support?

Akshare Finance 1.0.0 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Akshare Finance 1.0.0?

It is built and maintained by CodeCanvas762 (@codecanvas762); the current version is v1.0.0.

💬 Comments