Skip to main content

AKShare One

中文 | English

AKShare One is a data interface for obtaining Chinese A-shares, based on AKShare. It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.

✨ Features

  • 📊 Unified stock code formats across data sources
  • 🏗️ Standardized return data structures
  • 🛠️ Simplified API parameter design
  • ⏱️ Automatic timestamp and adjustment handling

🚀 Core Features

Function Interface
Historical data get_hist_data
Real-time quotes get_realtime_data
Stock news get_news_data
Financial data get_balance_sheet/get_income_statement/get_cash_flow
Futures data get_futures_hist_data/get_futures_realtime_data
Options data get_options_chain/get_options_realtime/get_options_hist
Internal transactions get_inner_trade_data
Basic stock info get_basic_info
Financial metrics get_financial_metrics
Technical indicators See indicators.py

📦 Quick Installation

pip install akshare-one

💻 Usage Example

from akshare_one import get_hist_data
from akshare_one.indicators import get_sma

# Get historical data
df = get_hist_data(symbol="600000", interval="day", adjust="hfq")

# Calculate 20-day Simple Moving Average
df_sma = get_sma(df, window=20)

📚 Documentation

Full API documentation is now available on GitHub Pages:

https://zwldarren.github.io/akshare-one/

🧪 Testing

Tests run fully offline by default. Test modules that call live upstream data providers (EastMoney, Sina, XueQiu, the exchanges) are skipped unless you opt in, because those endpoints apply aggressive rate limits and a full run can get your IP temporarily blocked:

pytest                    # offline unit tests only
pytest --run-network      # include live-provider tests

🧩 Public interface

The public surface is akshare_one and akshare_one.indicators. Everything under akshare_one.modules is internal and may change without a deprecation cycle.

Each domain's output columns are declared in exactly one place, akshare_one.modules.<domain>.schema. Every provider's frame is projected onto those columns, so a documented column is always present — NaN when the selected source cannot supply it — and always in the documented order.

⚠️ Data source notes

  • Realtime quotes and basic info fall back across several EastMoney hosts, because push2.eastmoney.com intermittently returns 502 (notably from outside mainland China).
  • xueqiu realtime quotes need an xq_a_token cookie that XueQiu no longer hands to anonymous clients, and XueQiu returns 418 once rate-limited.
  • get_options_chain returns the option contract list with the market-data columns left empty; use get_options_realtime / get_options_hist for prices.
  • get_futures_main_contracts() reflects static exchange snapshots and may be slow on the first call (CFFEX); the result is cached for 24 hours.

Metadata

Release files for akshare-one 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for akshare-one 0.5.0
File Size Uploaded
akshare_one-0.5.0.tar.gz 42.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for akshare-one 0.5.0
File Interpreter ABI Platform
akshare_one-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 107.2 kB

Release files / akshare_one-0.5.0.tar.gz

Download URL akshare_one-0.5.0.tar.gz
Size 42.0 kB
Tags Source
SHA-256 checksum
How to use checksums
872739261a428ee660c8acda2aa724738cc316198eed993339fec2b41740df14
BLAKE2b-256 checksum
How to use checksums
cf51160d1116d0458d5a553b337724b9f74db14124b086441a81d244e336c95a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release files / akshare_one-0.5.0-py3-none-any.whl

Download URL akshare_one-0.5.0-py3-none-any.whl
Size 65.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1febcad2337570952884565408edf73021eba26f50688b758071ff3b4a5d099
BLAKE2b-256 checksum
How to use checksums
336a2f5f9377ac1a1c2961ef91bdda016dc70bb98f0d5e081d49986c5373a774
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 19, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.1

2 release files

This release

0.5.0 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.16

2 release files

0.3.15

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page