diff --git a/CHANGELOG.md b/CHANGELOG.md index e33f045..ac5a575 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.54.0 - 2026-04-21 + +### Enhancements +- Added new publisher values for OPRA MEMX MX2 Options and IEX Options + ## 0.53.0 - 2026-04-08 ### Enhancements diff --git a/CMakeLists.txt b/CMakeLists.txt index d58e9c3..3260c5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24..4.2) project( databento - VERSION 0.53.0 + VERSION 0.54.0 LANGUAGES CXX DESCRIPTION "Official Databento client library" ) diff --git a/examples/historical/metadata.cpp b/examples/historical/metadata.cpp index c11e8c8..49925d2 100644 --- a/examples/historical/metadata.cpp +++ b/examples/historical/metadata.cpp @@ -69,7 +69,7 @@ int main() { const auto cost = client.MetadataGetCost(glbx_dataset, {"2020-12-28", "2020-12-29"}, {"ESH1"}, db::Schema::Mbo); - std::cout << "Cost (in cents): " << cost << '\n'; + std::cout << "Cost (in USD): " << cost << '\n'; return 0; } diff --git a/include/databento/publishers.hpp b/include/databento/publishers.hpp index a886178..a77a5d2 100644 --- a/include/databento/publishers.hpp +++ b/include/databento/publishers.hpp @@ -113,6 +113,10 @@ enum class Venue : std::uint16_t { Xcbf = 52, // Blue Ocean ATS Ocea = 53, + // MX2 Options + Mxto = 54, + // IEX Options LLC + Iexo = 55, }; // A source of data. @@ -417,6 +421,10 @@ enum class Publisher : std::uint16_t { XcbfPitchXoff = 106, // Blue Ocean ATS MEMOIR OceaMemoirOcea = 107, + // OPRA - MEMX MX2 Options + OpraPillarMxto = 108, + // OPRA - IEX Options LLC + OpraPillarIexo = 109, }; // Get a Publisher's Venue. diff --git a/pkg/PKGBUILD b/pkg/PKGBUILD index 77e380e..660bb37 100644 --- a/pkg/PKGBUILD +++ b/pkg/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Databento _pkgname=databento-cpp pkgname=databento-cpp-git -pkgver=0.53.0 +pkgver=0.54.0 pkgrel=1 pkgdesc="Official C++ client for Databento" arch=('any') diff --git a/src/detail/tcp_client.cpp b/src/detail/tcp_client.cpp index f0aacb9..c34e25c 100644 --- a/src/detail/tcp_client.cpp +++ b/src/detail/tcp_client.cpp @@ -59,30 +59,24 @@ constexpr int kConnectInProgress = EINPROGRESS; // Saves the current blocking state, sets non-blocking, and returns a RAII guard // that restores the original state on destruction. -struct BlockingGuard { - databento::detail::Socket fd; -#ifdef _WIN32 - // No state to save on Windows -#else - int original_flags; -#endif - - explicit BlockingGuard(databento::detail::Socket fd) : fd{fd} { +class BlockingGuard { + public: + explicit BlockingGuard(databento::detail::Socket socket) : _fd{socket} { #ifdef _WIN32 unsigned long mode = 1; - ::ioctlsocket(fd, FIONBIO, &mode); + ::ioctlsocket(_fd, FIONBIO, &mode); #else - original_flags = ::fcntl(fd, F_GETFL, 0); - ::fcntl(fd, F_SETFL, original_flags | O_NONBLOCK); + _original_flags = ::fcntl(_fd, F_GETFL, 0); + ::fcntl(_fd, F_SETFL, _original_flags | O_NONBLOCK); #endif } ~BlockingGuard() { #ifdef _WIN32 unsigned long mode = 0; - ::ioctlsocket(fd, FIONBIO, &mode); + ::ioctlsocket(_fd, FIONBIO, &mode); #else - ::fcntl(fd, F_SETFL, original_flags); + ::fcntl(_fd, F_SETFL, _original_flags); #endif } @@ -90,6 +84,14 @@ struct BlockingGuard { BlockingGuard& operator=(const BlockingGuard&) = delete; BlockingGuard(BlockingGuard&&) = delete; BlockingGuard& operator=(BlockingGuard&&) = delete; + + private: + databento::detail::Socket _fd; +#ifdef _WIN32 + // No state to save on Windows +#else + int _original_flags; +#endif }; } // namespace diff --git a/src/publishers.cpp b/src/publishers.cpp index 3a17828..cd94554 100644 --- a/src/publishers.cpp +++ b/src/publishers.cpp @@ -170,6 +170,12 @@ const char* ToString(Venue venue) { case Venue::Ocea: { return "OCEA"; } + case Venue::Mxto: { + return "MXTO"; + } + case Venue::Iexo: { + return "IEXO"; + } default: { return "Unknown"; } @@ -342,6 +348,12 @@ Venue FromString(const std::string& str) { if (str == "OCEA") { return Venue::Ocea; } + if (str == "MXTO") { + return Venue::Mxto; + } + if (str == "IEXO") { + return Venue::Iexo; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; } @@ -934,6 +946,12 @@ Venue PublisherVenue(Publisher publisher) { case Publisher::OceaMemoirOcea: { return Venue::Ocea; } + case Publisher::OpraPillarMxto: { + return Venue::Mxto; + } + case Publisher::OpraPillarIexo: { + return Venue::Iexo; + } default: { throw InvalidArgumentError{ "PublisherVenue", "publisher", @@ -1265,6 +1283,12 @@ Dataset PublisherDataset(Publisher publisher) { case Publisher::OceaMemoirOcea: { return Dataset::OceaMemoir; } + case Publisher::OpraPillarMxto: { + return Dataset::OpraPillar; + } + case Publisher::OpraPillarIexo: { + return Dataset::OpraPillar; + } default: { throw InvalidArgumentError{ "PublisherDataset", "publisher", @@ -1597,6 +1621,12 @@ const char* ToString(Publisher publisher) { case Publisher::OceaMemoirOcea: { return "OCEA.MEMOIR.OCEA"; } + case Publisher::OpraPillarMxto: { + return "OPRA.PILLAR.MXTO"; + } + case Publisher::OpraPillarIexo: { + return "OPRA.PILLAR.IEXO"; + } default: { return "Unknown"; } @@ -1931,6 +1961,12 @@ Publisher FromString(const std::string& str) { if (str == "OCEA.MEMOIR.OCEA") { return Publisher::OceaMemoirOcea; } + if (str == "OPRA.PILLAR.MXTO") { + return Publisher::OpraPillarMxto; + } + if (str == "OPRA.PILLAR.IEXO") { + return Publisher::OpraPillarIexo; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; }