TuShare is a utility for crawling historical data of China stocks

Overview

TuShare

Tushare Pro版已发布,请访问新的官网了解和查询数据接口! https://tushare.pro

TuShare是实现对股票/期货等金融数据从数据采集清洗加工数据存储过程的工具,满足金融量化分析师和学习数据分析的人在数据获取方面的需求,它的特点是数据覆盖范围广,接口调用简单,响应快速。

欢迎关注扫描TuShare的微信公众号“挖地兔”,更多资源和信息与您分享。另外,由于tushare官网在重新设计和开发,最新接口的使用文档都会在挖地兔公众号发布,所以,请扫码关注,谢谢!

QQ交流群:

  • 一群(已满):14934432
  • 二群(付费高级用户群,可获得更多支持及参与圈子活动):658562506
  • 三群(免费):665480579
  • 四群 (免费) :527416821

Dependencies

python 2.x/3.x

pandas

Installation

Upgrade

pip install tushare --upgrade

Quick Start

Example 1. 获取个股历史交易数据(包括均线数据):

import tushare as ts

ts.get_hist_data('600848') #一次性获取全部数据
另外,参考get_k_data函数

结果显示:

日期 ,开盘价, 最高价, 收盘价, 最低价, 成交量, 价格变动 ,涨跌幅,5日均价,10日均价,20日均价,5日均量,10日均量,20日均量,换手率

			 open    high   close     low     volume    p_change  ma5 \
date                                                                     
2012-01-11   6.880   7.380   7.060   6.880   14129.96     2.62   7.060   
2012-01-12   7.050   7.100   6.980   6.900    7895.19    -1.13   7.020   
2012-01-13   6.950   7.000   6.700   6.690    6611.87    -4.01   6.913   
2012-01-16   6.680   6.750   6.510   6.480    2941.63    -2.84   6.813   
2012-01-17   6.660   6.880   6.860   6.460    8642.57     5.38   6.822   
2012-01-18   7.000   7.300   6.890   6.880   13075.40     0.44   6.788   
2012-01-19   6.690   6.950   6.890   6.680    6117.32     0.00   6.770   
2012-01-20   6.870   7.080   7.010   6.870    6813.09     1.74   6.832 

			 ma10    ma20      v_ma5     v_ma10     v_ma20     turnover  
date                                                                  
2012-01-11   7.060   7.060   14129.96   14129.96   14129.96     0.48  
2012-01-12   7.020   7.020   11012.58   11012.58   11012.58     0.27  
2012-01-13   6.913   6.913    9545.67    9545.67    9545.67     0.23  
2012-01-16   6.813   6.813    7894.66    7894.66    7894.66     0.10  
2012-01-17   6.822   6.822    8044.24    8044.24    8044.24     0.30  
2012-01-18   6.833   6.833    7833.33    8882.77    8882.77     0.45  
2012-01-19   6.841   6.841    7477.76    8487.71    8487.71     0.21  
2012-01-20   6.863   6.863    7518.00    8278.38    8278.38     0.23  

设定历史数据的时间:

ts.get_hist_data('600848',start='2015-01-05',end='2015-01-09')

			open    high   close     low    volume   p_change     ma5    ma10 \  
date                                                                            
2015-01-05  11.160  11.390  11.260  10.890  46383.57     1.26  11.156  11.212   
2015-01-06  11.130  11.660  11.610  11.030  59199.93     3.11  11.182  11.155   
2015-01-07  11.580  11.990  11.920  11.480  86681.38     2.67  11.366  11.251   
2015-01-08  11.700  11.920  11.670  11.640  56845.71    -2.10  11.516  11.349   
2015-01-09  11.680  11.710  11.230  11.190  44851.56    -3.77  11.538  11.363   
 			ma20     v_ma5    v_ma10     v_ma20 	 turnover  
date                                                        
2015-01-05  11.198  58648.75  68429.87   97141.81     1.59  
2015-01-06  11.382  54854.38  63401.05   98686.98     2.03  
2015-01-07  11.543  55049.74  61628.07  103010.58     2.97  
2015-01-08  11.647  57268.99  61376.00  105823.50     1.95  
2015-01-09  11.682  58792.43  60665.93  107924.27     1.54  

复权历史数据 获取历史复权数据,分为前复权和后复权数据,接口提供股票上市以来所有历史数据,默认为前复权。如果不设定开始和结束日期,则返回近一年的复权数据,从性能上考虑,推荐设定开始日期和结束日期,而且最好不要超过一年以上,获取到数据后,请及时在本地存储。

ts.get_h_data('002337') #前复权
ts.get_h_data('002337',autype='hfq') #后复权
ts.get_h_data('002337',autype=None) #不复权
ts.get_h_data('002337',start='2015-01-01',end='2015-03-16') #两个日期之间的前复权数据

Example 2. 一次性获取最近一个日交易日所有股票的交易数据(结果显示速度取决于网速)

ts.get_today_all()

结果显示:

代码,名称,涨跌幅,现价,开盘价,最高价,最低价,最日收盘价,成交量,换手率

	  code    name     changepercent  trade   open   high    low  settlement \  
0     002738  中矿资源         10.023  19.32  19.32  19.32  19.32       17.56   
1     300410  正业科技         10.022  25.03  25.03  25.03  25.03       22.75   
2     002736  国信证券         10.013  16.37  16.37  16.37  16.37       14.88   
3     300412  迦南科技         10.010  31.54  31.54  31.54  31.54       28.67   
4     300411  金盾股份         10.007  29.68  29.68  29.68  29.68       26.98   
5     603636  南威软件         10.006  38.15  38.15  38.15  38.15       34.68   
6     002664  信质电机         10.004  30.68  29.00  30.68  28.30       27.89   
7     300367  东方网力         10.004  86.76  78.00  86.76  77.87       78.87   
8     601299  中国北车         10.000  11.44  11.44  11.44  11.29       10.40   
9     601880   大连港         10.000   5.72   5.34   5.72   5.22        5.20   
10    000856  冀东装备         10.000   8.91   8.18   8.91   8.18        8.10  
		volume  	 turnoverratio  
0        375100        1.25033  
1         85800        0.57200  
2       1058925        0.08824  
3         69400        0.51791  
4        252220        1.26110  
5       1374630        5.49852  
6       6448748        9.32700  
7       2025030        6.88669  
8     433453523        4.28056  
9     323469835        9.61735  
10     25768152       19.51090  

Example 3. 获取历史分笔数据

import tushare as ts

df = ts.get_tick_data('600848',date='2014-01-09')
df.head(10)

结果显示:

成交时间、成交价格、价格变动,成交手、成交金额(元),买卖类型

Out[3]: 
 	 time  		price change  volume  amount  type
0    15:00:00   6.05     --       8    4840   卖盘
1    14:59:55   6.05     --      50   30250   卖盘
2    14:59:35   6.05     --      20   12100   卖盘
3    14:59:30   6.05  -0.01     165   99825   卖盘
4    14:59:20   6.06   0.01       4    2424   买盘
5    14:59:05   6.05  -0.01       2    1210   卖盘
6    14:58:55   6.06     --       4    2424   买盘
7    14:58:45   6.06     --       2    1212   买盘
8    14:58:35   6.06   0.01       2    1212   买盘
9    14:58:25   6.05  -0.01      20   12100   卖盘
10   14:58:05   6.06     --       5    3030   买盘

Example 4. 获取实时交易数据(Realtime Quotes Data)

df = ts.get_realtime_quotes('000581') #Single stock symbol
df[['code','name','price','bid','ask','volume','amount','time']]

结果显示:

名称、开盘价、昨价、现价、最高、最低、买入价、卖出价、成交量、成交金额...more in docs

   code    name     price  bid    ask    volume   amount        time
0  000581  威孚高科  31.15  31.14  31.15  8183020  253494991.16  11:30:36 

请求多个股票方法(一次最好不要超过30个):

ts.get_realtime_quotes(['600848','000980','000981']) #symbols from a list
ts.get_realtime_quotes(df['code'].tail(10)) #from a Series

更多文档

https://tushare.pro

http://tushare.org/

Change Logs

1.2.17 2018/11/24

  • Pro版增加期货数据
  • Pro版增加A股周/月数据
  • Pro版增加通用行情pro_bar接口股票/基金/期货/数据货币行情的支持,同时支持股票的复权行情

1.2.15 2018/10/15

  • 增加通用行情pro_bar接口
  • 优化set_token功能

1.2.12 2018/08/10

1.0.5 2017/11/12

  • 新增可转债数据
  • 增加长连接关闭函数
  • 修复部分bug

1.0.2 2017/10/29

  • 新增bar接口,支持更稳定的股票、ETF、期货期权、港股、中概股等品种
  • 新增tick接口,支持以上品种的成交数据
  • 新增沪深港通每日资金流向数据
  • 修复了部分bug

0.9.2 2017/09/13

  • 新增数据货币行情数据接口,同时支持火币、okcoin、中国比特币
  • 部分bug修复

0.8.8 2017/08/29

  • 新增分红送股数据(包含历史)
  • 新增get_day_all接口
  • 新增BDI接口

0.8.0 2017/06/05

  • 新增期货行情数据6个接口,感谢debugo贡献代码
  • 修复部分bug

0.7.6 2017/05/16

  • get_today_all接口数据补齐
  • forecast_data mac下编码问题修复

0.7.0 2017/03/12

  • get_today_all接口提速
  • 版本累积更新

0.6.2 2016/12/03

  • 新增十大股东和十大流通股接口 top10_holders
  • 新增全球实时指数列表接口 global_realtime
  • 修复部分bug

0.6.1 2016/11/22

  • 修正get_k_databug
  • 修正实盘交易登录问题

0.5.6 2016/11/06

  • 新增全新行情数据接口get_k_data(请关注tushare公众号“挖地兔”后查看历史文章《全新的免费行情数据接口》)
  • 修复程序和文档bug

0.5.1 2016/10/16

  • 新增实盘交易接口
  • 修复bug

0.4.9 2016/03/26

  • 新增申万行业分类get_industry_classified(standard='sw')
  • 新增交易日历trade_cal()
  • 修复bug

0.4.3 2015/12/24

  • 新增电影票房数据
  • 修复部分bug

0.4.1 2015/11/27

  • 新增sina大单数据
  • 修改当日分笔bug
  • 深市融资融券数据修复

0.3.9 2015/10/13

  • 新增期权隐含波动率数据
  • 修复指数成份及权重接口问题

0.3.8 2015/09/19

  • 沪深300成份股和权重接口问题修复
  • 其它bug的修复

0.3.5 2015/07/27

  • 部分代码修正

0.3.4 2015/06/15

  • 新增‘龙虎榜’模块

    1. 每日龙虎榜列表
    2. 个股上榜统计
    3. 营业部上榜统计
    4. 龙虎榜机构席位追踪
    5. 龙虎榜机构席位成交明细
  • 修改get_h_data数据类型为float

  • 修改get_index接口遗漏的open列

  • 合并GitHub上提交的bug修复

0.2.8 2015/04/28

  • 新增大盘指数实时行情列表
  • 新增大盘指数历史行情数据(全部)
  • 新增终止上市公司列表(退市)
  • 新增暂停上市公司列表
  • 修正融资融券明细无日期的缺陷
  • 修正get_h_data部分bug

0.2.6

  • 新增沪市融资融券列表
  • 新增沪市融资融券明细列表
  • 新增深市融资融券列表
  • 新增深市融资融券明细列表
  • 修正复权数据数据源出现null造成异常问题(对大约300个股票有影响)

0.2.5 2015/04/16

  • 完成python2.x和python3.x兼容性支持
  • 部分算法优化和代码重构
  • 新增中证500成份股
  • 新增当日分笔交易明细
  • 修正分配预案(高送转)bug

0.2.3 2015/04/11

  • 新增“新浪股吧”消息和热度
  • 新增新股上市数据
  • 修正“基本面”模块中数据重复的问题
  • 修正历史数据缺少一列column(数据来源问题)的bug

0.2.0 2015/03/17

  • 新增历史复权数据接口
  • 新增即时滚动新闻、信息地雷数据
  • 新增沪深300指数成股份及动态权重、
  • 新增上证50指数成份股
  • 修改历史行情数据类型为float

0.1.9 2015/02/06

  • 增加分类数据
  • 增加数据存储示例

0.1.6 2015/01/27

  • 增加了重点指数的历史和实时行情
  • 更新docs

0.1.5 2015/01/26

  • 增加基本面数据接口
  • 发布一版使用手册,开通TuShare docs网站

0.1.3 2015/01/13

  • 增加实时交易数据的获取
  • Done for crawling Realtime Quotes data

0.1.1 2015/01/11

  • 增加tick数据的获取

0.1.0 2014/12/01

  • 创建第一个版本
  • 实现个股历史数据的获取
Comments
  • get_concept_classified()报错

    get_concept_classified()报错

    在0.8.4版本下执行get_concept_classified()后报错,具体错误见下。

    ts.version Out[3]: '0.8.4'

    c = ts.get_concept_classified() [Getting data:]###############################---------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 c = ts.get_concept_classified()

    C:\Program Files\Anaconda3\lib\site-packages\tushare\stock\classifying.py in get_concept_classified() 72 for row in df.values: 73 rowDf = _get_detail(row[0]) ---> 74 rowDf['c_name'] = row[1] 75 data.append(rowDf) 76 data = pd.concat(data,ignore_index=True)

    TypeError: 'NoneType' object does not support item assignment

    opened by leiliuliulei 14
  • Python3支持  / 指数数据 / 整合进zipline

    Python3支持 / 指数数据 / 整合进zipline

    1. 理论上把print改一下就支持python3了,不过我没仔细看代码。
    2. 获取不了创业板R(399606)之类的数据,get_hist_data和get_h_data分别报错,AssertionError: 15 columns passed, passed data had 14 columnsAttributeError: 'list' object has no attribute 'keys'
    3. zipline 是Quantopian的一个算法测试框架,目前不支持中国的证券数据……
    opened by ahxxm 14
  • 已经无法批量通过get_tick_data获取数据了

    已经无法批量通过get_tick_data获取数据了

    总是得到这个错误: [Getting data:][Getting data:]HTTP Error 456: HTTP Error 456: HTTP Error 456: 无论是腾讯的,网易的还是新浪的,只要每过五,六秒调一次这个API,我的IP就会被禁止,这两天刚刚变得这样的。估计这些公司不允许我们这么干了,咋办啊?好难搞到数据的,还有什么手段可以得到Tick数据吗? 不管我怎么更新IP,似乎都不行了。怎么办啊》

    opened by clockzhong 9
  • 增加20种常用的技术指标算法

    增加20种常用的技术指标算法

    通过get_k_data()获取个股数据后,通过各个指标算法计算出相关数据。 包括MA,MD,EMA,MACD,KDJ,RSI,BOLL,WNR,DMI,BIAS,ASI,VR,ARBR,DPO,TRIX,BBI,MTM,OBV指标。 例1:获取工商银行(601398)自2018-01-01到2018-05-27的MACD指标: import tushare as ts data = ts.get_k_data("601398", start="2018-01-01", end="2018-05-27") #数据按日期升序列排序 data = data.sort_values(by=["date"], ascending=True) MACD = ts.indictor.macd(data, quick_n=12, slow_n=26, dem_n=9)

    例2:绘制工商银行(601398)自2018-01-01到2018-05-27全部指标图表: import tushare as ts data = ts.get_k_data("601398", start="2018-01-01", end="2018-05-27") data = data.sort_values(by=["date"], ascending=True) ts.indictor.plot_all(data, is_show=True, output=None)

    缺陷与注意事项: 1 只对计算结果正确性做了最初步的判断和检查,不能完全保证正确,需要金融界专业人士判断并指正。 2 一部分需要设置统计时长n,例如移动平均值MA(n=10),数据的前n条不可信,可以使用的有效数据应避开前n行。 3 其他指标将陆续添加。

    输出图例: 601398

    opened by liaocyintl-deprecated 8
  • 最近用get_k_data 获取的个股 如果在停牌时间内 出现IndexError: list index out of range

    最近用get_k_data 获取的个股 如果在停牌时间内 出现IndexError: list index out of range

    选一个目前停牌的个股,start的时间在停牌之后就会出现这个问题。 我以前没遇到过,是不是最近升级了的问题。 tushare版本0.7.4

    File "/Users/rocky/Data/program/base_function/tushare_function.py", line 344, in check_k_data df_x=ts.get_k_data(code=each_code,start='2017-03-01') File "/Users/rocky/Library/Python/2.7/lib/python/site-packages/tushare/stock/trading.py", line 675, in get_k_data retry_count, pause), File "/Users/rocky/Library/Python/2.7/lib/python/site-packages/tushare/stock/trading.py", line 707, in _get_k_data if len(js['data'][symbol][dataflag][0]) == 6: IndexError: list index out of range

    opened by Rockyzsu 8
  • get_today_ticks错误:No tables found matching pattern '.+'

    get_today_ticks错误:No tables found matching pattern '.+'

    '000006'一会可以,一会不可以

    '000002'就不行 感觉和沪深没关系 '600343'

    [Getting data:]#####################################################################No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    获取失败,请检查网络和URL
    [Getting data:]#####################################################################No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    获取失败,请检查网络和URL
    [Getting data:]#####################################################################No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    No tables found matching pattern '.+'
    
    opened by mdsb100 8
  • ts.get_stock_basics() 返回 Connection refused 错误

    ts.get_stock_basics() 返回 Connection refused 错误

    Log 如下:

    In [11]: ts.get_stock_basics()

    URLError Traceback (most recent call last) in () ----> 1 ts.get_stock_basics()

    /home/xzeng/Projects/scf/bear_space/walleQuant/tushare/stock/fundamental.pyc in get_stock_basics(date) 52 datepre = '' if date is None else wdate[0:4] + wdate[4:6] + '/' 53 request = Request(ct.ALL_STOCK_BASICS_FILE%(datepre, '' if date is None else wdate)) ---> 54 text = urlopen(request, timeout=10).read() 55 text = text.decode('GBK') 56 text = text.replace('--', '')

    /usr/lib64/python2.7/urllib2.pyc in urlopen(url, data, timeout, cafile, capath, cadefault, context) 152 else: 153 opener = _opener --> 154 return opener.open(url, data, timeout) 155 156 def install_opener(opener):

    /usr/lib64/python2.7/urllib2.pyc in open(self, fullurl, data, timeout) 427 req = meth(req) 428 --> 429 response = self._open(req, data) 430 431 # post-process response

    /usr/lib64/python2.7/urllib2.pyc in _open(self, req, data) 445 protocol = req.get_type() 446 result = self._call_chain(self.handle_open, protocol, protocol + --> 447 '_open', req) 448 if result: 449 return result

    /usr/lib64/python2.7/urllib2.pyc in _call_chain(self, chain, kind, meth_name, *args) 405 func = getattr(handler, meth_name) 406 --> 407 result = func(*args) 408 if result is not None: 409 return result

    /usr/lib64/python2.7/urllib2.pyc in http_open(self, req) 1228 1229 def http_open(self, req): -> 1230 return self.do_open(httplib.HTTPConnection, req) 1231 1232 http_request = AbstractHTTPHandler.do_request_

    /usr/lib64/python2.7/urllib2.pyc in do_open(self, http_class, req, **http_conn_args) 1198 except socket.error, err: # XXX what error? 1199 h.close() -> 1200 raise URLError(err) 1201 else: 1202 try:

    URLError: <urlopen error [Errno 111] Connection refused>

    In [12]:

    opened by Bearzeng 8
  •  pip文件有误,无法安装tushare。请注意下哦~~

    pip文件有误,无法安装tushare。请注意下哦~~

    `➜ ~ which pip pip: aliased to /Users/morningtzh/anaconda/bin/pip ➜ ~ which python python: aliased to /Users/morningtzh/anaconda/bin/python3 ➜ ~ pip install tushare

    Collecting tushare Using cached https://pypi.tuna.tsinghua.edu.cn/packages/08/58/fe1c748b73565de9996871ae3fee47afbbe7686e83a7a89f27407a48033b/tushare-0.8.0.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "/private/var/folders/cx/f429x4mn55q0j_p1p140xrhw0000gn/T/pip-build-rzhc4h25/tushare/tushare/futures/domestic.py", line 16, in from urllib.request import urlencode ImportError: cannot import name 'urlencode'

    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/cx/f429x4mn55q0j_p1p140xrhw0000gn/T/pip-build-rzhc4h25/tushare/setup.py", line 4, in <module>
        import tushare
      File "/private/var/folders/cx/f429x4mn55q0j_p1p140xrhw0000gn/T/pip-build-rzhc4h25/tushare/tushare/__init__.py", line 117, in <module>
        from tushare.futures.domestic import (get_cffex_daily, get_czce_daily,
      File "/private/var/folders/cx/f429x4mn55q0j_p1p140xrhw0000gn/T/pip-build-rzhc4h25/tushare/tushare/futures/domestic.py", line 19, in <module>
        from urllib2 import urlopen, Request
    ModuleNotFoundError: No module named 'urllib2'
    
    ----------------------------------------
    

    Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/cx/f429x4mn55q0j_p1p140xrhw0000gn/T/pip-build-rzhc4h25/tushare/`

    之前homebrew环境上python3安装过 tushre,今天刚装了 anaconda 发现 tushare 竟然装不上了。不知道为什么会 from urllib.request import urlencode 我看代码里确实是from urllib.parse import urlencode 而且历史记录也都是 parse 里面 import 的。

    再看了下 pip 上的文件,里面是 from urllib.request import urlencode 导致了错误

    希望 tushare 能将 pip 上的包修改下 谢谢~~~~~~~

    opened by morningtzh 7
  • get_hist_data无法获取hs300在11:30的数据

    get_hist_data无法获取hs300在11:30的数据

    在9月1日11:50调用 ts.get_hist_data('hs300',start='2016-09-01',end='2016-09-02',ktype='5')['close'] 无法获取11:30的数据 但可以获取 ts.get_hist_data('000965',start='2016-09-01',end='2016-09-02',ktype='5')['close'] 在11:30分的数据 为什么?

    opened by argunmmm 7
  • 指数代码

    指数代码

    请问下面的指数的code是什么 根据df = ts.get_index() 返回的值如下,但这些code显然是代表深圳股票,不是需要的指数。

    0 000001 上证指数 -1.13 4527.396 4476.215 4572.391 4432.904 1 000002 A股指数 -1.13 4744.093 4690.628 4791.534 4645.190 2 000003 B股指数 -2.15 403.694 395.018 405.795 392.173 3 000008 综合指数 0.79 3724.496 3753.906 3848.575 3695.817 4 000009 上证380 -2.79 7689.128 7474.305 7695.329 7398.911 5 000010 上证180 -1.13 10741.180 10619.610 10863.080 10529.900 6 000011 基金指数 -1.02 7033.291 6961.659 7058.856 6918.273 7 000012 国债指数 0.01 148.626 148.641 148.656 148.510 8 000016 上证50 -0.79 3308.454 3282.330 3370.025 3255.769 9 000017 新综指 -1.13 3826.013 3782.936 3864.307 3746.284

    opened by pittmiqi 7
  • profit 分配预案 拉取数据全为0

    profit 分配预案 拉取数据全为0

    python 2.7 tushare 0.5.0

    import tushare as ts

    df = ts.profit_data(top=60) df.sort('shares',ascending=False)

    divi shares 部分 都为0 也没有任何报错

      code          name  year report_date  divi  shares
    

    0 300429 强åæ°æ 2016 2016-07-07 0 0 1 601222 ææ´è½æº 2016 2016-07-07 0 0 2 002675 ä¸è¯è¯ä¸ 2016 2016-07-06 0 0 3 000038 深大é 2016 2016-07-04 0 0 4 300474 æ¯åå¾® 2016 2016-06-30 0 0 5 300499 é«æ¾è¡ä»½ 2016 2016-06-30 0 0 6 002695 çä¸ç 2016 2016-06-30 0 0 7 603601 ååç§æ 2016 2016-06-24 0 0 8 002053 äºåçå 2016 2016-06-24 0 0 9 300292 å´éæ§è¡ 2016 2016-06-23 0 0 10 300201 æµ·ä¼¦å² 2016 2016-06-23 0 0 11 000626 å¦æéå¢ 2016 2016-06-22 0 0 12 002402 åèæ³° 2016 2016-06-20 0 0 13 002256 彩è¹ç²¾å 2016 2016-06-20 0 0 14 300428 åéæ°æ 2016 2016-06-14 0 0 15 002610 ç±åº·ç§æ 2016 2016-04-22 0 0 16 600299 å®è¿ªè 2016 2016-04-16 0 0

    opened by firstsko 7
  • fix(sec): upgrade requests to 2.20

    fix(sec): upgrade requests to 2.20

    What happened?

    There are 1 security vulnerabilities found in requests 2.0.0

    What did I do?

    Upgrade requests from 2.0.0 to 2.20 for vulnerability fix

    What did you expect to happen?

    Ideally, no insecure libs should be used.

    The specification of the pull request

    PR Specification from OSCS

    opened by chncaption 0
  • 远程连接不上了

    远程连接不上了

    MaxRetryError: HTTPConnectionPool(host='api.waditu.com', port=80): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f8e76efa550>: Failed to establish a new connection: [Errno -2] Name or service not known',))

    During handling of the above exception, another exception occurred:

    ID:260842

    opened by luyifanlu 1
  • 基础数据_股票列表_接口有 bug

    基础数据_股票列表_接口有 bug

    data = pro.stock_basic(exchange='SSE', list_status='D', fields='ts_code,symbol,name,area,industry,fullname,enname,market,list_status,list_date,delist_date,is_hs')

    获取上交所已退市股票,找到最后一只股票,

    print(data.iloc[-1])

    结果显示:

    ts_code T00018.SH symbol T00018 name 上港集箱(退) area None industry None fullname 上海港集装箱股份有限公司 enname Shanghai Port Container Co., Ltd. market None list_status D list_date 20000719 delist_date 20061020 is_hs N Name: 89, dtype: object

    股票代码 T00018.SH 错了, 应该是 600018.SH, 且该股票已经重新上市。

    我的 TushareID: 438046

    希望 bug 能早日修复,并给我一些积分,感谢。

    opened by 1051135268 0
  • 002940.SZ昂利康11月14日之前的股价数据有错误

    002940.SZ昂利康11月14日之前的股价数据有错误

    data = pro.daily(ts_code='002940.SZ', start_date=20221110, end_date=20221120, fields='ts_code, trade_date, low, close') 调取结果: ts_code trade_date low close 0 002940.SZ 20221118 33.16 33.69 1 002940.SZ 20221117 31.23 33.45 2 002940.SZ 20221116 30.79 31.56 3 002940.SZ 20221115 30.03 31.50 4 002940.SZ 20221114 44.10 45.00 5 002940.SZ 20221111 44.38 44.90 6 002940.SZ 20221110 44.58 44.85

    它的股价最近一直在40以下,不可能出现上面的low和close值。

    tushare ID:551568 核实后求反积分

    截屏2022-11-21 01 06 21 截屏2022-11-21 01 06 01
    opened by huanglele6983 0
  • Points spending mechanism

    Points spending mechanism

    Hi! I'm new here and I do not know chinese language, I use google translate to read tushare.pro. Please, help me understand, are we spending points every time we making request?

    For example, I made a donation and have 5000 points. It says, that I need 5000 points. Will I spend this amount of points when making request?

    opened by al33m501 2
  • new

    new

    My name is Luis, I'm a big-data machine-learning developer, I'm a fan of your work, and I usually check your updates.

    I was afraid that my savings would be eaten by inflation. I have created a powerful tool that based on past technical patterns (volatility, moving averages, statistics, trends, candlesticks, support and resistance, stock index indicators). All the ones you know (RSI, MACD, STOCH, Bolinger Bands, SMA, DEMARK, Japanese candlesticks, ichimoku, fibonacci, williansR, balance of power, murrey math, etc) and more than 200 others.

    The tool creates prediction models of correct trading points (buy signal and sell signal, every stock is good traded in time and direction). For this I have used big data tools like pandas python, stock market libraries like: tablib, TAcharts ,pandas_ta... For data collection and calculation. And powerful machine-learning libraries such as: Sklearn.RandomForest , Sklearn.GradientBoosting, XGBoost, Google TensorFlow and Google TensorFlow LSTM.

    With the models trained with the selection of the best technical indicators, the tool is able to predict trading points (where to buy, where to sell) and send real-time alerts to Telegram or Mail. The points are calculated based on the learning of the correct trading points of the last 2 years (including the change to bear market after the rate hike).

    I think it could be useful to you, to improve, I would like to share it with you, and if you are interested in improving and collaborating I am also willing, and if not file it in the box.

    If tou want, Please read the readme , and in case of any problem you can contact me , If you are convinced try to install it with the documentation. https://github.com/Leci37/LecTrade/tree/develop I appreciate the feedback

    opened by Leci37 0
Releases(0.2.0)
  • 0.2.0(Mar 23, 2015)

    功能主要涵盖了行情数据、财务数据、股票分类数据、宏观经济数据,部分新闻事件数据等,并提供数据存储的方式方法。

    Source code(tar.gz)
    Source code(zip)
Owner
挖地兔
挖掘数据的兔子——小时候有次上山砍材,远处看见一只兔子刨土挖胡萝卜,几经努力终于吃到了想要的。
挖地兔
Morpy Bot Linux - Morpy Bot Linux With Python

Morpy_Bot_Linux Guide to using the robot : 🔸 Lsmod = to identify admins and st

2 Jan 20, 2022
Spore API wrapper written in Python

A wrapper for the Spore API that simplifies and complements its functionality

1 Nov 25, 2021
Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters.

Instagram_bot (필자를 포함한) 모든 대한민국 훈련병들을 위한 인스타그램 인편지기입니다. Instagram bot for promoting ROKA trainee soldier(just like me)'s consolation letters. 들어가기 (Ge

Lee, Jongjun 2 Nov 21, 2021
Running Performance Calculator

Running Performance Calculator 👉 Have you ever wondered if you ran 10km at 2000

Davide Liu 6 Oct 26, 2022
A telegram bot written in Python to fetch random SFW & NSFW anime images

Tsuzumi A telegram bot written in python to fetch both random SFW & NSFW Anime images using nekos.life & waifu.pics API Commands SFW Commands : /

Nisarga Adhikary 3 Oct 12, 2022
My attempt at weaponizing Discord.

MayorbotC2 This is my Discord C2 bot. There are many like it, but this one is mine. MayorbotC2 is a project I absolutely forgot about until I was pilf

Joe Helle 19 May 16, 2022
A customizable, multilanguage Telegram shop bot with Telegram Payments support

Greed A customizable, multilanguage Telegram shop bot with Telegram Payments support! Demo Send a message to @greedtestbot on Telegram to view a demo

Stefano Pigozzi 328 Dec 29, 2022
A wrapper to stream information from Twitter's Full-Archive Search Endpoint

A wrapper to stream information from Twitter's Full-Archive Search Endpoint. To exploit this library, one must have approved academic research access.

Daniela Pinto Veizaga 9 Nov 28, 2022
dex.guru python sdk

dexguru-sdk.py dexguru-sdk.py allows you to access dex.guru public methods from your async python scripts. Installation To install latest version, jus

DexGuru 17 Dec 06, 2022
Discord Bot Personnal Server - Ha-Neul

Haneul Bot, it's a discord for help me on my personnal discord, she do a lot of boring and repetitive stain. You can use on your own server if you want, you just need to find a host for the programm

Maxvyr 1 Feb 03, 2022
微信支付接口V3版python库

wechatpayv3 介绍 微信支付接口V3版python库。 适用对象 wechatpayv3支持微信支付直连商户,接口说明详见 官网。 特性 平台证书自动更新,无需开发者关注平台证书有效性,无需手动下载更新; 支持本地缓存平台证书,初始化时指定平台证书保存目录即可。 适配进度 微信支付V3版A

chen gang 258 Jan 06, 2023
DEPRECATED - Official Python Client for the Discogs API

⚠️ DEPRECATED This repository is no longer maintained. You can still use a REST client like Requests or other third-party Python library to access the

Discogs 483 Dec 31, 2022
This is a very easy to use tool developed in python that will search for free courses from multiple sites including youtube and enroll in the ones in which it can.

Free-Course-Hunter-and-Enroller This is a very easy to use tool developed in python that will search for free courses from multiple sites including yo

Zain 12 Nov 12, 2022
rewise is an unofficial wrapper for google search's auto-complete feature

rewise is an unofficial wrapper for google search's auto-complete feature

Somdev Sangwan 71 Jul 19, 2022
ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord.

ImaginaryTicketing ImaginaryTicketing is a simple ticketing system for running CTF Competitions on discord. Be sure to checkout ImaginaryCTF. See docs

GudOreos 8 Jul 18, 2022
An API that allows you to get full information about TikTok videos

TikTok-API An API that allows you to get full information about TikTok videos without using any third party sources and only the TikTok API. ##API onl

FC 13 Dec 20, 2021
The elegance of Airflow + the power of AWS

Orkestra The elegance of Airflow + the power of AWS

Stephan Fitzpatrick 42 Nov 01, 2022
How to make a QR Code of your own in python

QR CODE Bilgilendirme! " pip install qrcode pillow " kurmalısınız.

Aktali 1 Dec 24, 2021
A telegram bot that messages you available vaccine appointments in the Veneto region

Serenissimo, domande frequenti Chi sei? Sono Alberto Granzotto, libero professionista a Berlino. Mi occupo di servizi software, privacy, decentralizza

vrde 31 Sep 30, 2022
Powerful and Async API for AnimeWorld.tv 🚀

Powerful and Async API for AnimeWorld.tv 🚀

1 Nov 13, 2021