Good evening to all, I want to get details of previous execution details in my app and I have the following error:
"""
Exception in thread Thread-8:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\ProgramData\Anaconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\client.py", line 239, in run
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\decoder.py", line 1278, in interpret
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\decoder.py", line 1259, in interpretWithSignature
TypeError: 'bool' object is not callable
"""
I use the following code:
"""
@iswrapper
def execDetails(self, reqId: int, contract, execution):
super().execDetails(reqId, contract, execution)
print("ExecDetails. ", reqId, contract.symbol, contract.secType, \
contract.currency, execution.execId, execution.orderId, \
execution.shares, execution.lastLiquidity)
@iswrapper
def commissionReport(self, commissionReport):
super().commissionReport(commissionReport)
print("CommissionReport. ", commissionReport.execId, \
commissionReport.commission, commissionReport.currency, \
commissionReport.realizedPNL)
self.reqExecutions(0,taf.executionFilter(0,self.account,time_,\
contract))
"""
where "taf.executionFilter(0,self.account,time_,contract)" is:
"""
def executionFilter(clientId,account,time_,contract):
execFilter = ExecutionFilter()
execFilter.clientId = 0
execFilter.acctCode = "D..."
execFilter.time = time_ #String as per requested by IB
execFilter.symbol = "EUR"
execFilter.secType = "CASH"
execFilter.exchange = "IDEALPRO"
return execFilter
"""
I don't know what I am doing wrong. Could someone explain to me how to assign properly the execution filter? I think I use correctly the ExecutionFilter but I don't know why I get that error, please help!
Thanks
"""
Exception in thread Thread-8:
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "C:\ProgramData\Anaconda3\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\client.py", line 239, in run
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\decoder.py", line 1278, in interpret
File "C:\ProgramData\Anaconda3\lib\site-packages\ibapi-9.76.1-py3.8.egg\ibapi\decoder.py", line 1259, in interpretWithSignature
TypeError: 'bool' object is not callable
"""
I use the following code:
"""
@iswrapper
def execDetails(self, reqId: int, contract, execution):
super().execDetails(reqId, contract, execution)
print("ExecDetails. ", reqId, contract.symbol, contract.secType, \
contract.currency, execution.execId, execution.orderId, \
execution.shares, execution.lastLiquidity)
@iswrapper
def commissionReport(self, commissionReport):
super().commissionReport(commissionReport)
print("CommissionReport. ", commissionReport.execId, \
commissionReport.commission, commissionReport.currency, \
commissionReport.realizedPNL)
self.reqExecutions(0,taf.executionFilter(0,self.account,time_,\
contract))
"""
where "taf.executionFilter(0,self.account,time_,contract)" is:
"""
def executionFilter(clientId,account,time_,contract):
execFilter = ExecutionFilter()
execFilter.clientId = 0
execFilter.acctCode = "D..."
execFilter.time = time_ #String as per requested by IB
execFilter.symbol = "EUR"
execFilter.secType = "CASH"
execFilter.exchange = "IDEALPRO"
return execFilter
"""
I don't know what I am doing wrong. Could someone explain to me how to assign properly the execution filter? I think I use correctly the ExecutionFilter but I don't know why I get that error, please help!
Thanks