Merge branch 'dev' of https://github.com/vnpy/vnpy into dev
This commit is contained in:
commit
68c9c09ac3
1
.gitignore
vendored
1
.gitignore
vendored
@ -58,6 +58,7 @@ build/Makefile
|
||||
.python-version
|
||||
.gitignore
|
||||
temp/
|
||||
.venv
|
||||
|
||||
# setup.py install 临时文件
|
||||
dist
|
||||
|
@ -30,7 +30,7 @@ class Promise(object):
|
||||
raise res[1]
|
||||
else:
|
||||
et, ev, tb = res[1]
|
||||
raise et, ev, tb
|
||||
raise et(ev).with_traceback(tb)
|
||||
|
||||
def set_exception(self, valueOrType, val=None, tb=None):
|
||||
if val is None:
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import logging
|
||||
import os
|
||||
import json
|
||||
import hashlib
|
||||
@ -469,7 +470,7 @@ class BitmexWebsocketApi(WebsocketClient):
|
||||
e.errorMsg = exceptionValue
|
||||
self.gateway.onError(e)
|
||||
|
||||
traceback.print_exc()
|
||||
sys.stderr.write(self.exceptionDetail(exceptionType, exceptionValue, tb))
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
def writeLog(self, content):
|
||||
@ -573,8 +574,9 @@ class BitmexWebsocketApi(WebsocketClient):
|
||||
trade.tradeID = tradeID
|
||||
trade.vtTradeID = '.'.join([trade.gatewayName, trade.tradeID])
|
||||
|
||||
if 'side' not in d:
|
||||
print('no side : \n', d)
|
||||
# bug check:
|
||||
if d['side'] not in directionMapReverse:
|
||||
logging.debug('trade wthout side : %s', d)
|
||||
return
|
||||
|
||||
trade.direction = directionMapReverse[d['side']]
|
||||
|
@ -413,7 +413,7 @@ class DataEngine(object):
|
||||
self.workingOrderDict = {} # 可撤销委托
|
||||
self.tradeDict = {}
|
||||
self.accountDict = {}
|
||||
self.positionDict= {}
|
||||
self.positionDict = {}
|
||||
self.logList = []
|
||||
self.errorList = []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user