Skip to main content

Python Wind api

Project description

py_wind

wind 接口简易封装

环境需求

  • python 3.6+

使用说明

更多函数用法,详见函数说明.
get_stock_ids       取板块的证券代码 BanKuai.A /SH /SZ
get_history_day     取历史日线行情
get_history_min     取历史分钟行情
get_filter_stocks   取条件选股的结果
sub_quote           订阅行情
get_pe_div          取股票的市盈率PE(TTM)(pe_ttm)和股息率(近12个月)(dividendyield2)
get_edb             获取经济数据

示例

from py_wind.wind import Wind, StockTick
import py_wind.stock_ids as ids

def OnTick(tick:StockTick):
    print(tick.__dict__)

if __name__ == '__main__':
    s = Wind()
    # 历史行情
    df = s.get_stock_ids(ids.BK_A) # 取板块构成
    print(df)
    df = s.get_history_min(ids.ZS_SH, '2019-01-01', period=5) # 取指数行情数据
    print(df)
    # 实时行情
    s.on_tick = OnTick
    s.sub_quote('000001.SZ')
    while input() != 'q':
        continue
    s.stop()

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

py_wind-0.0.7.1.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file py_wind-0.0.7.1.tar.gz.

File metadata

  • Download URL: py_wind-0.0.7.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for py_wind-0.0.7.1.tar.gz
Algorithm Hash digest
SHA256 6bd6e737a21fcb0ffe53a93fcd123e8dfa7a8a36c729403c6facbc452d69c1ac
MD5 ca1b5de68c29de5a6de6915861781de2
BLAKE2b-256 370886f5dbd7ffb40b96534194da118516a5eaec5cdaf3dc61468d8526535101

See more details on using hashes here.

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