From 0f31dfb6573fba32f1159ccbe7e57cf55cb9b734 Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Tue, 3 Dec 2024 12:30:39 -0500 Subject: [PATCH] Handle this failure gracefully I completely misunderstood the code in the previous attempt and messed this up (in #524 and #525). --- thetagang/portfolio_manager.py | 1 + 1 file changed, 1 insertion(+) diff --git a/thetagang/portfolio_manager.py b/thetagang/portfolio_manager.py index c3dc07179..1a5234895 100644 --- a/thetagang/portfolio_manager.py +++ b/thetagang/portfolio_manager.py @@ -1301,6 +1301,7 @@ async def row_position_task(position: PortfolioItem) -> None: position.contract.exchange = self.get_order_exchange() buy_ticker = await self.ibkr.get_ticker_for_contract( position.contract, + required_fields=[], optional_fields=[TickerField.MIDPOINT, TickerField.MARKET_PRICE], )