Skip to content

Commit 3423e2f

Browse files
ADD: Consolidated pub for XNYS.TRADES bars
1 parent cc4e0de commit 3423e2f

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Added export of `StatusReason` enum from `databento_dbn` to the root `databento` package
1111
- Added export of `TradingEvent` enum from `databento_dbn` to the root `databento` package
1212
- Removed upper bound for supported `python` versions; the constraint is now `^3.9`
13-
- Added new dataset `EQUS.MINI` and new publisher `EQUS.MINI.EQUS`
13+
- Added new dataset `EQUS.MINI` and new publishers `EQUS.MINI.EQUS`, `XNYS.TRADES.EQUS`
1414

1515
#### Bug fixes
1616
- Fixed an issue where sending a `KeyboardInterrupt` during iteration of the `Live` client could block execution waiting for the connection to close

databento/common/publishers.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,8 @@ class Publisher(StringyMixin, str, Enum):
10061006
Databento US Equities (All Feeds) - Consolidated.
10071007
EQUS_MINI_EQUS
10081008
Databento US Equities Mini.
1009+
XNYS_TRADES_EQUS
1010+
NYSE Trades - Consolidated.
10091011
10101012
"""
10111013

@@ -1104,6 +1106,7 @@ class Publisher(StringyMixin, str, Enum):
11041106
XNAS_BASIC_EQUS = "XNAS.BASIC.EQUS"
11051107
EQUS_ALL_EQUS = "EQUS.ALL.EQUS"
11061108
EQUS_MINI_EQUS = "EQUS.MINI.EQUS"
1109+
XNYS_TRADES_EQUS = "XNYS.TRADES.EQUS"
11071110

11081111
@classmethod
11091112
def from_int(cls, value: int) -> Publisher:
@@ -1300,6 +1303,8 @@ def from_int(cls, value: int) -> Publisher:
13001303
return Publisher.EQUS_ALL_EQUS
13011304
if value == 95:
13021305
return Publisher.EQUS_MINI_EQUS
1306+
if value == 96:
1307+
return Publisher.XNYS_TRADES_EQUS
13031308
raise ValueError(f"Integer value {value} does not correspond with any Publisher variant")
13041309

13051310
def to_int(self) -> int:
@@ -1496,6 +1501,8 @@ def to_int(self) -> int:
14961501
return 94
14971502
if self == Publisher.EQUS_MINI_EQUS:
14981503
return 95
1504+
if self == Publisher.XNYS_TRADES_EQUS:
1505+
return 96
14991506
raise ValueError("Invalid Publisher")
15001507

15011508
@property
@@ -1693,6 +1700,8 @@ def venue(self) -> Venue:
16931700
return Venue.EQUS
16941701
if self == Publisher.EQUS_MINI_EQUS:
16951702
return Venue.EQUS
1703+
if self == Publisher.XNYS_TRADES_EQUS:
1704+
return Venue.EQUS
16961705
raise ValueError("Unexpected Publisher value")
16971706

16981707
@property
@@ -1890,6 +1899,8 @@ def dataset(self) -> Dataset:
18901899
return Dataset.EQUS_ALL
18911900
if self == Publisher.EQUS_MINI_EQUS:
18921901
return Dataset.EQUS_MINI
1902+
if self == Publisher.XNYS_TRADES_EQUS:
1903+
return Dataset.XNYS_TRADES
18931904
raise ValueError("Unexpected Publisher value")
18941905

18951906
@property
@@ -2087,4 +2098,6 @@ def description(self) -> str:
20872098
return "Databento US Equities (All Feeds) - Consolidated"
20882099
if self == Publisher.EQUS_MINI_EQUS:
20892100
return "Databento US Equities Mini"
2101+
if self == Publisher.XNYS_TRADES_EQUS:
2102+
return "NYSE Trades - Consolidated"
20902103
raise ValueError("Unexpected Publisher value")

0 commit comments

Comments
 (0)