All,
I can't seem to get my script to pull down the price of an option contract. I have this overload in my class:
''' def tickOptionComputation(self, orderId, tickType, tickAttrib: int, impliedVol: float, delta: float, optPrice: float, pvDividend: float, gamma: float, vega: float, theta: float, undPrice: float):
super().tickOptionComputation(reqId, tickType, tickAttrib, impliedVol, delta, optPrice, pvDividend, gamma, vega, theta, undPrice)
print("TickOptionComputation. TickerId:", reqId, "TickType:", tickType, "TickAttrib:", tickAttrib, "ImpliedVolatility:", impliedVol, "Delta:", delta, "OptionPrice:",
optPrice, "pvDividend:", pvDividend, "Gamma: ", gamma, "Vega:", vega,
"Theta:", theta, "UnderlyingPrice:", undPrice) '''
And in my main loop I call:
'''? under_contract = createUnderlyingContract(ticker)
contract = createOptionContract(ticker, date, strike, right)
self.reqMktData(self.nextorderId, under_contract, '', False, False, [])
self.reqMktData(self.nextorderId, contract, '', False, False, [])
'''
Is there something I'm missing here? I know I need a data subscription but I don't even get the warning message about it. Thank you in advance!