添加IB接口的委托号返回

This commit is contained in:
chenxy123 2016-05-14 17:15:42 +08:00
parent 6386cd27d4
commit 30114fab76
2 changed files with 11 additions and 7 deletions

View File

@ -119,26 +119,26 @@ class DrEngineManager(QtGui.QWidget):
def updateSetting(self):
"""显示引擎行情记录配置"""
with open(self.drEngine.settingFileName) as f:
setting = json.load(f)
drSetting = json.load(f)
if 'tick' in setting:
l = setting['tick']
if 'tick' in drSetting:
l = drSetting['tick']
for setting in l:
self.tickTable.insertRow(0)
self.tickTable.setItem(0, 0, TableCell(setting[0]))
self.tickTable.setItem(0, 1, TableCell(setting[1]))
if 'bar' in setting:
l = setting['bar']
if 'bar' in drSetting:
l = drSetting['bar']
for setting in l:
self.barTable.insertRow(0)
self.barTable.setItem(0, 0, TableCell(setting[0]))
self.barTable.setItem(0, 1, TableCell(setting[1]))
if 'active' in setting:
d = setting['active']
if 'active' in drSetting:
d = drSetting['active']
for activeSymbol, symbol in d.items():
self.activeTable.insertRow(0)

View File

@ -250,6 +250,10 @@ class IbGateway(VtGateway):
# 查询下一个有效编号
self.connection.reqIds(1)
# 返回委托编号
vtOrderID = '.'.join([self.gatewayName, str(self.orderId)])
return vtOrderID
#----------------------------------------------------------------------
def cancelOrder(self, cancelOrderReq):