增加风控引擎对数量为0委托的检查

This commit is contained in:
vn.py 2017-08-30 21:07:38 +08:00
parent a8c0ff957c
commit 61dfdeea38

View File

@ -166,6 +166,10 @@ class RmEngine(object):
return True
# 检查委托数量
if orderReq.volume <= 0:
self.writeRiskLog(u'委托数量必须大于0')
return False
if orderReq.volume > self.orderSizeLimit:
self.writeRiskLog(u'单笔委托数量%s,超过限制%s'
%(orderReq.volume, self.orderSizeLimit))