[Mod]修改JaqsService的委托查询

This commit is contained in:
vn.py 2017-10-31 17:35:30 +08:00
parent 52f84ec6d8
commit fbc29c6b5a
2 changed files with 11 additions and 1 deletions

View File

@ -192,7 +192,7 @@ class JsEngine(object):
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def onQueryOrder(self, clientId, req): def onQueryOrder(self, clientId, req):
"""查询委托""" """查询委托"""
l = self.mainEngine.getAllWorkingOrders() l = self.mainEngine.getAllOrders()
result = defaultdict(list) result = defaultdict(list)
for order in l: for order in l:

View File

@ -282,6 +282,11 @@ class MainEngine(object):
"""查询所有的活跃的委托(返回列表)""" """查询所有的活跃的委托(返回列表)"""
return self.dataEngine.getAllWorkingOrders() return self.dataEngine.getAllWorkingOrders()
#----------------------------------------------------------------------
def getAllOrders(self):
"""查询所有委托"""
return self.dataEngine.getAllOrders()
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def getAllPositionDetails(self): def getAllPositionDetails(self):
"""查询本地持仓缓存细节""" """查询本地持仓缓存细节"""
@ -469,6 +474,11 @@ class DataEngine(object):
"""查询所有活动委托(返回列表)""" """查询所有活动委托(返回列表)"""
return self.workingOrderDict.values() return self.workingOrderDict.values()
#----------------------------------------------------------------------
def getAllOrders(self):
"""获取所有委托"""
return self.orderDict.values()
#---------------------------------------------------------------------- #----------------------------------------------------------------------
def getPositionDetail(self, vtSymbol): def getPositionDetail(self, vtSymbol):
"""查询持仓细节""" """查询持仓细节"""