Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/historical/metadata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
8 changes: 8 additions & 0 deletions include/databento/publishers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/PKGBUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Maintainer: Databento <support@databento.com>
_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')
Expand Down
30 changes: 16 additions & 14 deletions src/detail/tcp_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,37 +59,39 @@ 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
}

BlockingGuard(const BlockingGuard&) = delete;
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

Expand Down
36 changes: 36 additions & 0 deletions src/publishers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down Expand Up @@ -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<Venue>", "str",
"unknown value '" + str + '\''};
}
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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";
}
Expand Down Expand Up @@ -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<Publisher>", "str",
"unknown value '" + str + '\''};
}
Expand Down
Loading