From c6f86b8fd1dd691e7b4edd5b493564e5e5f441b1 Mon Sep 17 00:00:00 2001 From: moshferatu Date: Fri, 8 Dec 2023 12:38:06 -0800 Subject: [PATCH] Freeze option leg dataclass in order to allow for hashing --- ibkr/option_leg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ibkr/option_leg.py b/ibkr/option_leg.py index 4641cb1..885f986 100644 --- a/ibkr/option_leg.py +++ b/ibkr/option_leg.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from datetime import datetime from typing import Literal -@dataclass +@dataclass(frozen=True) class OptionLeg: symbol: str expiration: datetime