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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## 0.32.0 - 2025-03-25
## 0.32.0 - 2025-04-02

### Enhancements
- Upgraded default date version to 3.0.3
- Updated `vcpkg` baseline

### Breaking changes
- Upgraded default cpp-httplib version to 0.20.0 which requires OpenSSL >= 3.0
Expand Down
17 changes: 7 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_BUILD_TYPE STREQUAL "Debug")
endif()

#
# Model project dependencies
# Project dependencies
#

find_package(OpenSSL REQUIRED)
find_package(Zstd REQUIRED)
find_package(Threads REQUIRED)

include(FetchContent)
# JSON
if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_JSON)
Expand Down Expand Up @@ -163,7 +167,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_HTTPLIB)
find_package(httplib REQUIRED)
endif()
else()
set(httplib_version 0.14.3)
set(httplib_version 0.20.0)
if(CMAKE_VERSION VERSION_LESS 3.24)
FetchContent_Declare(
httplib
Expand Down Expand Up @@ -195,7 +199,7 @@ if(${PROJECT_NAME_UPPERCASE}_USE_EXTERNAL_DATE)
find_package(date REQUIRED)
endif()
else()
set(date_version 3.0.1)
set(date_version 3.0.3)
if(CMAKE_VERSION VERSION_LESS 3.24)
FetchContent_Declare(
date_src
Expand All @@ -213,13 +217,6 @@ else()
# Ignore compiler warnings in headers
add_system_include_property(date)
endif()
# openSSL
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
set(HTTPLIB_IS_USING_OPENSSL TRUE)
endif()
find_package(Zstd REQUIRED)
find_package(Threads REQUIRED)

#
# Platform-specific dependencies
Expand Down
4 changes: 4 additions & 0 deletions cmake/FindZstd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ if(ZSTD_FOUND AND NOT TARGET zstd::zstd)
INTERFACE_INCLUDE_DIRECTORIES ${ZSTD_INCLUDE_DIR}
)
endif()
# cpp-httplib only searches for zstd::libzstd
if (NOT TARGET zstd::libzstd)
add_library(zstd::libzstd ALIAS zstd::zstd)
endif()

# Check if the Conan-provided target exists
if(TARGET zstd::libzstd_static)
Expand Down
23 changes: 13 additions & 10 deletions include/databento/historical.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ class Historical {
* Batch API
*/

// Submits a new batch job and returns a description of the job.
//
// WARNING: Calling this method will incur a cost.
BatchJob BatchSubmitJob(const std::string& dataset,
const std::vector<std::string>& symbols,
Schema schema,
Expand All @@ -63,11 +66,13 @@ class Historical {
bool split_symbols, SplitDuration split_duration,
std::uint64_t split_size, Delivery delivery,
SType stype_in, SType stype_out, std::uint64_t limit);
// Lists previous batch jobs.
std::vector<BatchJob> BatchListJobs();
std::vector<BatchJob> BatchListJobs(const std::vector<JobState>& states,
UnixNanos since);
std::vector<BatchJob> BatchListJobs(const std::vector<JobState>& states,
const std::string& since);
// Lists all files associated with a batch job.
std::vector<BatchFileDesc> BatchListFiles(const std::string& job_id);
// Returns the paths of the downloaded files.
std::vector<std::string> BatchDownload(const std::string& output_dir,
Expand Down Expand Up @@ -160,12 +165,15 @@ class Historical {
* Timeseries API
*/

// Stream historical market data to `record_callback`. This method will
// return only after all data has been returned or `record_callback` returns
// `KeepGoing::Stop`.
// Stream historical market data to `record_callback`. `metadata_callback`
// will be called exactly once, before any calls to `record_callback`.
// This method will return only after all data has been returned or
// `record_callback` returns `KeepGoing::Stop`.
//
// NOTE: This method spawns a thread, however, the callbacks will be called
// from the current thread.
//
// WARNING: Calling this method will incur a cost.
void TimeseriesGetRange(const std::string& dataset,
const DateTimeRange<UnixNanos>& datetime_range,
const std::vector<std::string>& symbols,
Expand All @@ -174,13 +182,6 @@ class Historical {
const DateTimeRange<std::string>& datetime_range,
const std::vector<std::string>& symbols,
Schema schema, const RecordCallback& record_callback);
// Stream historical market data to `record_callback`. `metadata_callback`
// will be called exactly once, before any calls to `record_callback`.
// This method will return only after all data has been returned or
// `record_callback` returns `KeepGoing::Stop`.
//
// NOTE: This method spawns a thread, however, the callbacks will be called
// from the current thread.
void TimeseriesGetRange(const std::string& dataset,
const DateTimeRange<UnixNanos>& datetime_range,
const std::vector<std::string>& symbols,
Expand All @@ -199,6 +200,8 @@ class Historical {
// object for replaying the data in `file_path`.
//
// If a file at `file_path` already exists, it will be overwritten.
//
// WARNING: Calling this method will incur a cost.
DbnFileStore TimeseriesGetRangeToFile(
const std::string& dataset,
const DateTimeRange<UnixNanos>& datetime_range,
Expand Down
6 changes: 3 additions & 3 deletions tests/cmake_import/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ add_test(
${CMAKE_COMMAND}
-G "${CMAKE_GENERATOR}"
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-Ddatabento_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/databento
-Ddatabento_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/databento
-Dnlohmann_json_DIR=${nlohmann_json_BINARY_DIR}
-Ddate_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/date
-Dhttplib_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/lib/cmake/httplib
-Ddate_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/date
-Dhttplib_DIR=${CMAKE_CURRENT_BINARY_DIR}/pkg/${CMAKE_INSTALL_LIBDIR}/cmake/httplib
${CMAKE_CURRENT_SOURCE_DIR}/project
)
# Build test project
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"openssl",
"zstd"
],
"builtin-baseline": "d1e11918f5c88c1dd364b93e1452fea69bacd479"
"builtin-baseline": "b02e341c927f16d991edbd915d8ea43eac52096c"
}
Loading