Skip to content

Commit 25c84d9

Browse files
committed
ADD: Add publishers for consolidated DBEQ
1 parent ce5d0e7 commit 25c84d9

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
- Added `kSymbolCstrLen`, `kSymbolCstrLenV1`, and `kSymbolCstrLenV2` constants for the
1818
length of fixed-length symbol strings in different DBN versions
1919
- Added new publisher values in preparation for IFEU.IMPACT and NDEX.IMPACT datasets
20+
- Added new publisher values for consolidated DBEQ.BASIC and DBEQ.PLUS
2021
- Added `kMaxRecordLen` constant for the the length of the largest record type
22+
- Added ability to convert `FlagSet` to underlying representation
2123

2224
### Breaking changes
2325
- The old `InstrumentDefMsg` is now `InstrumentDefMsgV1` in `compat.hpp`

include/databento/publishers.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ enum class Venue : std::uint16_t {
8585
Ifeu = 38,
8686
// ICE Endex
8787
Ndex = 39,
88+
// Databento Equities - Consolidated
89+
Dbeq = 40,
8890
};
8991

9092
// A source of data.
@@ -267,6 +269,10 @@ enum class Publisher : std::uint16_t {
267269
IfeuImpactIfeu = 57,
268270
// ICE Endex
269271
NdexImpactNdex = 58,
272+
// DBEQ Basic - Consolidated
273+
DbeqBasicDbeq = 59,
274+
// DBEQ Plus - Consolidated
275+
DbeqPlusDbeq = 60,
270276
};
271277

272278
// Get a Publisher's Venue.

src/publishers.cpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ const char* ToString(Venue venue) {
128128
case Venue::Ndex: {
129129
return "NDEX";
130130
}
131+
case Venue::Dbeq: {
132+
return "DBEQ";
133+
}
131134
default: {
132135
return "Unknown";
133136
}
@@ -258,6 +261,9 @@ Venue FromString(const std::string& str) {
258261
if (str == "NDEX") {
259262
return Venue::Ndex;
260263
}
264+
if (str == "DBEQ") {
265+
return Venue::Dbeq;
266+
}
261267
throw InvalidArgumentError{"FromString<Venue>", "str",
262268
"unknown value '" + str + '\''};
263269
}
@@ -631,6 +637,12 @@ Venue PublisherVenue(Publisher publisher) {
631637
case Publisher::NdexImpactNdex: {
632638
return Venue::Ndex;
633639
}
640+
case Publisher::DbeqBasicDbeq: {
641+
return Venue::Dbeq;
642+
}
643+
case Publisher::DbeqPlusDbeq: {
644+
return Venue::Dbeq;
645+
}
634646
default: {
635647
throw InvalidArgumentError{
636648
"PublisherVenue", "publisher",
@@ -815,6 +827,12 @@ Dataset PublisherDataset(Publisher publisher) {
815827
case Publisher::NdexImpactNdex: {
816828
return Dataset::NdexImpact;
817829
}
830+
case Publisher::DbeqBasicDbeq: {
831+
return Dataset::DbeqBasic;
832+
}
833+
case Publisher::DbeqPlusDbeq: {
834+
return Dataset::DbeqPlus;
835+
}
818836
default: {
819837
throw InvalidArgumentError{
820838
"PublisherDataset", "publisher",
@@ -1000,6 +1018,12 @@ const char* ToString(Publisher publisher) {
10001018
case Publisher::NdexImpactNdex: {
10011019
return "NDEX.IMPACT.NDEX";
10021020
}
1021+
case Publisher::DbeqBasicDbeq: {
1022+
return "DBEQ.BASIC.DBEQ";
1023+
}
1024+
case Publisher::DbeqPlusDbeq: {
1025+
return "DBEQ.PLUS.DBEQ";
1026+
}
10031027
default: {
10041028
return "Unknown";
10051029
}
@@ -1187,6 +1211,12 @@ Publisher FromString(const std::string& str) {
11871211
if (str == "NDEX.IMPACT.NDEX") {
11881212
return Publisher::NdexImpactNdex;
11891213
}
1214+
if (str == "DBEQ.BASIC.DBEQ") {
1215+
return Publisher::DbeqBasicDbeq;
1216+
}
1217+
if (str == "DBEQ.PLUS.DBEQ") {
1218+
return Publisher::DbeqPlusDbeq;
1219+
}
11901220
throw InvalidArgumentError{"FromString<Publisher>", "str",
11911221
"unknown value '" + str + '\''};
11921222
}

0 commit comments

Comments
 (0)