財經數據 http://tushare.org/trading.html#id2html
import tushareimport tushare as tsprint('版本', tushare.__version__)# t = ts.get_hist_data('000001') # 一次性獲取所有日k線數據# ts.get_hist_data('600848', ktype='W') #獲取周k線數據# ts.get_hist_data('600848', ktype='M') #獲取月k線數據# ts.get_hist_data('600848', ktype='5') #獲取5分鐘k線數據# ts.get_hist_data('600848', ktype='15') #獲取15分鐘k線數據# ts.get_hist_data('600848', ktype='30') #獲取30分鐘k線數據# ts.get_hist_data('600848', ktype='60') #獲取60分鐘k線數據# ts.get_hist_data('sh')#獲取上證指數k線數據,其它參數與個股一致,下同# ts.get_hist_data('sz')#獲取深圳成指k線數據# ts.get_hist_data('hs300')#獲取滬深300指數k線數據# ts.get_hist_data('sz50')#獲取上證50指數k線數據# ts.get_hist_data('zxb')#獲取中小板指數k線數據# ts.get_hist_data('cyb')#獲取創業板指數k線數據t = ts.get_hist_data('600848', start='2015-01-05', end='2018-01-09')print(t)