Skip to content

Commit 6354d94

Browse files
author
Jack Culhane
committed
ADD: Add publisher enums for Cboe Futures Exchange
1 parent 4069cdc commit 6354d94

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Changed the return value of `Live.subscribe()` to `int`, the value of the subscription ID, which can be used to index into the `Live.subscription_requests` property
88
- Added feature to automatically monitor for hung connections in the `Live` client
99
- Hung connections will be disconnected client side with a `BentoError`
10+
- Added new venue, dataset, and publisher for Cboe Futures Exchange (`XCBF.PITCH`)
1011

1112
#### Breaking changes
1213
- Several log messages have been reformatted to improve clarity and reduce redundancy, especially at debug levels

databento/common/publishers.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ class Venue(StringyMixin, str, Enum):
118118
Eurex Exchange.
119119
XEEE
120120
European Energy Exchange.
121+
XCBF
122+
Cboe Futures Exchange.
121123
122124
"""
123125

@@ -172,6 +174,7 @@ class Venue(StringyMixin, str, Enum):
172174
IFLL = "IFLL"
173175
XEUR = "XEUR"
174176
XEEE = "XEEE"
177+
XCBF = "XCBF"
175178

176179
@classmethod
177180
def from_int(cls, value: int) -> Venue:
@@ -280,6 +283,8 @@ def from_int(cls, value: int) -> Venue:
280283
return Venue.XEUR
281284
if value == 51:
282285
return Venue.XEEE
286+
if value == 52:
287+
return Venue.XCBF
283288
raise ValueError(f"Integer value {value} does not correspond with any Venue variant")
284289

285290
def to_int(self) -> int:
@@ -388,6 +393,8 @@ def to_int(self) -> int:
388393
return 50
389394
if self == Venue.XEEE:
390395
return 51
396+
if self == Venue.XCBF:
397+
return 52
391398
raise ValueError("Invalid Venue")
392399

393400
@property
@@ -497,6 +504,8 @@ def description(self) -> str:
497504
return "Eurex Exchange"
498505
if self == Venue.XEEE:
499506
return "European Energy Exchange"
507+
if self == Venue.XCBF:
508+
return "Cboe Futures Exchange"
500509
raise ValueError("Unexpected Venue value")
501510

502511

@@ -584,6 +593,8 @@ class Dataset(StringyMixin, str, Enum):
584593
Eurex EOBI.
585594
XEEE_EOBI
586595
European Energy Exchange EOBI.
596+
XCBF_PITCH
597+
Cboe Futures Exchange PITCH.
587598
588599
"""
589600

@@ -626,6 +637,7 @@ class Dataset(StringyMixin, str, Enum):
626637
IFLL_IMPACT = "IFLL.IMPACT"
627638
XEUR_EOBI = "XEUR.EOBI"
628639
XEEE_EOBI = "XEEE.EOBI"
640+
XCBF_PITCH = "XCBF.PITCH"
629641

630642
@classmethod
631643
def from_int(cls, value: int) -> Dataset:
@@ -710,6 +722,8 @@ def from_int(cls, value: int) -> Dataset:
710722
return Dataset.XEUR_EOBI
711723
if value == 39:
712724
return Dataset.XEEE_EOBI
725+
if value == 40:
726+
return Dataset.XCBF_PITCH
713727
raise ValueError(f"Integer value {value} does not correspond with any Dataset variant")
714728

715729
def to_int(self) -> int:
@@ -794,6 +808,8 @@ def to_int(self) -> int:
794808
return 38
795809
if self == Dataset.XEEE_EOBI:
796810
return 39
811+
if self == Dataset.XCBF_PITCH:
812+
return 40
797813
raise ValueError("Invalid Dataset")
798814

799815
@property
@@ -879,6 +895,8 @@ def description(self) -> str:
879895
return "Eurex EOBI"
880896
if self == Dataset.XEEE_EOBI:
881897
return "European Energy Exchange EOBI"
898+
if self == Dataset.XCBF_PITCH:
899+
return "Cboe Futures Exchange PITCH"
882900
raise ValueError("Unexpected Dataset value")
883901

884902

@@ -1096,6 +1114,8 @@ class Publisher(StringyMixin, str, Enum):
10961114
Eurex EOBI - Off-Market Trades.
10971115
XEEE_EOBI_XOFF
10981116
European Energy Exchange EOBI - Off-Market Trades.
1117+
XCBF_PITCH_XCBF
1118+
Cboe Futures Exchange.
10991119
11001120
"""
11011121

@@ -1203,6 +1223,7 @@ class Publisher(StringyMixin, str, Enum):
12031223
XEEE_EOBI_XEEE = "XEEE.EOBI.XEEE"
12041224
XEUR_EOBI_XOFF = "XEUR.EOBI.XOFF"
12051225
XEEE_EOBI_XOFF = "XEEE.EOBI.XOFF"
1226+
XCBF_PITCH_XCBF = "XCBF.PITCH.XCBF"
12061227

12071228
@classmethod
12081229
def from_int(cls, value: int) -> Publisher:
@@ -1417,6 +1438,8 @@ def from_int(cls, value: int) -> Publisher:
14171438
return Publisher.XEUR_EOBI_XOFF
14181439
if value == 104:
14191440
return Publisher.XEEE_EOBI_XOFF
1441+
if value == 105:
1442+
return Publisher.XCBF_PITCH_XCBF
14201443
raise ValueError(f"Integer value {value} does not correspond with any Publisher variant")
14211444

14221445
def to_int(self) -> int:
@@ -1631,6 +1654,8 @@ def to_int(self) -> int:
16311654
return 103
16321655
if self == Publisher.XEEE_EOBI_XOFF:
16331656
return 104
1657+
if self == Publisher.XCBF_PITCH_XCBF:
1658+
return 105
16341659
raise ValueError("Invalid Publisher")
16351660

16361661
@property
@@ -1846,6 +1871,8 @@ def venue(self) -> Venue:
18461871
return Venue.XOFF
18471872
if self == Publisher.XEEE_EOBI_XOFF:
18481873
return Venue.XOFF
1874+
if self == Publisher.XCBF_PITCH_XCBF:
1875+
return Venue.XCBF
18491876
raise ValueError("Unexpected Publisher value")
18501877

18511878
@property
@@ -2061,6 +2088,8 @@ def dataset(self) -> Dataset:
20612088
return Dataset.XEUR_EOBI
20622089
if self == Publisher.XEEE_EOBI_XOFF:
20632090
return Dataset.XEEE_EOBI
2091+
if self == Publisher.XCBF_PITCH_XCBF:
2092+
return Dataset.XCBF_PITCH
20642093
raise ValueError("Unexpected Publisher value")
20652094

20662095
@property
@@ -2276,4 +2305,6 @@ def description(self) -> str:
22762305
return "Eurex EOBI - Off-Market Trades"
22772306
if self == Publisher.XEEE_EOBI_XOFF:
22782307
return "European Energy Exchange EOBI - Off-Market Trades"
2308+
if self == Publisher.XCBF_PITCH_XCBF:
2309+
return "Cboe Futures Exchange"
22792310
raise ValueError("Unexpected Publisher value")

0 commit comments

Comments
 (0)