waditu / tushare

TuShare is a utility for crawling historical data of China stocks
BSD 3-Clause "New" or "Revised" License
12.88k stars 4.29k forks source link

BUG: ts.pro_bar接口调取换手率,量比时报错。 #919

Closed daihuangliang closed 5 years ago

daihuangliang commented 5 years ago

报错为:pro_bar() got an unexpected keyword argument 'factors'

积分:https://tushare.pro/register?reg=123530

liyanglzu commented 5 years ago

报错为:pro_bar() got an unexpected keyword argument 'factors'

积分:https://tushare.pro/register?reg=123530

在三分钟前才调用了,没有问题。贴上调用代码可能会发些问题在哪里

daihuangliang commented 5 years ago

import tushare as ts ts.set_token('***')

pro = ts.pro_api()

df = ts.pro_bar( ts_code='000001.SZ', start_date='20180101', end_date='20181011', factors=['tor', 'vr'])

liyanglzu commented 5 years ago

df = ts.pro_bar( ts_code='000001.SZ', start_date='20180101', end_date='20181011', factors=['tor', 'vr'],pro_api=pro) 不好意思,修改了一点点,你试一下这个能运行成功吗?

jimmysoa commented 5 years ago

@liyanglzu 谢谢帮忙解答

daihuangliang commented 5 years ago

试了还是不成功

liyanglzu commented 5 years ago

试了还是不成功

推荐这样调用: pro = ts.pro_api(your_token) df = ts.pro_bar( ts_code='000001.SZ', start_date='20180101', end_date='20181011', factors=['tor', 'vr'],pro_api=pro)

daihuangliang commented 5 years ago

pro = ts.pro_api('my_token') df = ts.pro_bar( ts_code='000001.SZ', start_date='20180101', end_date='20181011', factors=['tor', 'vr'],pro_api=pro) Traceback (most recent call last):

File "", line 4, in df = ts.pro_bar( ts_code='000001.SZ', start_date='20180101', end_date='20181011', factors=['tor', 'vr'],pro_api=pro)

TypeError: pro_bar() got an unexpected keyword argument 'factors'