diff --git a/examples/CoinapiDataService/dataService.py b/examples/CoinapiDataService/dataService.py index 50279b75..21e52138 100644 --- a/examples/CoinapiDataService/dataService.py +++ b/examples/CoinapiDataService/dataService.py @@ -51,8 +51,8 @@ def downMinuteBarBySymbol(symbol, period, start, end): """下载某一合约的分钟线数据""" startTime = time.time() - cl = db[symbol] # 集合 - cl.ensure_index([('datetime', ASCENDING)], unique=True) # 添加索引 + cl = db[symbol] + cl.ensure_index([('datetime', ASCENDING)], unique=True) startDt = datetime.datetime.strptime(start, '%Y%m%d') endDt = datetime.datetime.strptime(end, '%Y%m%d') diff --git a/examples/CryptoTrader/run.py b/examples/CryptoTrader/run.py index ab6bdb77..240b8272 100644 --- a/examples/CryptoTrader/run.py +++ b/examples/CryptoTrader/run.py @@ -9,10 +9,6 @@ import sys reload(sys) sys.setdefaultencoding('utf8') -# 判断操作系统 -import platform -system = platform.system() - # vn.trader模块 from vnpy.event import EventEngine from vnpy.trader.vtEngine import MainEngine