From 82babff9d91e36551fca5b061784e83276ce5a37 Mon Sep 17 00:00:00 2001 From: justinpolygon <123573436+justinpolygon@users.noreply.github.com> Date: Mon, 6 Oct 2025 11:42:26 -0700 Subject: [PATCH] Add individual futures exchange endpoints (CME, CBOT, NYMEX, COMEX) --- polygon/websocket/models/__init__.py | 24 ++++++++++++++++++++++++ polygon/websocket/models/common.py | 6 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/polygon/websocket/models/__init__.py b/polygon/websocket/models/__init__.py index 20c02ce1..629aca87 100644 --- a/polygon/websocket/models/__init__.py +++ b/polygon/websocket/models/__init__.py @@ -42,6 +42,30 @@ def from_dict(cls, data: Dict[str, Any]) -> "FromDictProtocol": "T": FuturesTrade, "Q": FuturesQuote, }, + Market.FuturesCME: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesCBOT: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesNYMEX: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, + Market.FuturesCOMEX: { + "A": FuturesAgg, + "AM": FuturesAgg, + "T": FuturesTrade, + "Q": FuturesQuote, + }, Market.Crypto: { "XA": CurrencyAgg, "XAS": CurrencyAgg, diff --git a/polygon/websocket/models/common.py b/polygon/websocket/models/common.py index 261f664b..bf8d18d6 100644 --- a/polygon/websocket/models/common.py +++ b/polygon/websocket/models/common.py @@ -28,7 +28,11 @@ class Market(Enum): Forex = "forex" Crypto = "crypto" Indices = "indices" - Futures = "futures" + Futures = "futures" # CME, CBOT, NYMEX, and COMEX + FuturesCME = "futures/cme" + FuturesCBOT = "futures/cbot" + FuturesNYMEX = "futures/nymex" + FuturesCOMEX = "futures/comex" class EventType(Enum):