From 0fbfe31ccaaac3fa97cf73271e44afe01189b70e Mon Sep 17 00:00:00 2001 From: Frank Butera Date: Thu, 16 Oct 2025 13:53:29 -0500 Subject: [PATCH] Make closing_only_date optional in Future class MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The closing-only-date field is not always present in API responses for certain futures contracts (e.g., /1OZZ5 1oz gold futures). This change makes the field optional to prevent Pydantic validation errors when the field is missing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- tastytrade/instruments.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tastytrade/instruments.py b/tastytrade/instruments.py index ea24dd8..7eb0756 100644 --- a/tastytrade/instruments.py +++ b/tastytrade/instruments.py @@ -869,7 +869,7 @@ class Future(TradeableTastytradeData): display_factor: Decimal last_trade_date: date expiration_date: date - closing_only_date: date + closing_only_date: Optional[date] = None active: bool active_month: bool next_active_month: bool