修复风控的bug
This commit is contained in:
parent
9ecf06761f
commit
b7c060e226
@ -141,6 +141,10 @@ class MainEngine(object):
|
||||
#----------------------------------------------------------------------
|
||||
def sendOrder(self, orderReq, gatewayName):
|
||||
"""对特定接口发单"""
|
||||
# 如果风控检查失败则不发单
|
||||
if not self.rmEngine.checkRisk(orderReq):
|
||||
return ''
|
||||
|
||||
if gatewayName in self.gatewayDict:
|
||||
gateway = self.gatewayDict[gatewayName]
|
||||
return gateway.sendOrder(orderReq)
|
||||
@ -150,10 +154,6 @@ class MainEngine(object):
|
||||
#----------------------------------------------------------------------
|
||||
def cancelOrder(self, cancelOrderReq, gatewayName):
|
||||
"""对特定接口撤单"""
|
||||
# 如果风控检查失败则不发单
|
||||
if not self.rmEngine.checkRisk(orderReq):
|
||||
return ''
|
||||
|
||||
if gatewayName in self.gatewayDict:
|
||||
gateway = self.gatewayDict[gatewayName]
|
||||
gateway.cancelOrder(cancelOrderReq)
|
||||
|
Loading…
Reference in New Issue
Block a user