Skip to content

Commit

Permalink
ADD: Consolidated pub for XNYS.TRADES bars
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-databento committed Jan 16, 2025
1 parent 4b14eba commit 3b22eed
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
- Updated enumerations for unreleased datasets and publishers.

### Enhancements
- Added new dataset `EQUS.MINI` and new publisher `EQUS.MINI.EQUS`
- Added new dataset `EQUS.MINI` and new publishers `EQUS.MINI.EQUS`, `XNYS.TRADES.EQUS`

## 0.27.0 - 2025-01-07

Expand Down
2 changes: 2 additions & 0 deletions include/databento/publishers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,8 @@ enum class Publisher : std::uint16_t {
EqusAllEqus = 94,
// Databento US Equities Mini
EqusMiniEqus = 95,
// NYSE Trades - Consolidated
XnysTradesEqus = 96,
};

// Get a Publisher's Venue.
Expand Down
12 changes: 12 additions & 0 deletions src/publishers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,9 @@ Venue PublisherVenue(Publisher publisher) {
case Publisher::EqusMiniEqus: {
return Venue::Equs;
}
case Publisher::XnysTradesEqus: {
return Venue::Equs;
}
default: {
throw InvalidArgumentError{
"PublisherVenue", "publisher",
Expand Down Expand Up @@ -1121,6 +1124,9 @@ Dataset PublisherDataset(Publisher publisher) {
case Publisher::EqusMiniEqus: {
return Dataset::EqusMini;
}
case Publisher::XnysTradesEqus: {
return Dataset::XnysTrades;
}
default: {
throw InvalidArgumentError{
"PublisherDataset", "publisher",
Expand Down Expand Up @@ -1417,6 +1423,9 @@ const char* ToString(Publisher publisher) {
case Publisher::EqusMiniEqus: {
return "EQUS.MINI.EQUS";
}
case Publisher::XnysTradesEqus: {
return "XNYS.TRADES.EQUS";
}
default: {
return "Unknown";
}
Expand Down Expand Up @@ -1715,6 +1724,9 @@ Publisher FromString(const std::string& str) {
if (str == "EQUS.MINI.EQUS") {
return Publisher::EqusMiniEqus;
}
if (str == "XNYS.TRADES.EQUS") {
return Publisher::XnysTradesEqus;
}
throw InvalidArgumentError{"FromString<Publisher>", "str",
"unknown value '" + str + '\''};
}
Expand Down

0 comments on commit 3b22eed

Please sign in to comment.