Skip to main content

A lightweight wrapper for financial data API

Project description

MiniShare SDK

pip install minishare --upgrade

简介

MiniShare 是一个轻量级的金融数据API封装库,提供简洁易用的接口来获取股票、基金等金融数据。

安装

pip install minishare

快速开始

import minishare as ms

# 设置API token
ms.set_token('your_token_here')

# 获取API客户端
pro = ms.pro_api()

# 获取日线数据
df = pro.daily(ts_code='000001.SZ', start_date='20230101', end_date='20231231')
print(df.head())

# 获取通用行情数据
df = ms.pro_bar(ts_code='000001.SZ', start_date='20230101', end_date='20231231')
print(df.head())

主要功能

  • 支持多种金融数据API
  • 简化的数据获取接口
  • 自动错误处理和重试
  • 缓存机制优化性能
  • 设备ID管理防止滥用

API参考

主要函数

  • set_token(token): 设置API token
  • pro_api(token=None): 获取Pro API客户端
  • pro_bar(): 通用行情数据接口

数据接口

通过 pro_api() 获取的客户端支持以下主要接口:

  • daily(): 日线行情
  • weekly(): 周线行情
  • monthly(): 月线行情
  • stk_mins(): 分钟数据

许可证

MIT License

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

minishare-0.1001.0.tar.gz (86.1 kB view details)

Uploaded Source

Built Distribution

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

minishare-0.1001.0-py3-none-any.whl (109.6 kB view details)

Uploaded Python 3

File details

Details for the file minishare-0.1001.0.tar.gz.

File metadata

  • Download URL: minishare-0.1001.0.tar.gz
  • Upload date:
  • Size: 86.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for minishare-0.1001.0.tar.gz
Algorithm Hash digest
SHA256 5e7c4b88bf7a9d46ee0d527a56595f410295f2149309cc96f85a1708f6a9c552
MD5 bc245d310bf8ae1d762d089b8a5c2ede
BLAKE2b-256 0079919f6cf86043b0e49128cfc4d45092d5da48ba89b2e4824b45caa39ccda1

See more details on using hashes here.

File details

Details for the file minishare-0.1001.0-py3-none-any.whl.

File metadata

  • Download URL: minishare-0.1001.0-py3-none-any.whl
  • Upload date:
  • Size: 109.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.23

File hashes

Hashes for minishare-0.1001.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf2ab4c68e6a1ca0996b2a034796bc376f01cd546ce7adc491c4631792d5409f
MD5 0de01e23a071db9d3ce210da6e732af0
BLAKE2b-256 19b6a8e0d2ed06b787ce7f89a3e905b9caed0146751b5ac88bbb4531abe09382

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