修复ibGateway的成交回报中缺少vtOrderID字段的问题

This commit is contained in:
chenxy123 2016-11-29 22:46:26 +08:00
parent 875b25b59a
commit 17e0a40613

View File

@ -561,6 +561,7 @@ class IbWrapper(IbApi):
trade.vtSymbol = '.'.join([trade.symbol, trade.exchange])
trade.orderID = str(execution.orderId)
trade.vtOrderID = '.'.join([self.gatewayName, trade.orderId])
trade.direction = directionMapReverse.get(execution.side, '')
trade.price = execution.price
trade.volume = execution.shares