Skip to main content

Hamuna Stock SDK - A股行情数据SDK

Project description

stock_sdk

A 股行情数据 SDK - 基于 HamunaStockApi

安装

pip install stock_sdk -U -i https://pypi.tuna.tsinghua.edu.cn/simple

快速开始

import asyncio
from stock_sdk import HamunaStockApi

async def main():
    api = HamunaStockApi(
        base_url='https://stock.ai.hamuna.club',
        token='your_token'
    )

    # 获取股票列表
    stocks = await api.get_stock_list(filter_st=True)
    print(f"股票数量: {len(stocks)}")

    # 获取日K线
    kline = await api.get_daily_kline('000001', count=10)

    # 获取9:25竞价快照
    auction = await api.get_auction_0925('600000', '2026-05-15')

    # 获取昨日涨停列表
    zt = await api.get_lastday_limit()

asyncio.run(main())

API

方法 说明
get_stock_list() 获取股票列表
get_daily_kline() 获取日K线
get_minute_kline() 获取分钟K线
get_auction_0925() 9:25竞价快照
get_lastday_limit() 昨日涨停列表
get_boards_tdx() 板块列表
get_board_members_tdx() 板块成员
stock_fund_flow_summary_tdx() 资金流

环境变量

变量 说明
HAMUNA_API_URL API 地址(默认 https://stock.ai.hamuna.club)
HAMUNA_API_TOKEN API Token

License

MIT

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

stock_sdk-0.1.3.tar.gz (83.7 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: stock_sdk-0.1.3.tar.gz
  • Upload date:
  • Size: 83.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for stock_sdk-0.1.3.tar.gz
Algorithm Hash digest
SHA256 dbc5b38e1785cc4ce07207126f415129137646f10d9a91d5986596c8e99e730a
MD5 a04a5fb0292dacb24e8176682e24e07b
BLAKE2b-256 1bdad719e7a347665f4fc32679e99d7eb4a55db86e64e0cec061c107152b2be6

See more details on using hashes here.

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