Skip to main content

some tools for astocktrade

Project description

import astocktradever1.getdata as ag ag.get_tradeday(...) ag.getdatafrombaostock(...)

getdata: get_tradeday: def get_tradeday(start_str,end_str): sample: list = get_tradeday('2022-07-01','2022-07-11') #获取20220701至20220711之间所有股票交易日并存入 list 中

getdatafrombaostock:
  def getdatafrombaostock(stnamelist,stday,edday,fq,otpath,add_or_rpl): 
  sample: getdatafrombaostock('D\\namelist.csv','2022-07-01','2022-07-11','5','D\\store\\,'new') #获取 D\\namelist.csv 中所有股票20220701至20220711间5分钟k线信息,存入 D\\store\\,为新添
               getdatafrombaostock('D\\namelist.csv','2022-07-01','2022-07-11','5','D\\store\\,'add') #获取 D\\namelist.csv 中所有股票20220701至20220711间5分钟k线信息,存入 D\\store\\,为追加
               注: fq位置为k线频率 d=日k线、w=周、m=月、5=5分钟、15=15分钟、30=30分钟、60=60分钟k线数据,不区分大小写
                       namelist.csv文件包含股票名称的列名应为 ts_code 股票名称形如 sh.xxxxxx 或 sz.xxxxxx 小写字母
                       保存文件名称为对应股票名称 如:sh.600000 保存为 sh.600000.csv

get_alldatebar:
   def get_alldatebar(st,ed,otpath):
   sample:get_alldatebar('2022-07-01','2022-07-11','D\\store\\) #获取20220701至20220711之间每一日大盘全部信息,分日存入D\\store\\

get_tick:
   def get_tick(stock_code) :
   sample: list = get_tick('600000') #获取sh.600000股票实时信息,存入list
   注:list[i]信息包括但不限于 #{i=
                                          # 0 名称
                                          # 1 今开
                                          # 2 昨收
                                          # 3 此时价格
                                          # 4 最高
                                          # 5 最低
                                          # 30 年月天
                                          # 31 时分秒
                                          # ......
                                          # }

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

astocktrade-0.0.8.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

astocktrade-0.0.8-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file astocktrade-0.0.8.tar.gz.

File metadata

  • Download URL: astocktrade-0.0.8.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for astocktrade-0.0.8.tar.gz
Algorithm Hash digest
SHA256 f8fd592d61f175e8068c1e0459b8c2868cbb98d2682d55feff8633e9d643c954
MD5 b805624478f570a71d38bb19a26fd17c
BLAKE2b-256 8aec4e350ef248cec265bf3ad139880d2431f271d021a40250840f9ba29ce1ea

See more details on using hashes here.

File details

Details for the file astocktrade-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: astocktrade-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for astocktrade-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 dc5f96b2dbd57e7d6f7b43e4a2b91395156e222aa911ece475e071ef4d5442fd
MD5 4591e0350724715b26b660ca86132819
BLAKE2b-256 4fa1b0433a01bff390e51875440be681118e9f52a5e407f0b710f22dfa412283

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