Skip to main content

rainiee stock data api

Project description

rainiee_data

  • easy to use as most of the data returned are json

Installation

pip install rainiee_data_test==2.2.0
from rainiee_data_test.data_client import DataClient
client = DataClient(username,password)

Upgrade

pip install rainiee_data_test --upgrade

Quick Start

cn_index

    1: cn_index_basic
        rainiee_client.cn_index_basic('SSE')  #//SSE = 上交所指数 SZSE = 深交所指数
    2: cn_index_composition
        rainiee_client.cn_index_composition('000001.SH')
    3: cn_index_composition_weight
        rainiee_client.cn_index_composition_weight('000001.SH')
    4: cn_index_eod
        rainiee_client.cn_index_eod('399654.SZ',564,600)    

cn_stock

    1: cn_stock_eod
        -- 获取未复权数据,日k线
        rainiee_client.cn_stock_eod('300647.sz',2581,2581)
        -- 获取前复权数据,日k线
        rainiee_client.cn_stock_eod('300647.sz',2581,2681,'qfq')
        -- 获取未复权数据,5分钟行情
        rainiee_client.cn_stock_eod('300647.sz',2581,2681,None,5)

    2: cn_stock_realtime
        rainiee_client.cn_stock_realtime('300647.sz')
    3: cn_symbol_list
        rainiee_client.cn_symbol_list('chuangyeban')

cn_stockstats

    1: cn_stockstats_list
          rainiee_client.cn_stockstats_list('300647.sz',2581,2581)
    2: cn_stockstats_sort
          rainiee_client.cn_stockstats_sort('daily_return_ma5',2581,2581)
    3: cn_stockstats_top_turnover_rate
          rainiee_client.cn_stockstats_top_turnover_rate(20,2581)
    4: cn_stockstats_is_enter_market
          rainiee_client.cn_stockstats_is_enter_market(2581,1.03,13)
    5: cn_stockstats_latest_returns
          rainiee_client.cn_stockstats_latest_returns('300647.sz',20)
    6: cn_stockstats_eod_portf_return   
          portf = [{'percentage':1.0,'symbol':'300547.sz'},{'percentage':0.5,'symbol':'300647.sz'}]
          rainiee_client.cn_stockstats_eod_portf_return(portf,2581))

index

   1:get_trade_index
           start_index = client.get_trade_index('20200731')
   2:get_trade_date
           start_index = client.get_trade_date(2571)

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

rainiee_data_test-2.2.0.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

rainiee_data_test-2.2.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file rainiee_data_test-2.2.0.tar.gz.

File metadata

  • Download URL: rainiee_data_test-2.2.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.4

File hashes

Hashes for rainiee_data_test-2.2.0.tar.gz
Algorithm Hash digest
SHA256 251c8d797e0f06231f609e5c8b70d43a96c9c17377fdaca53a34e1ccc55a6950
MD5 ced220ffcbe336244ce708b50ce655f5
BLAKE2b-256 e4c2753a4a087b73e72e87a290e913bf57dbdbc0802e88db1baf09e46f5590ad

See more details on using hashes here.

File details

Details for the file rainiee_data_test-2.2.0-py3-none-any.whl.

File metadata

  • Download URL: rainiee_data_test-2.2.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.4

File hashes

Hashes for rainiee_data_test-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 958ee85ecc76ee7f295e3233f00da6c8c6a1cf295934e5191e82a5a42015a1aa
MD5 c8533d1bab14af952d7671ad4caa7fb8
BLAKE2b-256 efd34ecf53ebcfabb269340f1e377c27b9588ac90b2d8ea95ef548b98ab23ad5

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