Right now I'm placing orders and store the fill price in a dictionary with the following code:

ticket=self.MarketOrder(contract_symbol, -int(factor)) self.fill_price[contract_symbol] = ticket.AverageFillPrice

But as I my algorithm keeps getting stopped as it's getting bugs, I can't let it start ordering because I can't access the fill price of the options which are in my portfolio already like this when I have to redeploy. Is there another way to access the fill price? Then it would only be half as bad if it gets stopped.

Kind regards,

Christian