Skip to content

Commit ba9ba3f

Browse files
authored
VER: Release 0.54.0
2 parents 6a03e01 + f352e40 commit ba9ba3f

7 files changed

Lines changed: 68 additions & 17 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.54.0 - 2026-04-21
4+
5+
### Enhancements
6+
- Added new publisher values for OPRA MEMX MX2 Options and IEX Options
7+
38
## 0.53.0 - 2026-04-08
49

510
### Enhancements

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.24..4.2)
66

77
project(
88
databento
9-
VERSION 0.53.0
9+
VERSION 0.54.0
1010
LANGUAGES CXX
1111
DESCRIPTION "Official Databento client library"
1212
)

examples/historical/metadata.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ int main() {
6969

7070
const auto cost = client.MetadataGetCost(glbx_dataset, {"2020-12-28", "2020-12-29"},
7171
{"ESH1"}, db::Schema::Mbo);
72-
std::cout << "Cost (in cents): " << cost << '\n';
72+
std::cout << "Cost (in USD): " << cost << '\n';
7373

7474
return 0;
7575
}

include/databento/publishers.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,10 @@ enum class Venue : std::uint16_t {
113113
Xcbf = 52,
114114
// Blue Ocean ATS
115115
Ocea = 53,
116+
// MX2 Options
117+
Mxto = 54,
118+
// IEX Options LLC
119+
Iexo = 55,
116120
};
117121

118122
// A source of data.
@@ -417,6 +421,10 @@ enum class Publisher : std::uint16_t {
417421
XcbfPitchXoff = 106,
418422
// Blue Ocean ATS MEMOIR
419423
OceaMemoirOcea = 107,
424+
// OPRA - MEMX MX2 Options
425+
OpraPillarMxto = 108,
426+
// OPRA - IEX Options LLC
427+
OpraPillarIexo = 109,
420428
};
421429

422430
// Get a Publisher's Venue.

pkg/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Maintainer: Databento <support@databento.com>
22
_pkgname=databento-cpp
33
pkgname=databento-cpp-git
4-
pkgver=0.53.0
4+
pkgver=0.54.0
55
pkgrel=1
66
pkgdesc="Official C++ client for Databento"
77
arch=('any')

src/detail/tcp_client.cpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,39 @@ constexpr int kConnectInProgress = EINPROGRESS;
5959

6060
// Saves the current blocking state, sets non-blocking, and returns a RAII guard
6161
// that restores the original state on destruction.
62-
struct BlockingGuard {
63-
databento::detail::Socket fd;
64-
#ifdef _WIN32
65-
// No state to save on Windows
66-
#else
67-
int original_flags;
68-
#endif
69-
70-
explicit BlockingGuard(databento::detail::Socket fd) : fd{fd} {
62+
class BlockingGuard {
63+
public:
64+
explicit BlockingGuard(databento::detail::Socket socket) : _fd{socket} {
7165
#ifdef _WIN32
7266
unsigned long mode = 1;
73-
::ioctlsocket(fd, FIONBIO, &mode);
67+
::ioctlsocket(_fd, FIONBIO, &mode);
7468
#else
75-
original_flags = ::fcntl(fd, F_GETFL, 0);
76-
::fcntl(fd, F_SETFL, original_flags | O_NONBLOCK);
69+
_original_flags = ::fcntl(_fd, F_GETFL, 0);
70+
::fcntl(_fd, F_SETFL, _original_flags | O_NONBLOCK);
7771
#endif
7872
}
7973

8074
~BlockingGuard() {
8175
#ifdef _WIN32
8276
unsigned long mode = 0;
83-
::ioctlsocket(fd, FIONBIO, &mode);
77+
::ioctlsocket(_fd, FIONBIO, &mode);
8478
#else
85-
::fcntl(fd, F_SETFL, original_flags);
79+
::fcntl(_fd, F_SETFL, _original_flags);
8680
#endif
8781
}
8882

8983
BlockingGuard(const BlockingGuard&) = delete;
9084
BlockingGuard& operator=(const BlockingGuard&) = delete;
9185
BlockingGuard(BlockingGuard&&) = delete;
9286
BlockingGuard& operator=(BlockingGuard&&) = delete;
87+
88+
private:
89+
databento::detail::Socket _fd;
90+
#ifdef _WIN32
91+
// No state to save on Windows
92+
#else
93+
int _original_flags;
94+
#endif
9395
};
9496
} // namespace
9597

src/publishers.cpp

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ const char* ToString(Venue venue) {
170170
case Venue::Ocea: {
171171
return "OCEA";
172172
}
173+
case Venue::Mxto: {
174+
return "MXTO";
175+
}
176+
case Venue::Iexo: {
177+
return "IEXO";
178+
}
173179
default: {
174180
return "Unknown";
175181
}
@@ -342,6 +348,12 @@ Venue FromString(const std::string& str) {
342348
if (str == "OCEA") {
343349
return Venue::Ocea;
344350
}
351+
if (str == "MXTO") {
352+
return Venue::Mxto;
353+
}
354+
if (str == "IEXO") {
355+
return Venue::Iexo;
356+
}
345357
throw InvalidArgumentError{"FromString<Venue>", "str",
346358
"unknown value '" + str + '\''};
347359
}
@@ -934,6 +946,12 @@ Venue PublisherVenue(Publisher publisher) {
934946
case Publisher::OceaMemoirOcea: {
935947
return Venue::Ocea;
936948
}
949+
case Publisher::OpraPillarMxto: {
950+
return Venue::Mxto;
951+
}
952+
case Publisher::OpraPillarIexo: {
953+
return Venue::Iexo;
954+
}
937955
default: {
938956
throw InvalidArgumentError{
939957
"PublisherVenue", "publisher",
@@ -1265,6 +1283,12 @@ Dataset PublisherDataset(Publisher publisher) {
12651283
case Publisher::OceaMemoirOcea: {
12661284
return Dataset::OceaMemoir;
12671285
}
1286+
case Publisher::OpraPillarMxto: {
1287+
return Dataset::OpraPillar;
1288+
}
1289+
case Publisher::OpraPillarIexo: {
1290+
return Dataset::OpraPillar;
1291+
}
12681292
default: {
12691293
throw InvalidArgumentError{
12701294
"PublisherDataset", "publisher",
@@ -1597,6 +1621,12 @@ const char* ToString(Publisher publisher) {
15971621
case Publisher::OceaMemoirOcea: {
15981622
return "OCEA.MEMOIR.OCEA";
15991623
}
1624+
case Publisher::OpraPillarMxto: {
1625+
return "OPRA.PILLAR.MXTO";
1626+
}
1627+
case Publisher::OpraPillarIexo: {
1628+
return "OPRA.PILLAR.IEXO";
1629+
}
16001630
default: {
16011631
return "Unknown";
16021632
}
@@ -1931,6 +1961,12 @@ Publisher FromString(const std::string& str) {
19311961
if (str == "OCEA.MEMOIR.OCEA") {
19321962
return Publisher::OceaMemoirOcea;
19331963
}
1964+
if (str == "OPRA.PILLAR.MXTO") {
1965+
return Publisher::OpraPillarMxto;
1966+
}
1967+
if (str == "OPRA.PILLAR.IEXO") {
1968+
return Publisher::OpraPillarIexo;
1969+
}
19341970
throw InvalidArgumentError{"FromString<Publisher>", "str",
19351971
"unknown value '" + str + '\''};
19361972
}

0 commit comments

Comments
 (0)