添加IB接口的委托号返回
This commit is contained in:
parent
6386cd27d4
commit
30114fab76
@ -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)
|
||||
|
@ -250,6 +250,10 @@ class IbGateway(VtGateway):
|
||||
|
||||
# 查询下一个有效编号
|
||||
self.connection.reqIds(1)
|
||||
|
||||
# 返回委托编号
|
||||
vtOrderID = '.'.join([self.gatewayName, str(self.orderId)])
|
||||
return vtOrderID
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
def cancelOrder(self, cancelOrderReq):
|
||||
|
Loading…
Reference in New Issue
Block a user