Skip to main content

A python util for US stock market

Project description

A util for US stock market

简介

一个美股行情工具包,可以用来获取美股股票列表、实时行情、历史k线数据。

安装

pip install openstock

使用

  • 初始化
token = '8aa9be32f402301d' 
stock_client = StockClient(token)

token申请地址: https://stock.mypython.me/app/apply_token

  • 获取美股代码列表
stock_client.get_stock_list()
  • 获取实时行情
stock_client.get_stock_quote(query=['BABA','JD'])
  • 获取历史行情数据
stock_client.get_stock_bars(query=['BABA','JD'])

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

openstock-0.0.5.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

openstock-0.0.5-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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