[Mod]调整DataService相关Demo的目录结构

This commit is contained in:
vn.py 2018-10-12 14:45:18 +08:00
parent 051f00f051
commit bd6447a708
24 changed files with 16 additions and 12 deletions

View File

@ -31,10 +31,11 @@ headers = {'X-CoinAPI-Key': APIKEY}
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def generateVtBar(symbol, d): def generateVtBar(symbol, d):
"""生成K线""" """生成K线"""
l = symbol.split('_')
bar = VtBarData() bar = VtBarData()
bar.symbol = l[-2] + l[-1]
bar.symbol = symbol bar.exchange = l[0]
bar.vtSymbol = symbol bar.vtSymbol = '/'.join([bar.symbol, bar.exchange])
bar.datetime = datetime.datetime.strptime(d['time_open'], '%Y-%m-%dT%H:%M:%S.%f0Z') bar.datetime = datetime.datetime.strptime(d['time_open'], '%Y-%m-%dT%H:%M:%S.%f0Z')
bar.date = bar.datetime.strftime('%Y%m%d') bar.date = bar.datetime.strftime('%Y%m%d')
bar.time = bar.datetime.strftime('%H:%M:%S') bar.time = bar.datetime.strftime('%H:%M:%S')

View File

@ -0,0 +1,11 @@
# DataService说明
* ShcifcoDataService上海中期历史行情服务期货
* TqDataService天勤历史行情服务期货
* TushareDataServiceTuShare历史行情服务A股
* FutuDataService富途证券历史行情服务美股、港股
* CoinapiDataServiceCoinAPI.io历史行情服务数字货币

View File

@ -20,12 +20,4 @@
* ServerClient服务端业务逻辑和客户端GUI界面分离的VnTrader * ServerClient服务端业务逻辑和客户端GUI界面分离的VnTrader
* ShcifcoDataService上海中期历史行情服务期货 * DataService用于下载历史行情数据以及每日数据自动更新的数据服务
* TqDataService天勤历史行情服务期货
* TushareDataServiceTuShare历史行情服务A股
* FutuDataService富途证券历史行情服务美股、港股
* CoinapiDataServiceCoinAPI.io历史行情服务数字货币