Skip to main content

A fast CLI tool for real-time stock data

Project description

agent-stock

CI PyPI version Python

面向 AI Agent 的股市数据命令行工具,提供市场概览、个股行情、板块涨跌、技术指标与资金流向等信息。

安装

# pipx
pipx install agent-stock  # 安装
pipx upgrade agent-stock  # 升级

# uv tool
uv tool install agent-stock  # 安装
uv tool upgrade agent-stock  # 升级

# pip
python -m pip install agent-stock     # 安装
python -m pip install -U agent-stock  # 升级

快速开始

# 市场数据
stock search 腾讯
stock chgdiagram --market ab
stock heatmap --market ab

# 个股数据
stock kline 000001
stock fundflow 000001

# 帮助与版本
stock --help
stock quote --help
stock -v

命令

全局使用 --help 获取命令帮助,或针对特定命令添加 --help 获取详细参数说明,示例:stock --help

市场数据

stock index --market ab             # 大盘主要指数总览
stock chgdiagram --market ab        # 涨跌分布
stock heatmap --market ab           # 行业板块热力图
stock search <keyword>              # 股票搜索

个股数据

stock quote <symbol>                # 个股实时行情
stock plate <symbol>                # 个股相关板块涨跌幅(地域/行业/概念)
stock news <symbol>                 # 个股最新资讯
stock kline <symbol>                # 日K数据以及技术指标(EMA/BOLL/KDJ/RSI)
stock fundflow <symbol>             # 资金分布与每日主力/散户净流向

开发

# 安装依赖
uv sync

# 运行测试
uv run pytest tests/ -v

# Lint
uv run ruff check .

# 安装当前目录源码,并暴露 `stock` 命令
uv tool install --from . agent-stock

# 强制升级
uv tool install --from . agent-stock --force --reinstall --refresh --no-cache

# 卸载
uv tool uninstall agent-stock

# 调试
uv run python -m stock quote 000001

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_stock-0.1.3.tar.gz (45.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_stock-0.1.3-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file agent_stock-0.1.3.tar.gz.

File metadata

  • Download URL: agent_stock-0.1.3.tar.gz
  • Upload date:
  • Size: 45.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_stock-0.1.3.tar.gz
Algorithm Hash digest
SHA256 686be67b7273892317bd47645575486a3f21221ef55fe35d8c5902ce38232fa0
MD5 257df25f84be76baa8b6bb653662bfa0
BLAKE2b-256 d2f6a22c773825dcdcff5b2d10ab18e5fa4eb09b6ebd82a9e7e70116f23885dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_stock-0.1.3.tar.gz:

Publisher: publish.yml on AnoyiX/agent-stock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_stock-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: agent_stock-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_stock-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6035d6b85f22e27ce8d383a34b90e1173fa4161f2709e44f24ea3afa44f7aac0
MD5 a63ef4010bbca92e67a037612f0d1bd4
BLAKE2b-256 a32715bc27114f677d5a7268554c8d5913487e1a5f7b121d48ff97c142e981e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_stock-0.1.3-py3-none-any.whl:

Publisher: publish.yml on AnoyiX/agent-stock

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page