@@ -22,7 +22,7 @@ static constexpr auto kApiKey = "YOUR_API_KEY";
2222
2323int main () {
2424 auto client = HistoricalBuilder{}.SetKey(kApiKey).Build();
25- client.TimeseriesStream ("GLBX.MDP3", "2022-06-10", "2022-06-11", {"ES"},
25+ client.TimeseriesGetRange ("GLBX.MDP3", "2022-06-10", "2022-06-11", {"ES"},
2626 Schema::Trades, SType::Smart, SType::ProductId, {},
2727 {}, [ ] (const Record& record) {
2828 const auto& trade_msg = record.Get<TradeMsg >();
@@ -71,14 +71,16 @@ git clone https://github.com/databento/databento-cpp
7171cd databento-cpp
7272cmake -S . -B build \
7373 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
74- -DCMAKE_INSTALL_PREFIX=' /usr'
74+ -DCMAKE_INSTALL_PREFIX=' /usr' \
75+ -DDATABENTO_USE_EXTERNAL_JSON=ON \
76+ -DDATABENTO_USE_EXTERNAL_HTTPLIB=ON
7577cmake --build build --target databento
7678cmake --install build
7779```
7880
7981Then in your project's ` CMakeLists.txt ` , add the following:
8082``` cmake
81- find_package(databento 0.1 .0 REQUIRED)
83+ find_package(databento 0.4 .0 REQUIRED)
8284add_library(my_library)
8385target_link_libraries(my_library PRIVATE databento::databento)
8486```
@@ -87,10 +89,11 @@ target_link_libraries(my_library PRIVATE databento::databento)
8789
8890The minimum C++ standard is C++11 and CMake 3.14.
8991The library has the following dependencies:
90- - [ cpp-httplib (header only)] ( https://github.com/yhirose/cpp-httplib )
9192- [ OpenSSL] ( https://www.openssl.org/ )
92- - [ nlohmann_json (header only) ] ( https://github.com/nlohmann/json )
93+ - [ Libcrypto ] ( https://www.openssl.org/docs/man3.0/man7/crypto.html )
9394- [ Zstandard (zstd)] ( https://github.com/facebook/zstd )
95+ - [ nlohmann_json (header-only)] ( https://github.com/nlohmann/json )
96+ - [ cpp-httplib (header-only)] ( https://github.com/yhirose/cpp-httplib )
9497
9598By default, cpp-httplib and nlohmann_json are downloaded by CMake as part of the build process.
9699If you would like to use a local version of these libraries, enable the CMake flag
@@ -117,11 +120,19 @@ Tests are located in the `test` directory.
117120They're written using [ GoogleTest (gtest)] ( https://github.com/google/googletest ) .
118121The test target is ` databentoTests ` and can be build and run with the following commands:
119122``` sh
120- cmake -S . -B build # configure
123+ cmake -S . -B build -DDATABENTO_ENABLE_UNIT_TESTING=1 # configure
121124cmake --build build --target databentoTests # build
122125build/test/databentoTests # run
123126```
124127
128+ By default, it's assumed google test is installed already, if instead you'd like CMake to
129+ download it for you, disable the ` DATABENTO_USE_EXTERNAL_GTEST ` flag:
130+ ``` sh
131+ cmake -S . -B build \
132+ -DDATABENTO_ENABLE_UNIT_TESTING=1 \
133+ -DDATABENTO_USE_EXTERNAL_GTEST=0
134+ ```
135+
125136### Formatting
126137
127138databento-cpp uses [ ` clang-format ` ] ( https://clang.llvm.org/docs/ClangFormat.html ) with Google's style.
0 commit comments