[Fix] add filter for duplicate ib contract update
This commit is contained in:
parent
61bf6bb81e
commit
b66e2a9dd2
@ -509,9 +509,9 @@ class IbApi(EWrapper):
|
||||
gateway_name=self.gateway_name,
|
||||
)
|
||||
|
||||
self.gateway.on_contract(contract)
|
||||
|
||||
self.contracts[contract.vt_symbol] = contract
|
||||
if contract.vt_symbol not in self.contracts:
|
||||
self.gateway.on_contract(contract)
|
||||
self.contracts[contract.vt_symbol] = contract
|
||||
|
||||
def execDetails(
|
||||
self, reqId: int, contract: Contract, execution: Execution
|
||||
|
Loading…
Reference in New Issue
Block a user