Skip to content

Commit

Permalink
ADD: Add new enums for DBEQ.PLUS
Browse files Browse the repository at this point in the history
  • Loading branch information
renan-databento committed Oct 9, 2023
1 parent b9d827a commit a7411ef
Show file tree
Hide file tree
Showing 3 changed files with 226 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.13.1 - TBD
### Enhancements
- Added new publisher values in preparation for DBEQ.PLUS

## 0.13.0 - 2023-09-21
### Enhancements
- Added `pretty_px` option for `BatchSubmitJob`, which formats prices to the correct
Expand Down
36 changes: 36 additions & 0 deletions include/databento/publishers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ enum class Dataset : std::uint16_t {
ArcxPillar = 21,
// IEX TOPS
IexgTops = 22,
// Databento Equities Plus
DbeqPlus = 23,
// NYSE BBO
XnysBbo = 24,
// NYSE Trades
XnysTrades = 25,
// Nasdaq QBBO
XnasQbbo = 26,
// Nasdaq NLS
XnasNls = 27,
};

// A specific Venue from a specific data source.
Expand Down Expand Up @@ -219,6 +229,32 @@ enum class Publisher : std::uint16_t {
DbeqBasicEprl = 42,
// NYSE Arca Integrated
ArcxPillarArcx = 43,
// NYSE BBO
XnysBboXnys = 44,
// NYSE Trades
XnysTradesXnys = 45,
// Nasdaq QBBO
XnasQbboXnas = 46,
// Nasdaq Trades
XnasNlsXnas = 47,
// DBEQ Plus - NYSE Chicago
DbeqPlusXchi = 48,
// DBEQ Plus - NYSE National
DbeqPlusXcis = 49,
// DBEQ Plus - IEX
DbeqPlusIexg = 50,
// DBEQ Plus - MIAX Pearl
DbeqPlusEprl = 51,
// DBEQ Plus - Nasdaq
DbeqPlusXnas = 52,
// DBEQ Plus - NYSE
DbeqPlusXnys = 53,
// DBEQ Plus - FINRA/NYSE TRF
DbeqPlusFinn = 54,
// DBEQ Plus - FINRA/Nasdaq TRF Carteret
DbeqPlusFiny = 55,
// DBEQ Plus - FINRA/Nasdaq TRF Chicago
DbeqPlusFinc = 56,
};

// Get a Publisher's Venue.
Expand Down
186 changes: 186 additions & 0 deletions src/publishers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,21 @@ const char* ToString(Dataset dataset) {
case Dataset::IexgTops: {
return "IEXG.TOPS";
}
case Dataset::DbeqPlus: {
return "DBEQ.PLUS";
}
case Dataset::XnysBbo: {
return "XNYS.BBO";
}
case Dataset::XnysTrades: {
return "XNYS.TRADES";
}
case Dataset::XnasQbbo: {
return "XNAS.QBBO";
}
case Dataset::XnasNls: {
return "XNAS.NLS";
}
default: {
return "Unknown";
}
Expand Down Expand Up @@ -397,6 +412,21 @@ Dataset FromString(const std::string& str) {
if (str == "IEXG.TOPS") {
return Dataset::IexgTops;
}
if (str == "DBEQ.PLUS") {
return Dataset::DbeqPlus;
}
if (str == "XNYS.BBO") {
return Dataset::XnysBbo;
}
if (str == "XNYS.TRADES") {
return Dataset::XnysTrades;
}
if (str == "XNAS.QBBO") {
return Dataset::XnasQbbo;
}
if (str == "XNAS.NLS") {
return Dataset::XnasNls;
}
throw InvalidArgumentError{"FromString<Dataset>", "str",
"unknown value '" + str + '\''};
}
Expand Down Expand Up @@ -532,6 +562,45 @@ Venue PublisherVenue(Publisher publisher) {
case Publisher::ArcxPillarArcx: {
return Venue::Arcx;
}
case Publisher::XnysBboXnys: {
return Venue::Xnys;
}
case Publisher::XnysTradesXnys: {
return Venue::Xnys;
}
case Publisher::XnasQbboXnas: {
return Venue::Xnas;
}
case Publisher::XnasNlsXnas: {
return Venue::Xnas;
}
case Publisher::DbeqPlusXchi: {
return Venue::Xchi;
}
case Publisher::DbeqPlusXcis: {
return Venue::Xcis;
}
case Publisher::DbeqPlusIexg: {
return Venue::Iexg;
}
case Publisher::DbeqPlusEprl: {
return Venue::Eprl;
}
case Publisher::DbeqPlusXnas: {
return Venue::Xnas;
}
case Publisher::DbeqPlusXnys: {
return Venue::Xnys;
}
case Publisher::DbeqPlusFinn: {
return Venue::Finn;
}
case Publisher::DbeqPlusFiny: {
return Venue::Finy;
}
case Publisher::DbeqPlusFinc: {
return Venue::Finc;
}
default: {
throw InvalidArgumentError{
"PublisherVenue", "publisher",
Expand Down Expand Up @@ -671,6 +740,45 @@ Dataset PublisherDataset(Publisher publisher) {
case Publisher::ArcxPillarArcx: {
return Dataset::ArcxPillar;
}
case Publisher::XnysBboXnys: {
return Dataset::XnysBbo;
}
case Publisher::XnysTradesXnys: {
return Dataset::XnysTrades;
}
case Publisher::XnasQbboXnas: {
return Dataset::XnasQbbo;
}
case Publisher::XnasNlsXnas: {
return Dataset::XnasNls;
}
case Publisher::DbeqPlusXchi: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusXcis: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusIexg: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusEprl: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusXnas: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusXnys: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusFinn: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusFiny: {
return Dataset::DbeqPlus;
}
case Publisher::DbeqPlusFinc: {
return Dataset::DbeqPlus;
}
default: {
throw InvalidArgumentError{
"PublisherDataset", "publisher",
Expand Down Expand Up @@ -811,6 +919,45 @@ const char* ToString(Publisher publisher) {
case Publisher::ArcxPillarArcx: {
return "ARCX.PILLAR.ARCX";
}
case Publisher::XnysBboXnys: {
return "XNYS.BBO.XNYS";
}
case Publisher::XnysTradesXnys: {
return "XNYS.TRADES.XNYS";
}
case Publisher::XnasQbboXnas: {
return "XNAS.QBBO.XNAS";
}
case Publisher::XnasNlsXnas: {
return "XNAS.NLS.XNAS";
}
case Publisher::DbeqPlusXchi: {
return "DBEQ.PLUS.XCHI";
}
case Publisher::DbeqPlusXcis: {
return "DBEQ.PLUS.XCIS";
}
case Publisher::DbeqPlusIexg: {
return "DBEQ.PLUS.IEXG";
}
case Publisher::DbeqPlusEprl: {
return "DBEQ.PLUS.EPRL";
}
case Publisher::DbeqPlusXnas: {
return "DBEQ.PLUS.XNAS";
}
case Publisher::DbeqPlusXnys: {
return "DBEQ.PLUS.XNYS";
}
case Publisher::DbeqPlusFinn: {
return "DBEQ.PLUS.FINN";
}
case Publisher::DbeqPlusFiny: {
return "DBEQ.PLUS.FINY";
}
case Publisher::DbeqPlusFinc: {
return "DBEQ.PLUS.FINC";
}
default: {
return "Unknown";
}
Expand Down Expand Up @@ -953,6 +1100,45 @@ Publisher FromString(const std::string& str) {
if (str == "ARCX.PILLAR.ARCX") {
return Publisher::ArcxPillarArcx;
}
if (str == "XNYS.BBO.XNYS") {
return Publisher::XnysBboXnys;
}
if (str == "XNYS.TRADES.XNYS") {
return Publisher::XnysTradesXnys;
}
if (str == "XNAS.QBBO.XNAS") {
return Publisher::XnasQbboXnas;
}
if (str == "XNAS.NLS.XNAS") {
return Publisher::XnasNlsXnas;
}
if (str == "DBEQ.PLUS.XCHI") {
return Publisher::DbeqPlusXchi;
}
if (str == "DBEQ.PLUS.XCIS") {
return Publisher::DbeqPlusXcis;
}
if (str == "DBEQ.PLUS.IEXG") {
return Publisher::DbeqPlusIexg;
}
if (str == "DBEQ.PLUS.EPRL") {
return Publisher::DbeqPlusEprl;
}
if (str == "DBEQ.PLUS.XNAS") {
return Publisher::DbeqPlusXnas;
}
if (str == "DBEQ.PLUS.XNYS") {
return Publisher::DbeqPlusXnys;
}
if (str == "DBEQ.PLUS.FINN") {
return Publisher::DbeqPlusFinn;
}
if (str == "DBEQ.PLUS.FINY") {
return Publisher::DbeqPlusFiny;
}
if (str == "DBEQ.PLUS.FINC") {
return Publisher::DbeqPlusFinc;
}
throw InvalidArgumentError{"FromString<Publisher>", "str",
"unknown value '" + str + '\''};
}
Expand Down

0 comments on commit a7411ef

Please sign in to comment.