Skip to content

Commit 7fe6d99

Browse files
author
Jack Culhane
committed
ADD: Add OPRA participant MIAX Sapphire
1 parent f339be9 commit 7fe6d99

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Enhancements
66
- Added `PitSymbolMap` helper for keeping track of symbology mappings in Live
7+
- Added new publisher value for OPRA MIAX Sapphire
78

89
### Bug fixes
910
- Fixed misaligned read undefined behavior when decoding records

include/databento/publishers.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ enum class Venue : std::uint16_t {
8787
Ndex = 39,
8888
// Databento Equities - Consolidated
8989
Dbeq = 40,
90+
// MIAX Sapphire
91+
Sphr = 41,
9092
};
9193

9294
// A source of data.
@@ -273,6 +275,8 @@ enum class Publisher : std::uint16_t {
273275
DbeqBasicDbeq = 59,
274276
// DBEQ Plus - Consolidated
275277
DbeqPlusDbeq = 60,
278+
// OPRA - MIAX Sapphire
279+
OpraPillarSphr = 61,
276280
};
277281

278282
// Get a Publisher's Venue.

src/publishers.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,9 @@ const char* ToString(Venue venue) {
131131
case Venue::Dbeq: {
132132
return "DBEQ";
133133
}
134+
case Venue::Sphr: {
135+
return "SPHR";
136+
}
134137
default: {
135138
return "Unknown";
136139
}
@@ -264,6 +267,9 @@ Venue FromString(const std::string& str) {
264267
if (str == "DBEQ") {
265268
return Venue::Dbeq;
266269
}
270+
if (str == "SPHR") {
271+
return Venue::Sphr;
272+
}
267273
throw InvalidArgumentError{"FromString<Venue>", "str",
268274
"unknown value '" + str + '\''};
269275
}
@@ -643,6 +649,9 @@ Venue PublisherVenue(Publisher publisher) {
643649
case Publisher::DbeqPlusDbeq: {
644650
return Venue::Dbeq;
645651
}
652+
case Publisher::OpraPillarSphr: {
653+
return Venue::Sphr;
654+
}
646655
default: {
647656
throw InvalidArgumentError{
648657
"PublisherVenue", "publisher",
@@ -833,6 +842,9 @@ Dataset PublisherDataset(Publisher publisher) {
833842
case Publisher::DbeqPlusDbeq: {
834843
return Dataset::DbeqPlus;
835844
}
845+
case Publisher::OpraPillarSphr: {
846+
return Dataset::OpraPillar;
847+
}
836848
default: {
837849
throw InvalidArgumentError{
838850
"PublisherDataset", "publisher",
@@ -1024,6 +1036,9 @@ const char* ToString(Publisher publisher) {
10241036
case Publisher::DbeqPlusDbeq: {
10251037
return "DBEQ.PLUS.DBEQ";
10261038
}
1039+
case Publisher::OpraPillarSphr: {
1040+
return "OPRA.PILLAR.SPHR";
1041+
}
10271042
default: {
10281043
return "Unknown";
10291044
}
@@ -1217,6 +1232,9 @@ Publisher FromString(const std::string& str) {
12171232
if (str == "DBEQ.PLUS.DBEQ") {
12181233
return Publisher::DbeqPlusDbeq;
12191234
}
1235+
if (str == "OPRA.PILLAR.SPHR") {
1236+
return Publisher::OpraPillarSphr;
1237+
}
12201238
throw InvalidArgumentError{"FromString<Publisher>", "str",
12211239
"unknown value '" + str + '\''};
12221240
}

0 commit comments

Comments
 (0)