From 7fe6d99cae8a781159a600db0d30a2394fe36778 Mon Sep 17 00:00:00 2001 From: Jack Culhane Date: Tue, 12 Dec 2023 15:41:31 +0000 Subject: [PATCH] ADD: Add OPRA participant MIAX Sapphire --- CHANGELOG.md | 1 + include/databento/publishers.hpp | 4 ++++ src/publishers.cpp | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index df368d5..8861c9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Enhancements - Added `PitSymbolMap` helper for keeping track of symbology mappings in Live +- Added new publisher value for OPRA MIAX Sapphire ### Bug fixes - Fixed misaligned read undefined behavior when decoding records diff --git a/include/databento/publishers.hpp b/include/databento/publishers.hpp index 7cb388d..2940423 100644 --- a/include/databento/publishers.hpp +++ b/include/databento/publishers.hpp @@ -87,6 +87,8 @@ enum class Venue : std::uint16_t { Ndex = 39, // Databento Equities - Consolidated Dbeq = 40, + // MIAX Sapphire + Sphr = 41, }; // A source of data. @@ -273,6 +275,8 @@ enum class Publisher : std::uint16_t { DbeqBasicDbeq = 59, // DBEQ Plus - Consolidated DbeqPlusDbeq = 60, + // OPRA - MIAX Sapphire + OpraPillarSphr = 61, }; // Get a Publisher's Venue. diff --git a/src/publishers.cpp b/src/publishers.cpp index 47772bf..538eeea 100644 --- a/src/publishers.cpp +++ b/src/publishers.cpp @@ -131,6 +131,9 @@ const char* ToString(Venue venue) { case Venue::Dbeq: { return "DBEQ"; } + case Venue::Sphr: { + return "SPHR"; + } default: { return "Unknown"; } @@ -264,6 +267,9 @@ Venue FromString(const std::string& str) { if (str == "DBEQ") { return Venue::Dbeq; } + if (str == "SPHR") { + return Venue::Sphr; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; } @@ -643,6 +649,9 @@ Venue PublisherVenue(Publisher publisher) { case Publisher::DbeqPlusDbeq: { return Venue::Dbeq; } + case Publisher::OpraPillarSphr: { + return Venue::Sphr; + } default: { throw InvalidArgumentError{ "PublisherVenue", "publisher", @@ -833,6 +842,9 @@ Dataset PublisherDataset(Publisher publisher) { case Publisher::DbeqPlusDbeq: { return Dataset::DbeqPlus; } + case Publisher::OpraPillarSphr: { + return Dataset::OpraPillar; + } default: { throw InvalidArgumentError{ "PublisherDataset", "publisher", @@ -1024,6 +1036,9 @@ const char* ToString(Publisher publisher) { case Publisher::DbeqPlusDbeq: { return "DBEQ.PLUS.DBEQ"; } + case Publisher::OpraPillarSphr: { + return "OPRA.PILLAR.SPHR"; + } default: { return "Unknown"; } @@ -1217,6 +1232,9 @@ Publisher FromString(const std::string& str) { if (str == "DBEQ.PLUS.DBEQ") { return Publisher::DbeqPlusDbeq; } + if (str == "OPRA.PILLAR.SPHR") { + return Publisher::OpraPillarSphr; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; }