How do i interpret this API response
<position account=DU226955, contract=<ib.ext.Contract.Contract object at 0x10be14650>, pos=3000, avgCost=0.903681278811>
<positionEnd>
everything is correct but how do i get the contract name out of this?
How do i interpret this API response
<position account=DU226955, contract=<ib.ext.Contract.Contract object at 0x10be14650>, pos=3000, avgCost=0.903681278811>
<positionEnd>
everything is correct but how do i get the contract name out of this?
To get the contract symbol (for example) from the message that IbPy returns to your handler, you can do this:
def handler(msg):
print(msg.contract.m_symbol)