Skip to content

Commit e5be52a

Browse files
authored
Release 0.21.0
2 parents a5b78fa + e7e68dc commit e5be52a

File tree

10 files changed

+87
-20
lines changed

10 files changed

+87
-20
lines changed

CHANGELOG.md

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

3+
## 0.21.0 - 2024-07-30
4+
5+
### Enhancements
6+
- Added new publisher value for `DBEQ.SUMMARY`
7+
8+
### Breaking changes
9+
- Renamed `SType::Nasdaq` variant to `SType::NasdaqSymbol`
10+
- Renamed `SType::Cms` variant to `SType::CmsSymbol`
11+
12+
### Bug fixes
13+
- Added missing `ToString` and `FromString` branches for `SType::NasdaqSymbol` and
14+
`SType::CmsSymbol`
15+
- Removed `has_header_v` variable template that broke C++11 compatibility
16+
317
## 0.20.1 - 2024-07-16
418

519
### Enhancements
6-
- Improved installation with `CMake`: license is now installed, transitive dependencies are configured
7-
when importing package
20+
- Improved installation with `CMake`: license is now installed, transitive dependencies
21+
are configured when importing package
822

923
## 0.20.0 - 2024-07-09
1024

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.14)
44
# Project details
55
#
66

7-
project("databento" VERSION 0.20.1 LANGUAGES CXX)
7+
project("databento" VERSION 0.21.0 LANGUAGES CXX)
88
string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE)
99

1010
#

include/databento/dbn_encoder.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class DbnEncoder {
1818
template <typename R>
1919
void EncodeRecord(const R& record) {
2020
static_assert(
21-
has_header_v<R>,
21+
has_header<R>::value,
2222
"must be a DBN record struct with an `hd` RecordHeader field");
2323
EncodeRecord(Record{&record.hd});
2424
}
2525
template <typename R>
2626
void EncodeRecord(const WithTsOut<R> record) {
2727
static_assert(
28-
has_header_v<R>,
28+
has_header<R>::value,
2929
"must be a DBN record struct with an `hd` RecordHeader field");
3030
EncodeRecord(Record{&record.rec.hd});
3131
}

include/databento/enums.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <iosfwd>
55
#include <string>
66

7-
#include "databento/publishers.hpp" // Dataset, Publisher, Venue, FromString
7+
#include "databento/publishers.hpp" // FromString
88

99
namespace databento {
1010
// Represents a historical data center gateway location.
@@ -70,9 +70,9 @@ enum SType : std::uint8_t {
7070
// "parent" symbol, e.g. ES.FUT to refer to all ES futures.
7171
Parent = 4,
7272
// Symbology for US equities using NASDAQ Integrated suffix conventions.
73-
Nasdaq = 5,
73+
NasdaqSymbol = 5,
7474
// Symbology for US equities using CMS suffix conventions.
75-
Cms = 6,
75+
CmsSymbol = 6,
7676
};
7777
} // namespace stype
7878
using SType = stype::SType;

include/databento/publishers.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ enum class Dataset : std::uint16_t {
159159
DbeqMax = 30,
160160
// Nasdaq Basic (NLS+QBBO)
161161
XnasBasic = 31,
162+
// Databento Equities Summary
163+
DbeqSummary = 32,
162164
};
163165

164166
// A specific Venue from a specific data source.
@@ -341,6 +343,8 @@ enum class Publisher : std::uint16_t {
341343
XnasBasicXbos = 88,
342344
// Nasdaq Basic - Nasdaq PSX
343345
XnasBasicXpsx = 89,
346+
// Databento Equities Summary
347+
DbeqSummaryDbeq = 90,
344348
};
345349

346350
// Get a Publisher's Venue.

include/databento/record.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ struct has_header : std::false_type {};
5252
template <typename T>
5353
struct has_header<T, detail::void_t<decltype(std::declval<T>().hd)>>
5454
: std::is_same<decltype(std::declval<T>().hd), RecordHeader> {};
55-
template <typename T>
56-
constexpr bool has_header_v = has_header<T>::value;
5755

5856
class Record {
5957
public:

include/databento/symbol_map.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TsSymbolMap {
3737
template <typename R>
3838
Store::const_iterator Find(const R& rec) const {
3939
static_assert(
40-
has_header_v<R>,
40+
has_header<R>::value,
4141
"must be a DBN record struct with an `hd` RecordHeader field");
4242
date::year_month_day index_date{
4343
date::sys_days{date::floor<date::days>(rec.IndexTs())}};
@@ -50,7 +50,7 @@ class TsSymbolMap {
5050
template <typename R>
5151
const std::string& At(const R& rec) const {
5252
static_assert(
53-
has_header_v<R>,
53+
has_header<R>::value,
5454
"must be a DBN record struct with an `hd` RecordHeader field");
5555
date::year_month_day index_date{
5656
date::sys_days{date::floor<date::days>(rec.IndexTs())}};
@@ -88,7 +88,7 @@ class PitSymbolMap {
8888
template <typename R>
8989
const std::string& At(const R& rec) const {
9090
static_assert(
91-
has_header_v<R>,
91+
has_header<R>::value,
9292
"must be a DBN record struct with an `hd` RecordHeader field");
9393
return map_.at(rec.hd.instrument_id);
9494
}

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.20.1
4+
pkgver=0.21.0
55
pkgrel=1
66
pkgdesc="Official C++ client for Databento"
77
arch=('any')

src/enums.cpp

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ const char* ToString(Schema schema) {
5353
case Schema::Definition: {
5454
return "definition";
5555
}
56-
case Schema::Imbalance: {
57-
return "imbalance";
58-
}
5956
case Schema::Statistics: {
6057
return "statistics";
6158
}
6259
case Schema::Status: {
6360
return "status";
6461
}
62+
case Schema::Imbalance: {
63+
return "imbalance";
64+
}
6565
case Schema::Cbbo: {
6666
return "cbbo";
6767
}
@@ -148,6 +148,12 @@ const char* ToString(SType stype) {
148148
case SType::Parent: {
149149
return "parent";
150150
}
151+
case SType::NasdaqSymbol: {
152+
return "nasdaq_symbol";
153+
}
154+
case SType::CmsSymbol: {
155+
return "cms_symbol";
156+
}
151157
default: {
152158
return "unknown";
153159
}
@@ -522,6 +528,9 @@ const char* ToString(StatType stat_type) {
522528
case StatType::Delta: {
523529
return "Delta";
524530
}
531+
case StatType::UncrossingPrice: {
532+
return "UncrossingPrice";
533+
}
525534
default: {
526535
return "Unknown";
527536
}
@@ -915,15 +924,33 @@ Schema FromString(const std::string& str) {
915924
if (str == "definition") {
916925
return Schema::Definition;
917926
}
918-
if (str == "imbalance") {
919-
return Schema::Imbalance;
920-
}
921927
if (str == "statistics") {
922928
return Schema::Statistics;
923929
}
924930
if (str == "status") {
925931
return Schema::Status;
926932
}
933+
if (str == "imbalance") {
934+
return Schema::Imbalance;
935+
}
936+
if (str == "cbbo") {
937+
return Schema::Cbbo;
938+
}
939+
if (str == "cbbo-1s") {
940+
return Schema::Cbbo1S;
941+
}
942+
if (str == "cbbo-1m") {
943+
return Schema::Cbbo1M;
944+
}
945+
if (str == "tcbbo") {
946+
return Schema::Tcbbo;
947+
}
948+
if (str == "bbo-1s") {
949+
return Schema::Bbo1S;
950+
}
951+
if (str == "bbo-1m") {
952+
return Schema::Bbo1M;
953+
}
927954
throw InvalidArgumentError{"FromString<Schema>", "str",
928955
"unknown value '" + str + '\''};
929956
}
@@ -984,6 +1011,12 @@ SType FromString(const std::string& str) {
9841011
if (str == "parent") {
9851012
return SType::Parent;
9861013
}
1014+
if (str == "nasdaq_symbol" || str == "nasdaq") {
1015+
return SType::NasdaqSymbol;
1016+
}
1017+
if (str == "cms_symbol" || str == "cms") {
1018+
return SType::CmsSymbol;
1019+
}
9871020
throw InvalidArgumentError{"FromString<SType>", "str",
9881021
"unknown value '" + str + '\''};
9891022
}

src/publishers.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@ const char* ToString(Dataset dataset) {
381381
case Dataset::XnasBasic: {
382382
return "XNAS.BASIC";
383383
}
384+
case Dataset::DbeqSummary: {
385+
return "DBEQ.SUMMARY";
386+
}
384387
default: {
385388
return "Unknown";
386389
}
@@ -487,6 +490,9 @@ Dataset FromString(const std::string& str) {
487490
if (str == "XNAS.BASIC") {
488491
return Dataset::XnasBasic;
489492
}
493+
if (str == "DBEQ.SUMMARY") {
494+
return Dataset::DbeqSummary;
495+
}
490496
throw InvalidArgumentError{"FromString<Dataset>", "str",
491497
"unknown value '" + str + '\''};
492498
}
@@ -760,6 +766,9 @@ Venue PublisherVenue(Publisher publisher) {
760766
case Publisher::XnasBasicXpsx: {
761767
return Venue::Xpsx;
762768
}
769+
case Publisher::DbeqSummaryDbeq: {
770+
return Venue::Dbeq;
771+
}
763772
default: {
764773
throw InvalidArgumentError{
765774
"PublisherVenue", "publisher",
@@ -1037,6 +1046,9 @@ Dataset PublisherDataset(Publisher publisher) {
10371046
case Publisher::XnasBasicXpsx: {
10381047
return Dataset::XnasBasic;
10391048
}
1049+
case Publisher::DbeqSummaryDbeq: {
1050+
return Dataset::DbeqSummary;
1051+
}
10401052
default: {
10411053
throw InvalidArgumentError{
10421054
"PublisherDataset", "publisher",
@@ -1315,6 +1327,9 @@ const char* ToString(Publisher publisher) {
13151327
case Publisher::XnasBasicXpsx: {
13161328
return "XNAS.BASIC.XPSX";
13171329
}
1330+
case Publisher::DbeqSummaryDbeq: {
1331+
return "DBEQ.SUMMARY.DBEQ";
1332+
}
13181333
default: {
13191334
return "Unknown";
13201335
}
@@ -1595,6 +1610,9 @@ Publisher FromString(const std::string& str) {
15951610
if (str == "XNAS.BASIC.XPSX") {
15961611
return Publisher::XnasBasicXpsx;
15971612
}
1613+
if (str == "DBEQ.SUMMARY.DBEQ") {
1614+
return Publisher::DbeqSummaryDbeq;
1615+
}
15981616
throw InvalidArgumentError{"FromString<Publisher>", "str",
15991617
"unknown value '" + str + '\''};
16001618
}

0 commit comments

Comments
 (0)