Skip to content

Commit

Permalink
ADD: Dataset for DBEQ summary
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-databento committed Jul 30, 2024
1 parent dd450ef commit 3e9a200
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 0.38.1 - TBD

#### Enhancements
- Added new publisher value for `DBEQ.SUMMARY`

## 0.38.0 - 2024-07-23

This release adds a new feature to the `Live` client for automatically reconnecting when an unexpected disconnection occurs.
Expand Down
22 changes: 22 additions & 0 deletions databento/common/publishers.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ class Dataset(StringyMixin, str, Enum):
Databento Equities Max.
XNAS_BASIC
Nasdaq Basic (NLS+QBBO).
DBEQ_SUMMARY
Databento Equities Summary.
"""

Expand Down Expand Up @@ -530,6 +532,7 @@ class Dataset(StringyMixin, str, Enum):
NDEX_IMPACT = "NDEX.IMPACT"
DBEQ_MAX = "DBEQ.MAX"
XNAS_BASIC = "XNAS.BASIC"
DBEQ_SUMMARY = "DBEQ.SUMMARY"

@classmethod
def from_int(cls, value: int) -> Dataset:
Expand Down Expand Up @@ -598,6 +601,8 @@ def from_int(cls, value: int) -> Dataset:
return Dataset.DBEQ_MAX
if value == 31:
return Dataset.XNAS_BASIC
if value == 32:
return Dataset.DBEQ_SUMMARY
raise ValueError(f"Integer value {value} does not correspond with any Dataset variant")

def to_int(self) -> int:
Expand Down Expand Up @@ -666,6 +671,8 @@ def to_int(self) -> int:
return 30
if self == Dataset.XNAS_BASIC:
return 31
if self == Dataset.DBEQ_SUMMARY:
return 32
raise ValueError("Invalid Dataset")

@property
Expand Down Expand Up @@ -735,6 +742,8 @@ def description(self) -> str:
return "Databento Equities Max"
if self == Dataset.XNAS_BASIC:
return "Nasdaq Basic (NLS+QBBO)"
if self == Dataset.DBEQ_SUMMARY:
return "Databento Equities Summary"
raise ValueError("Unexpected Dataset value")


Expand Down Expand Up @@ -922,6 +931,8 @@ class Publisher(StringyMixin, str, Enum):
Nasdaq Basic - Nasdaq BX.
XNAS_BASIC_XPSX
Nasdaq Basic - Nasdaq PSX.
DBEQ_SUMMARY_DBEQ
Databento Equities Summary.
"""

Expand Down Expand Up @@ -1014,6 +1025,7 @@ class Publisher(StringyMixin, str, Enum):
XNAS_NLS_XPSX = "XNAS.NLS.XPSX"
XNAS_BASIC_XBOS = "XNAS.BASIC.XBOS"
XNAS_BASIC_XPSX = "XNAS.BASIC.XPSX"
DBEQ_SUMMARY_DBEQ = "DBEQ.SUMMARY.DBEQ"

@classmethod
def from_int(cls, value: int) -> Publisher:
Expand Down Expand Up @@ -1198,6 +1210,8 @@ def from_int(cls, value: int) -> Publisher:
return Publisher.XNAS_BASIC_XBOS
if value == 89:
return Publisher.XNAS_BASIC_XPSX
if value == 90:
return Publisher.DBEQ_SUMMARY_DBEQ
raise ValueError(f"Integer value {value} does not correspond with any Publisher variant")

def to_int(self) -> int:
Expand Down Expand Up @@ -1382,6 +1396,8 @@ def to_int(self) -> int:
return 88
if self == Publisher.XNAS_BASIC_XPSX:
return 89
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return 90
raise ValueError("Invalid Publisher")

@property
Expand Down Expand Up @@ -1567,6 +1583,8 @@ def venue(self) -> Venue:
return Venue.XBOS
if self == Publisher.XNAS_BASIC_XPSX:
return Venue.XPSX
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return Venue.DBEQ
raise ValueError("Unexpected Publisher value")

@property
Expand Down Expand Up @@ -1752,6 +1770,8 @@ def dataset(self) -> Dataset:
return Dataset.XNAS_BASIC
if self == Publisher.XNAS_BASIC_XPSX:
return Dataset.XNAS_BASIC
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return Dataset.DBEQ_SUMMARY
raise ValueError("Unexpected Publisher value")

@property
Expand Down Expand Up @@ -1937,4 +1957,6 @@ def description(self) -> str:
return "Nasdaq Basic - Nasdaq BX"
if self == Publisher.XNAS_BASIC_XPSX:
return "Nasdaq Basic - Nasdaq PSX"
if self == Publisher.DBEQ_SUMMARY_DBEQ:
return "Databento Equities Summary"
raise ValueError("Unexpected Publisher value")

0 comments on commit 3e9a200

Please sign in to comment.