diff --git a/vnpy/trader/app/jaqsService/jsEngine.py b/vnpy/trader/app/jaqsService/jsEngine.py index cc96b446..d1463e78 100644 --- a/vnpy/trader/app/jaqsService/jsEngine.py +++ b/vnpy/trader/app/jaqsService/jsEngine.py @@ -192,7 +192,7 @@ class JsEngine(object): #---------------------------------------------------------------------- def onQueryOrder(self, clientId, req): """查询委托""" - l = self.mainEngine.getAllWorkingOrders() + l = self.mainEngine.getAllOrders() result = defaultdict(list) for order in l: diff --git a/vnpy/trader/vtEngine.py b/vnpy/trader/vtEngine.py index abe47a73..1aec3a7f 100644 --- a/vnpy/trader/vtEngine.py +++ b/vnpy/trader/vtEngine.py @@ -282,6 +282,11 @@ class MainEngine(object): """查询所有的活跃的委托(返回列表)""" return self.dataEngine.getAllWorkingOrders() + #---------------------------------------------------------------------- + def getAllOrders(self): + """查询所有委托""" + return self.dataEngine.getAllOrders() + #---------------------------------------------------------------------- def getAllPositionDetails(self): """查询本地持仓缓存细节""" @@ -469,6 +474,11 @@ class DataEngine(object): """查询所有活动委托(返回列表)""" return self.workingOrderDict.values() + #---------------------------------------------------------------------- + def getAllOrders(self): + """获取所有委托""" + return self.orderDict.values() + #---------------------------------------------------------------------- def getPositionDetail(self, vtSymbol): """查询持仓细节"""