Skip to content

Commit 9954f73

Browse files
author
Zach Banks
committed
ADD: Add XCIS.BBOTRADES and XNYS.BBOTRADES enums
1 parent 3e75354 commit 9954f73

File tree

2 files changed

+49
-2
lines changed

2 files changed

+49
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 0.39.3 - TBD
44

5+
#### Enhancements
6+
- Added new publisher values for `XCIS.BBOTRADES` and `XNYS.BBOTRADES`
7+
58
#### Bug fixes
69
- Fixed an issue receiving multiple DBN v1 `ErrorMsg` in the `Live` client would cause an `InvalidState` error
710

databento/common/publishers.py

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,13 @@ class Dataset(StringyMixin, str, Enum):
495495
DBEQ_MAX
496496
Databento Equities Max.
497497
XNAS_BASIC
498-
Nasdaq Basic (NLS+QBBO).
498+
Nasdaq Basic (NLS and QBBO).
499499
DBEQ_SUMMARY
500500
Databento Equities Summary.
501+
XCIS_BBOTRADES
502+
NYSE National BBO and Trades.
503+
XNYS_BBOTRADES
504+
NYSE BBO and Trades.
501505
502506
"""
503507

@@ -533,6 +537,8 @@ class Dataset(StringyMixin, str, Enum):
533537
DBEQ_MAX = "DBEQ.MAX"
534538
XNAS_BASIC = "XNAS.BASIC"
535539
DBEQ_SUMMARY = "DBEQ.SUMMARY"
540+
XCIS_BBOTRADES = "XCIS.BBOTRADES"
541+
XNYS_BBOTRADES = "XNYS.BBOTRADES"
536542

537543
@classmethod
538544
def from_int(cls, value: int) -> Dataset:
@@ -603,6 +609,10 @@ def from_int(cls, value: int) -> Dataset:
603609
return Dataset.XNAS_BASIC
604610
if value == 32:
605611
return Dataset.DBEQ_SUMMARY
612+
if value == 33:
613+
return Dataset.XCIS_BBOTRADES
614+
if value == 34:
615+
return Dataset.XNYS_BBOTRADES
606616
raise ValueError(f"Integer value {value} does not correspond with any Dataset variant")
607617

608618
def to_int(self) -> int:
@@ -673,6 +683,10 @@ def to_int(self) -> int:
673683
return 31
674684
if self == Dataset.DBEQ_SUMMARY:
675685
return 32
686+
if self == Dataset.XCIS_BBOTRADES:
687+
return 33
688+
if self == Dataset.XNYS_BBOTRADES:
689+
return 34
676690
raise ValueError("Invalid Dataset")
677691

678692
@property
@@ -741,9 +755,13 @@ def description(self) -> str:
741755
if self == Dataset.DBEQ_MAX:
742756
return "Databento Equities Max"
743757
if self == Dataset.XNAS_BASIC:
744-
return "Nasdaq Basic (NLS+QBBO)"
758+
return "Nasdaq Basic (NLS and QBBO)"
745759
if self == Dataset.DBEQ_SUMMARY:
746760
return "Databento Equities Summary"
761+
if self == Dataset.XCIS_BBOTRADES:
762+
return "NYSE National BBO and Trades"
763+
if self == Dataset.XNYS_BBOTRADES:
764+
return "NYSE BBO and Trades"
747765
raise ValueError("Unexpected Dataset value")
748766

749767

@@ -933,6 +951,10 @@ class Publisher(StringyMixin, str, Enum):
933951
Nasdaq Basic - Nasdaq PSX.
934952
DBEQ_SUMMARY_DBEQ
935953
Databento Equities Summary.
954+
XCIS_BBOTRADES_XCIS
955+
NYSE National BBO and Trades.
956+
XNYS_BBOTRADES_XNYS
957+
NYSE BBO and Trades.
936958
937959
"""
938960

@@ -1026,6 +1048,8 @@ class Publisher(StringyMixin, str, Enum):
10261048
XNAS_BASIC_XBOS = "XNAS.BASIC.XBOS"
10271049
XNAS_BASIC_XPSX = "XNAS.BASIC.XPSX"
10281050
DBEQ_SUMMARY_DBEQ = "DBEQ.SUMMARY.DBEQ"
1051+
XCIS_BBOTRADES_XCIS = "XCIS.BBOTRADES.XCIS"
1052+
XNYS_BBOTRADES_XNYS = "XNYS.BBOTRADES.XNYS"
10291053

10301054
@classmethod
10311055
def from_int(cls, value: int) -> Publisher:
@@ -1212,6 +1236,10 @@ def from_int(cls, value: int) -> Publisher:
12121236
return Publisher.XNAS_BASIC_XPSX
12131237
if value == 90:
12141238
return Publisher.DBEQ_SUMMARY_DBEQ
1239+
if value == 91:
1240+
return Publisher.XCIS_BBOTRADES_XCIS
1241+
if value == 92:
1242+
return Publisher.XNYS_BBOTRADES_XNYS
12151243
raise ValueError(f"Integer value {value} does not correspond with any Publisher variant")
12161244

12171245
def to_int(self) -> int:
@@ -1398,6 +1426,10 @@ def to_int(self) -> int:
13981426
return 89
13991427
if self == Publisher.DBEQ_SUMMARY_DBEQ:
14001428
return 90
1429+
if self == Publisher.XCIS_BBOTRADES_XCIS:
1430+
return 91
1431+
if self == Publisher.XNYS_BBOTRADES_XNYS:
1432+
return 92
14011433
raise ValueError("Invalid Publisher")
14021434

14031435
@property
@@ -1585,6 +1617,10 @@ def venue(self) -> Venue:
15851617
return Venue.XPSX
15861618
if self == Publisher.DBEQ_SUMMARY_DBEQ:
15871619
return Venue.DBEQ
1620+
if self == Publisher.XCIS_BBOTRADES_XCIS:
1621+
return Venue.XCIS
1622+
if self == Publisher.XNYS_BBOTRADES_XNYS:
1623+
return Venue.XNYS
15881624
raise ValueError("Unexpected Publisher value")
15891625

15901626
@property
@@ -1772,6 +1808,10 @@ def dataset(self) -> Dataset:
17721808
return Dataset.XNAS_BASIC
17731809
if self == Publisher.DBEQ_SUMMARY_DBEQ:
17741810
return Dataset.DBEQ_SUMMARY
1811+
if self == Publisher.XCIS_BBOTRADES_XCIS:
1812+
return Dataset.XCIS_BBOTRADES
1813+
if self == Publisher.XNYS_BBOTRADES_XNYS:
1814+
return Dataset.XNYS_BBOTRADES
17751815
raise ValueError("Unexpected Publisher value")
17761816

17771817
@property
@@ -1959,4 +1999,8 @@ def description(self) -> str:
19591999
return "Nasdaq Basic - Nasdaq PSX"
19602000
if self == Publisher.DBEQ_SUMMARY_DBEQ:
19612001
return "Databento Equities Summary"
2002+
if self == Publisher.XCIS_BBOTRADES_XCIS:
2003+
return "NYSE National BBO and Trades"
2004+
if self == Publisher.XNYS_BBOTRADES_XNYS:
2005+
return "NYSE BBO and Trades"
19622006
raise ValueError("Unexpected Publisher value")

0 commit comments

Comments
 (0)