Skip to main content

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 时分秒
                                          # ......
                                          # }

​

Metadata

Release files for astocktrade 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astocktrade 0.0.8
File Size Uploaded
astocktrade-0.0.8.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for astocktrade 0.0.8
File Interpreter ABI Platform
astocktrade-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 12.6 kB

Release files / astocktrade-0.0.8.tar.gz

Download URL astocktrade-0.0.8.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f8fd592d61f175e8068c1e0459b8c2868cbb98d2682d55feff8633e9d643c954
BLAKE2b-256 checksum
How to use checksums
8aec4e350ef248cec265bf3ad139880d2431f271d021a40250840f9ba29ce1ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release files / astocktrade-0.0.8-py3-none-any.whl

Download URL astocktrade-0.0.8-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc5f96b2dbd57e7d6f7b43e4a2b91395156e222aa911ece475e071ef4d5442fd
BLAKE2b-256 checksum
How to use checksums
4fa1b0433a01bff390e51875440be681118e9f52a5e407f0b710f22dfa412283
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page