Skip to content

Commit 356d1ed

Browse files
authored
VER: Release 0.38.1
2 parents 44748d7 + 93e53b7 commit 356d1ed

21 files changed

+433
-196
lines changed

CHANGELOG.md

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

3+
4+
## 0.38.1 - 2025-06-25
5+
6+
### Enhancements
7+
- Added `range_by_schema` field to `DatasetRange` struct
8+
- Changed historical `TimeseriesGetRange` and `TimeseriesGetRangeToFile` methods to use
9+
a `POST` request to allow for requesting supported maximum of 2000 symbols
10+
- Added logging around `Historical::BatchDownload`
11+
- Changed the following Venue, Publisher, and Dataset descriptions:
12+
- "ICE Futures Europe (Financials)" renamed to "ICE Europe Financials"
13+
- "ICE Futures Europe (Commodities)" renamed to "ICE Europe Commodities"
14+
15+
### Bug fixes
16+
- Fixed handling of `null` `last_modified_date` in `MetadataGetDatasetCondition`
17+
response
18+
- Fixed default `ShouldLog` implementation
19+
320
## 0.38.0 - 2025-06-10
421

522
### Enhancements
@@ -161,8 +178,8 @@ upgrading data to version 3.
161178
## 0.31.0 - 2025-03-18
162179

163180
### Enhancements
164-
- Added new venues, datasets, and publishers for ICE Futures US, ICE Futures Europe
165-
(Financial products), Eurex, and European Energy Exchange (EEX)
181+
- Added new venues, datasets, and publishers for ICE Futures US, ICE Europe Financials
182+
products, Eurex, and European Energy Exchange (EEX)
166183

167184
## 0.30.0 - 2025-02-11
168185

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.0)
66

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

include/databento/datetime.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,22 @@ struct DateTimeRange {
3232
T end;
3333
};
3434
using DateRange = DateTimeRange<std::string>;
35+
36+
template <typename T>
37+
inline bool operator==(const DateTimeRange<T>& lhs,
38+
const DateTimeRange<T>& rhs) {
39+
return lhs.start == rhs.start && lhs.end == rhs.end;
40+
}
41+
template <typename T>
42+
inline bool operator!=(const DateTimeRange<T>& lhs,
43+
const DateTimeRange<T>& rhs) {
44+
return !(lhs == rhs);
45+
}
46+
47+
std::string ToString(const DateTimeRange<std::string>& dt_range);
48+
std::ostream& operator<<(std::ostream& stream,
49+
const DateTimeRange<std::string>& dt_range);
50+
std::string ToString(const DateTimeRange<UnixNanos>& dt_range);
51+
std::ostream& operator<<(std::ostream& stream,
52+
const DateTimeRange<UnixNanos>& dt_range);
3553
} // namespace databento

include/databento/detail/http_client.hpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,23 @@ class HttpClient {
2424
nlohmann::json GetJson(const std::string& path,
2525
const httplib::Params& params);
2626
nlohmann::json PostJson(const std::string& path,
27-
const httplib::Params& params);
27+
const httplib::Params& form_params);
2828
void GetRawStream(const std::string& path, const httplib::Params& params,
2929
const httplib::ContentReceiver& callback);
30+
void PostRawStream(const std::string& path,
31+
const httplib::Params& form_params,
32+
const httplib::ContentReceiver& callback);
3033

3134
private:
35+
static bool IsErrorStatus(int status_code);
36+
static httplib::ResponseHandler MakeStreamResponseHandler(int& out_status);
37+
static void CheckStatusAndStreamRes(const std::string& path, int status_code,
38+
std::string&& err_body,
39+
const httplib::Result& res);
40+
3241
nlohmann::json CheckAndParseResponse(const std::string& path,
3342
httplib::Result&& res) const;
3443
void CheckWarnings(const httplib::Response& response) const;
35-
static bool IsErrorStatus(int status_code);
3644

3745
static const httplib::Headers kHeaders;
3846

include/databento/detail/json_helpers.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <nlohmann/json.hpp>
55

66
#include <map> // multimap
7+
#include <optional>
78
#include <string>
89
#include <string_view>
910
#include <vector>
@@ -79,6 +80,10 @@ template <>
7980
std::string ParseAt(std::string_view endpoint, const nlohmann::json& json,
8081
std::string_view key);
8182
template <>
83+
std::optional<std::string> ParseAt(std::string_view endpoint,
84+
const nlohmann::json& json,
85+
std::string_view key);
86+
template <>
8287
std::uint64_t ParseAt(std::string_view endpoint, const nlohmann::json& json,
8388
std::string_view key);
8489
template <>

include/databento/historical.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,8 +230,6 @@ class Historical {
230230
using HttplibParams = std::multimap<std::string, std::string>;
231231

232232
BatchJob BatchSubmitJob(const HttplibParams& params);
233-
void StreamToFile(const std::string& url_path, const HttplibParams& params,
234-
const std::filesystem::path& file_path);
235233
void DownloadFile(const std::string& url,
236234
const std::filesystem::path& output_path);
237235
std::vector<BatchJob> BatchListJobs(const HttplibParams& params);

include/databento/log.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class ConsoleLogReceiver : public ILogReceiver {
3737

3838
void Receive(LogLevel level, const std::string& msg) override;
3939
bool ShouldLog(databento::LogLevel level) const override {
40-
return level > min_level_;
40+
return level >= min_level_;
4141
}
4242

4343
private:

include/databento/metadata.hpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@
22

33
#include <cstdint>
44
#include <map>
5+
#include <optional>
56
#include <ostream>
67
#include <string>
8+
#include <unordered_map>
79

10+
#include "databento/datetime.hpp"
811
#include "databento/enums.hpp" // FeedMode, DatasetCondition, Schema
912

1013
namespace databento {
@@ -28,12 +31,13 @@ struct UnitPricesForMode {
2831
struct DatasetConditionDetail {
2932
std::string date;
3033
DatasetCondition condition;
31-
std::string last_modified_date;
34+
std::optional<std::string> last_modified_date;
3235
};
3336

3437
struct DatasetRange {
3538
std::string start;
3639
std::string end;
40+
std::map<Schema, DateTimeRange<std::string>> range_by_schema;
3741
};
3842

3943
inline bool operator==(const PublisherDetail& lhs, const PublisherDetail& rhs) {
@@ -71,7 +75,8 @@ inline bool operator!=(const DatasetConditionDetail& lhs,
7175
}
7276

7377
inline bool operator==(const DatasetRange& lhs, const DatasetRange& rhs) {
74-
return lhs.start == rhs.start && lhs.end == rhs.end;
78+
return lhs.start == rhs.start && lhs.end == rhs.end &&
79+
lhs.range_by_schema == rhs.range_by_schema;
7580
}
7681
inline bool operator!=(const DatasetRange& lhs, const DatasetRange& rhs) {
7782
return !(lhs == rhs);

include/databento/publishers.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ enum class Venue : std::uint16_t {
8181
Bato = 36,
8282
// MEMX Options
8383
Mxop = 37,
84-
// ICE Futures Europe (Commodities)
84+
// ICE Europe Commodities
8585
Ifeu = 38,
8686
// ICE Endex
8787
Ndex = 39,
@@ -103,7 +103,7 @@ enum class Venue : std::uint16_t {
103103
Equs = 47,
104104
// ICE Futures US
105105
Ifus = 48,
106-
// ICE Futures Europe (Financials)
106+
// ICE Europe Financials
107107
Ifll = 49,
108108
// Eurex Exchange
109109
Xeur = 50,
@@ -167,7 +167,7 @@ enum class Dataset : std::uint16_t {
167167
XnasQbbo = 26,
168168
// Nasdaq NLS
169169
XnasNls = 27,
170-
// ICE Futures Europe (Commodities) iMpact
170+
// ICE Europe Commodities iMpact
171171
IfeuImpact = 28,
172172
// ICE Endex iMpact
173173
NdexImpact = 29,
@@ -185,7 +185,7 @@ enum class Dataset : std::uint16_t {
185185
EqusMini = 35,
186186
// ICE Futures US iMpact
187187
IfusImpact = 36,
188-
// ICE Futures Europe (Financials) iMpact
188+
// ICE Europe Financials iMpact
189189
IfllImpact = 37,
190190
// Eurex EOBI
191191
XeurEobi = 38,
@@ -307,7 +307,7 @@ enum class Publisher : std::uint16_t {
307307
EqusPlusFiny = 55,
308308
// Databento US Equities Plus - FINRA/Nasdaq TRF Chicago
309309
EqusPlusFinc = 56,
310-
// ICE Futures Europe (Commodities)
310+
// ICE Europe Commodities
311311
IfeuImpactIfeu = 57,
312312
// ICE Endex
313313
NdexImpactNdex = 58,
@@ -361,7 +361,7 @@ enum class Publisher : std::uint16_t {
361361
XnasBasicFinn = 82,
362362
// Nasdaq Basic - FINRA/Nasdaq TRF Chicago
363363
XnasBasicFinc = 83,
364-
// ICE Futures Europe - Off-Market Trades
364+
// ICE Europe - Off-Market Trades
365365
IfeuImpactXoff = 84,
366366
// ICE Endex - Off-Market Trades
367367
NdexImpactXoff = 85,
@@ -391,9 +391,9 @@ enum class Publisher : std::uint16_t {
391391
IfusImpactIfus = 97,
392392
// ICE Futures US - Off-Market Trades
393393
IfusImpactXoff = 98,
394-
// ICE Futures Europe (Financials)
394+
// ICE Europe Financials
395395
IfllImpactIfll = 99,
396-
// ICE Futures Europe (Financials) - Off-Market Trades
396+
// ICE Europe Financials - Off-Market Trades
397397
IfllImpactXoff = 100,
398398
// Eurex EOBI
399399
XeurEobiXeur = 101,

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

0 commit comments

Comments
 (0)