diff --git a/CHANGELOG.md b/CHANGELOG.md index 6f0e034..6d3622f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## 0.22.0 - 2024-08-27 + +### Enhancements +- Added `Intraday` variant to `DatasetCondition` in preparation for intraday data being + available from the historical API +- Renamed `example` directory to `examples` +- Renamed `test` directory to `tests` +- Added new publisher values for `XCIS.BBOTRADES` and `XNYS.BBOTRADES` + +### Breaking changes +- Removed previously deprecated `DatasetCondition::Bad` variant + ## 0.21.0 - 2024-07-30 ### Enhancements diff --git a/CMakeLists.txt b/CMakeLists.txt index bc6df46..9a87a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.14) # Project details # -project("databento" VERSION 0.21.0 LANGUAGES CXX) +project("databento" VERSION 0.22.0 LANGUAGES CXX) string(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UPPERCASE) # @@ -421,12 +421,12 @@ if(${PROJECT_NAME_UPPERCASE}_ENABLE_UNIT_TESTING) unset(CMAKE_CXX_CLANG_TIDY) # disable clang-tidy for tests enable_testing() message(STATUS "Build unit tests for the project.") - add_subdirectory(test) + add_subdirectory(tests) endif() if(${PROJECT_NAME_UPPERCASE}_ENABLE_EXAMPLES) unset(CMAKE_CXX_CPPCHECK) # disable cppcheck for examples unset(CMAKE_CXX_CLANG_TIDY) # disable clang-tidy for examples message(STATUS "Build examples for the project.") - add_subdirectory(example) + add_subdirectory(examples) endif() diff --git a/example/CMakeLists.txt b/examples/CMakeLists.txt similarity index 100% rename from example/CMakeLists.txt rename to examples/CMakeLists.txt diff --git a/example/historical/CMakeLists.txt b/examples/historical/CMakeLists.txt similarity index 100% rename from example/historical/CMakeLists.txt rename to examples/historical/CMakeLists.txt diff --git a/example/historical/batch.cpp b/examples/historical/batch.cpp similarity index 100% rename from example/historical/batch.cpp rename to examples/historical/batch.cpp diff --git a/example/historical/metadata.cpp b/examples/historical/metadata.cpp similarity index 100% rename from example/historical/metadata.cpp rename to examples/historical/metadata.cpp diff --git a/example/historical/readme.cpp b/examples/historical/readme.cpp similarity index 100% rename from example/historical/readme.cpp rename to examples/historical/readme.cpp diff --git a/example/historical/symbology_resolve.cpp b/examples/historical/symbology_resolve.cpp similarity index 100% rename from example/historical/symbology_resolve.cpp rename to examples/historical/symbology_resolve.cpp diff --git a/example/historical/timeseries_get_range.cpp b/examples/historical/timeseries_get_range.cpp similarity index 100% rename from example/historical/timeseries_get_range.cpp rename to examples/historical/timeseries_get_range.cpp diff --git a/example/historical/timeseries_get_range_to_file.cpp b/examples/historical/timeseries_get_range_to_file.cpp similarity index 100% rename from example/historical/timeseries_get_range_to_file.cpp rename to examples/historical/timeseries_get_range_to_file.cpp diff --git a/example/live/CMakeLists.txt b/examples/live/CMakeLists.txt similarity index 68% rename from example/live/CMakeLists.txt rename to examples/live/CMakeLists.txt index fb37d07..cb1d9c6 100644 --- a/example/live/CMakeLists.txt +++ b/examples/live/CMakeLists.txt @@ -2,3 +2,4 @@ cmake_minimum_required(VERSION 3.14) add_example_target(live-readme readme.cpp) add_example_target(simple simple.cpp) +add_example_target(live-smoke-test live_smoke_test.cpp) diff --git a/examples/live/live_smoke_test.cpp b/examples/live/live_smoke_test.cpp new file mode 100644 index 0000000..6109620 --- /dev/null +++ b/examples/live/live_smoke_test.cpp @@ -0,0 +1,210 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +using namespace databento; + +std::vector SplitSymbols(const std::string& symbols) { + std::vector result; + std::stringstream ss(symbols); + + std::string buffer; + while (std::getline(ss, buffer, ',')) { + result.push_back(buffer); + } + + return result; +} + +std::pair TryConvertToUnixNanos(const char* start) { + std::stringstream ss(start); + std::size_t pos; + const uint64_t result = std::stoul(start, &pos, 10); + if (pos != std::strlen(start)) { + return std::make_pair(false, UnixNanos{}); + } + + return std::make_pair(true, UnixNanos{std::chrono::nanoseconds(result)}); +} + +void ProcessRecords(LiveBlocking& client, Schema schema, + bool start_from_epoch) { + client.Start(); + + std::cout << "Starting client...\n"; + + // For start != 0 we stop at SymbolMappingMsg so that the tests can be run + // outside trading hours + auto expected_rtype = Record::RTypeFromSchema(schema); + if (!start_from_epoch) { + expected_rtype = databento::rtype::SymbolMapping; + } + + constexpr auto timeout = std::chrono::seconds{30}; + + while (auto record = client.NextRecord(timeout)) { + if (record->RType() == expected_rtype) { + std::cout << "Received expected record type " << expected_rtype << '\n'; + break; + } else if (auto* msg = record->GetIf()) { + std::stringstream ss; + ss << "Received error " << msg->Err() << '\n'; + std::cerr << ss.str(); + throw std::runtime_error(ss.str()); + } + } + + std::cout << "Finished client\n"; +} + +void ProcessSnapshotRecords(LiveBlocking& client, Schema schema) { + client.Start(); + + std::cout << "Starting client...\n"; + + const auto expected_rtype = Record::RTypeFromSchema(schema); + + constexpr auto timeout = std::chrono::seconds{30}; + + auto received_snapshot_record = false; + + while (auto record = client.NextRecord(timeout)) { + if (auto* mbo_msg = record->GetIf()) { + if (mbo_msg->flags.IsSnapshot()) { + received_snapshot_record = true; + } else { + std::cout << "Received expected record type " << expected_rtype << '\n'; + break; + } + } else if (auto* error_msg = record->GetIf()) { + std::stringstream ss; + ss << "Received error " << error_msg->Err() << '\n'; + throw std::runtime_error(ss.str()); + } + } + + std::cout << "Finished client\n"; + + if (!received_snapshot_record) { + throw std::runtime_error("Did not receive snapshot record"); + } +} + +class ArgParser { + public: + struct Arg { + const std::string name; + const std::string arg; + const char* value = nullptr; + }; + + void Add(Arg arg) { args.emplace_back(arg); } + + void Parse(int argc, char* argv[]) { + for (auto i = 1; i < argc;) { + const auto cur_arg = argv[i]; + auto it = std::find_if( + args.begin(), args.end(), + [&cur_arg](const auto& arg) { return cur_arg == arg.arg; }); + if (it != args.end()) { + it->value = argv[i + 1]; + } + i += 2; + } + } + + const char* Get(const std::string& arg_name) const { + auto it = std::find_if( + args.begin(), args.end(), + [&arg_name](const auto& arg) { return arg_name == arg.name; }); + + if (it == args.end()) { + return nullptr; + } + + return it->value; + } + + private: + std::vector args; +}; + +ArgParser ParseArgs(int argc, char* argv[] + +) { + ArgParser parser; + parser.Add(ArgParser::Arg{"gateway", "--gateway"}); + parser.Add(ArgParser::Arg{"port", "--port", "13000"}); + parser.Add(ArgParser::Arg{"api_key_env_var", "--api-key-env-var", + "DATABENTO_API_KEY"}); + parser.Add(ArgParser::Arg{"dataset", "--dataset"}); + parser.Add(ArgParser::Arg{"schema", "--schema"}); + parser.Add(ArgParser::Arg{"stype", "--stype"}); + parser.Add(ArgParser::Arg{"symbols", "--symbols"}); + parser.Add(ArgParser::Arg{"start", "--start"}); + parser.Add(ArgParser::Arg{"use_snapshot", "--use-snapshot", "0"}); + + parser.Parse(argc, argv); + + return parser; +} + +int main(int argc, char* argv[]) { + const auto parser = ParseArgs(argc, argv); + + const auto gateway = parser.Get("gateway"); + const auto port = std::atoi(parser.Get("port")); + const auto api_key_env_var = parser.Get("api_key_env_var"); + const auto dataset = FromString(parser.Get("dataset")); + const auto schema = FromString(parser.Get("schema")); + const auto stype = FromString(parser.Get("stype")); + const auto symbols = SplitSymbols(parser.Get("symbols")); + const auto start = parser.Get("start"); + const auto use_snapshot = std::atoi(parser.Get("use_snapshot")); + + const auto api_key = std::getenv(api_key_env_var); + assert(api_key); + + auto client = LiveBuilder{} + .SetAddress(gateway, static_cast(port)) + .SetKey(std::string{api_key}) + .SetDataset(dataset) + .BuildBlocking(); + + bool start_from_epoch = false; + + if (use_snapshot) { + client.SubscribeWithSnapshot(symbols, schema, stype); + } else if (start) { + const auto converted = TryConvertToUnixNanos(start); + if (converted.first) { + start_from_epoch = converted.second.time_since_epoch().count() == 0; + client.Subscribe(symbols, schema, stype, converted.second); + } else { + client.Subscribe(symbols, schema, stype, start); + } + } else { + client.Subscribe(symbols, schema, stype); + } + + if (use_snapshot) { + ProcessSnapshotRecords(client, schema); + } else { + ProcessRecords(client, schema, start_from_epoch); + } + + std::cout << "Finished client\n"; + + return 0; +} diff --git a/example/live/readme.cpp b/examples/live/readme.cpp similarity index 100% rename from example/live/readme.cpp rename to examples/live/readme.cpp diff --git a/example/live/simple.cpp b/examples/live/simple.cpp similarity index 100% rename from example/live/simple.cpp rename to examples/live/simple.cpp diff --git a/include/databento/enums.hpp b/include/databento/enums.hpp index ba64920..a3150f7 100644 --- a/include/databento/enums.hpp +++ b/include/databento/enums.hpp @@ -114,7 +114,7 @@ enum class DatasetCondition : std::uint8_t { Degraded, Pending, Missing, - Bad, // Deprecated + Intraday, }; // Sentinel values for different DBN record types. diff --git a/include/databento/publishers.hpp b/include/databento/publishers.hpp index 6b78e1a..ff4904f 100644 --- a/include/databento/publishers.hpp +++ b/include/databento/publishers.hpp @@ -157,10 +157,14 @@ enum class Dataset : std::uint16_t { NdexImpact = 29, // Databento Equities Max DbeqMax = 30, - // Nasdaq Basic (NLS+QBBO) + // Nasdaq Basic (NLS and QBBO) XnasBasic = 31, // Databento Equities Summary DbeqSummary = 32, + // NYSE National BBO and Trades + XcisBbotrades = 33, + // NYSE BBO and Trades + XnysBbotrades = 34, }; // A specific Venue from a specific data source. @@ -345,6 +349,10 @@ enum class Publisher : std::uint16_t { XnasBasicXpsx = 89, // Databento Equities Summary DbeqSummaryDbeq = 90, + // NYSE National BBO and Trades + XcisBbotradesXcis = 91, + // NYSE BBO and Trades + XnysBbotradesXnys = 92, }; // Get a Publisher's Venue. diff --git a/pkg/PKGBUILD b/pkg/PKGBUILD index 57c9baa..9cb0754 100644 --- a/pkg/PKGBUILD +++ b/pkg/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Databento _pkgname=databento-cpp pkgname=databento-cpp-git -pkgver=0.21.0 +pkgver=0.22.0 pkgrel=1 pkgdesc="Official C++ client for Databento" arch=('any') diff --git a/src/enums.cpp b/src/enums.cpp index 2bf2b56..46ae00a 100644 --- a/src/enums.cpp +++ b/src/enums.cpp @@ -251,8 +251,8 @@ const char* ToString(DatasetCondition condition) { case DatasetCondition::Missing: { return "missing"; } - case DatasetCondition::Bad: { // Deprecated - return "bad"; + case DatasetCondition::Intraday: { + return "intraday"; } default: { return "unknown"; @@ -1104,8 +1104,8 @@ DatasetCondition FromString(const std::string& str) { if (str == "missing") { return DatasetCondition::Missing; } - if (str == "bad") { - return DatasetCondition::Bad; // Deprecated + if (str == "intraday") { + return DatasetCondition::Intraday; } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; diff --git a/src/publishers.cpp b/src/publishers.cpp index aebae49..f762160 100644 --- a/src/publishers.cpp +++ b/src/publishers.cpp @@ -384,6 +384,12 @@ const char* ToString(Dataset dataset) { case Dataset::DbeqSummary: { return "DBEQ.SUMMARY"; } + case Dataset::XcisBbotrades: { + return "XCIS.BBOTRADES"; + } + case Dataset::XnysBbotrades: { + return "XNYS.BBOTRADES"; + } default: { return "Unknown"; } @@ -493,6 +499,12 @@ Dataset FromString(const std::string& str) { if (str == "DBEQ.SUMMARY") { return Dataset::DbeqSummary; } + if (str == "XCIS.BBOTRADES") { + return Dataset::XcisBbotrades; + } + if (str == "XNYS.BBOTRADES") { + return Dataset::XnysBbotrades; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; } @@ -769,6 +781,12 @@ Venue PublisherVenue(Publisher publisher) { case Publisher::DbeqSummaryDbeq: { return Venue::Dbeq; } + case Publisher::XcisBbotradesXcis: { + return Venue::Xcis; + } + case Publisher::XnysBbotradesXnys: { + return Venue::Xnys; + } default: { throw InvalidArgumentError{ "PublisherVenue", "publisher", @@ -1049,6 +1067,12 @@ Dataset PublisherDataset(Publisher publisher) { case Publisher::DbeqSummaryDbeq: { return Dataset::DbeqSummary; } + case Publisher::XcisBbotradesXcis: { + return Dataset::XcisBbotrades; + } + case Publisher::XnysBbotradesXnys: { + return Dataset::XnysBbotrades; + } default: { throw InvalidArgumentError{ "PublisherDataset", "publisher", @@ -1330,6 +1354,12 @@ const char* ToString(Publisher publisher) { case Publisher::DbeqSummaryDbeq: { return "DBEQ.SUMMARY.DBEQ"; } + case Publisher::XcisBbotradesXcis: { + return "XCIS.BBOTRADES.XCIS"; + } + case Publisher::XnysBbotradesXnys: { + return "XNYS.BBOTRADES.XNYS"; + } default: { return "Unknown"; } @@ -1613,6 +1643,12 @@ Publisher FromString(const std::string& str) { if (str == "DBEQ.SUMMARY.DBEQ") { return Publisher::DbeqSummaryDbeq; } + if (str == "XCIS.BBOTRADES.XCIS") { + return Publisher::XcisBbotradesXcis; + } + if (str == "XNYS.BBOTRADES.XNYS") { + return Publisher::XnysBbotradesXnys; + } throw InvalidArgumentError{"FromString", "str", "unknown value '" + str + '\''}; } diff --git a/test/CMakeLists.txt b/tests/CMakeLists.txt similarity index 100% rename from test/CMakeLists.txt rename to tests/CMakeLists.txt diff --git a/test/cmake_fetch_content/CMakeLists.txt b/tests/cmake_fetch_content/CMakeLists.txt similarity index 100% rename from test/cmake_fetch_content/CMakeLists.txt rename to tests/cmake_fetch_content/CMakeLists.txt diff --git a/test/cmake_fetch_content/project/CMakeLists.txt b/tests/cmake_fetch_content/project/CMakeLists.txt similarity index 100% rename from test/cmake_fetch_content/project/CMakeLists.txt rename to tests/cmake_fetch_content/project/CMakeLists.txt diff --git a/test/cmake_fetch_content/project/main.cpp b/tests/cmake_fetch_content/project/main.cpp similarity index 100% rename from test/cmake_fetch_content/project/main.cpp rename to tests/cmake_fetch_content/project/main.cpp diff --git a/test/cmake_import/CMakeLists.txt b/tests/cmake_import/CMakeLists.txt similarity index 100% rename from test/cmake_import/CMakeLists.txt rename to tests/cmake_import/CMakeLists.txt diff --git a/test/cmake_import/project/CMakeLists.txt b/tests/cmake_import/project/CMakeLists.txt similarity index 100% rename from test/cmake_import/project/CMakeLists.txt rename to tests/cmake_import/project/CMakeLists.txt diff --git a/test/cmake_import/project/main.cpp b/tests/cmake_import/project/main.cpp similarity index 100% rename from test/cmake_import/project/main.cpp rename to tests/cmake_import/project/main.cpp diff --git a/test/data/multi-frame.definition.v1.dbn.zst b/tests/data/multi-frame.definition.v1.dbn.zst similarity index 100% rename from test/data/multi-frame.definition.v1.dbn.zst rename to tests/data/multi-frame.definition.v1.dbn.zst diff --git a/test/data/test_data.cbbo.dbn b/tests/data/test_data.cbbo.dbn similarity index 100% rename from test/data/test_data.cbbo.dbn rename to tests/data/test_data.cbbo.dbn diff --git a/test/data/test_data.cbbo.dbn.zst b/tests/data/test_data.cbbo.dbn.zst similarity index 100% rename from test/data/test_data.cbbo.dbn.zst rename to tests/data/test_data.cbbo.dbn.zst diff --git a/test/data/test_data.cbbo.v1.dbn b/tests/data/test_data.cbbo.v1.dbn similarity index 100% rename from test/data/test_data.cbbo.v1.dbn rename to tests/data/test_data.cbbo.v1.dbn diff --git a/test/data/test_data.cbbo.v1.dbn.zst b/tests/data/test_data.cbbo.v1.dbn.zst similarity index 100% rename from test/data/test_data.cbbo.v1.dbn.zst rename to tests/data/test_data.cbbo.v1.dbn.zst diff --git a/test/data/test_data.definition.dbn b/tests/data/test_data.definition.dbn similarity index 100% rename from test/data/test_data.definition.dbn rename to tests/data/test_data.definition.dbn diff --git a/test/data/test_data.definition.dbn.zst b/tests/data/test_data.definition.dbn.zst similarity index 100% rename from test/data/test_data.definition.dbn.zst rename to tests/data/test_data.definition.dbn.zst diff --git a/test/data/test_data.definition.v1.dbn b/tests/data/test_data.definition.v1.dbn similarity index 100% rename from test/data/test_data.definition.v1.dbn rename to tests/data/test_data.definition.v1.dbn diff --git a/test/data/test_data.definition.v1.dbn.zst b/tests/data/test_data.definition.v1.dbn.zst similarity index 100% rename from test/data/test_data.definition.v1.dbn.zst rename to tests/data/test_data.definition.v1.dbn.zst diff --git a/test/data/test_data.imbalance.dbn b/tests/data/test_data.imbalance.dbn similarity index 100% rename from test/data/test_data.imbalance.dbn rename to tests/data/test_data.imbalance.dbn diff --git a/test/data/test_data.imbalance.dbn.zst b/tests/data/test_data.imbalance.dbn.zst similarity index 100% rename from test/data/test_data.imbalance.dbn.zst rename to tests/data/test_data.imbalance.dbn.zst diff --git a/test/data/test_data.imbalance.v1.dbn b/tests/data/test_data.imbalance.v1.dbn similarity index 100% rename from test/data/test_data.imbalance.v1.dbn rename to tests/data/test_data.imbalance.v1.dbn diff --git a/test/data/test_data.imbalance.v1.dbn.zst b/tests/data/test_data.imbalance.v1.dbn.zst similarity index 100% rename from test/data/test_data.imbalance.v1.dbn.zst rename to tests/data/test_data.imbalance.v1.dbn.zst diff --git a/test/data/test_data.mbo.dbn b/tests/data/test_data.mbo.dbn similarity index 100% rename from test/data/test_data.mbo.dbn rename to tests/data/test_data.mbo.dbn diff --git a/test/data/test_data.mbo.dbn.zst b/tests/data/test_data.mbo.dbn.zst similarity index 100% rename from test/data/test_data.mbo.dbn.zst rename to tests/data/test_data.mbo.dbn.zst diff --git a/test/data/test_data.mbo.dbz b/tests/data/test_data.mbo.dbz similarity index 100% rename from test/data/test_data.mbo.dbz rename to tests/data/test_data.mbo.dbz diff --git a/test/data/test_data.mbo.v1.dbn b/tests/data/test_data.mbo.v1.dbn similarity index 100% rename from test/data/test_data.mbo.v1.dbn rename to tests/data/test_data.mbo.v1.dbn diff --git a/test/data/test_data.mbo.v1.dbn.zst b/tests/data/test_data.mbo.v1.dbn.zst similarity index 100% rename from test/data/test_data.mbo.v1.dbn.zst rename to tests/data/test_data.mbo.v1.dbn.zst diff --git a/test/data/test_data.mbp-1.dbn b/tests/data/test_data.mbp-1.dbn similarity index 100% rename from test/data/test_data.mbp-1.dbn rename to tests/data/test_data.mbp-1.dbn diff --git a/test/data/test_data.mbp-1.dbn.zst b/tests/data/test_data.mbp-1.dbn.zst similarity index 100% rename from test/data/test_data.mbp-1.dbn.zst rename to tests/data/test_data.mbp-1.dbn.zst diff --git a/test/data/test_data.mbp-1.v1.dbn b/tests/data/test_data.mbp-1.v1.dbn similarity index 100% rename from test/data/test_data.mbp-1.v1.dbn rename to tests/data/test_data.mbp-1.v1.dbn diff --git a/test/data/test_data.mbp-1.v1.dbn.zst b/tests/data/test_data.mbp-1.v1.dbn.zst similarity index 100% rename from test/data/test_data.mbp-1.v1.dbn.zst rename to tests/data/test_data.mbp-1.v1.dbn.zst diff --git a/test/data/test_data.mbp-10.dbn b/tests/data/test_data.mbp-10.dbn similarity index 100% rename from test/data/test_data.mbp-10.dbn rename to tests/data/test_data.mbp-10.dbn diff --git a/test/data/test_data.mbp-10.dbn.zst b/tests/data/test_data.mbp-10.dbn.zst similarity index 100% rename from test/data/test_data.mbp-10.dbn.zst rename to tests/data/test_data.mbp-10.dbn.zst diff --git a/test/data/test_data.mbp-10.v1.dbn b/tests/data/test_data.mbp-10.v1.dbn similarity index 100% rename from test/data/test_data.mbp-10.v1.dbn rename to tests/data/test_data.mbp-10.v1.dbn diff --git a/test/data/test_data.mbp-10.v1.dbn.zst b/tests/data/test_data.mbp-10.v1.dbn.zst similarity index 100% rename from test/data/test_data.mbp-10.v1.dbn.zst rename to tests/data/test_data.mbp-10.v1.dbn.zst diff --git a/test/data/test_data.ohlcv-1d.dbn b/tests/data/test_data.ohlcv-1d.dbn similarity index 100% rename from test/data/test_data.ohlcv-1d.dbn rename to tests/data/test_data.ohlcv-1d.dbn diff --git a/test/data/test_data.ohlcv-1d.dbn.zst b/tests/data/test_data.ohlcv-1d.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1d.dbn.zst rename to tests/data/test_data.ohlcv-1d.dbn.zst diff --git a/test/data/test_data.ohlcv-1d.v1.dbn b/tests/data/test_data.ohlcv-1d.v1.dbn similarity index 100% rename from test/data/test_data.ohlcv-1d.v1.dbn rename to tests/data/test_data.ohlcv-1d.v1.dbn diff --git a/test/data/test_data.ohlcv-1d.v1.dbn.zst b/tests/data/test_data.ohlcv-1d.v1.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1d.v1.dbn.zst rename to tests/data/test_data.ohlcv-1d.v1.dbn.zst diff --git a/test/data/test_data.ohlcv-1h.dbn b/tests/data/test_data.ohlcv-1h.dbn similarity index 100% rename from test/data/test_data.ohlcv-1h.dbn rename to tests/data/test_data.ohlcv-1h.dbn diff --git a/test/data/test_data.ohlcv-1h.dbn.zst b/tests/data/test_data.ohlcv-1h.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1h.dbn.zst rename to tests/data/test_data.ohlcv-1h.dbn.zst diff --git a/test/data/test_data.ohlcv-1h.v1.dbn b/tests/data/test_data.ohlcv-1h.v1.dbn similarity index 100% rename from test/data/test_data.ohlcv-1h.v1.dbn rename to tests/data/test_data.ohlcv-1h.v1.dbn diff --git a/test/data/test_data.ohlcv-1h.v1.dbn.zst b/tests/data/test_data.ohlcv-1h.v1.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1h.v1.dbn.zst rename to tests/data/test_data.ohlcv-1h.v1.dbn.zst diff --git a/test/data/test_data.ohlcv-1m.dbn b/tests/data/test_data.ohlcv-1m.dbn similarity index 100% rename from test/data/test_data.ohlcv-1m.dbn rename to tests/data/test_data.ohlcv-1m.dbn diff --git a/test/data/test_data.ohlcv-1m.dbn.zst b/tests/data/test_data.ohlcv-1m.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1m.dbn.zst rename to tests/data/test_data.ohlcv-1m.dbn.zst diff --git a/test/data/test_data.ohlcv-1m.v1.dbn b/tests/data/test_data.ohlcv-1m.v1.dbn similarity index 100% rename from test/data/test_data.ohlcv-1m.v1.dbn rename to tests/data/test_data.ohlcv-1m.v1.dbn diff --git a/test/data/test_data.ohlcv-1m.v1.dbn.zst b/tests/data/test_data.ohlcv-1m.v1.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1m.v1.dbn.zst rename to tests/data/test_data.ohlcv-1m.v1.dbn.zst diff --git a/test/data/test_data.ohlcv-1s.dbn b/tests/data/test_data.ohlcv-1s.dbn similarity index 100% rename from test/data/test_data.ohlcv-1s.dbn rename to tests/data/test_data.ohlcv-1s.dbn diff --git a/test/data/test_data.ohlcv-1s.dbn.zst b/tests/data/test_data.ohlcv-1s.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1s.dbn.zst rename to tests/data/test_data.ohlcv-1s.dbn.zst diff --git a/test/data/test_data.ohlcv-1s.v1.dbn b/tests/data/test_data.ohlcv-1s.v1.dbn similarity index 100% rename from test/data/test_data.ohlcv-1s.v1.dbn rename to tests/data/test_data.ohlcv-1s.v1.dbn diff --git a/test/data/test_data.ohlcv-1s.v1.dbn.zst b/tests/data/test_data.ohlcv-1s.v1.dbn.zst similarity index 100% rename from test/data/test_data.ohlcv-1s.v1.dbn.zst rename to tests/data/test_data.ohlcv-1s.v1.dbn.zst diff --git a/test/data/test_data.statistics.dbn b/tests/data/test_data.statistics.dbn similarity index 100% rename from test/data/test_data.statistics.dbn rename to tests/data/test_data.statistics.dbn diff --git a/test/data/test_data.statistics.dbn.zst b/tests/data/test_data.statistics.dbn.zst similarity index 100% rename from test/data/test_data.statistics.dbn.zst rename to tests/data/test_data.statistics.dbn.zst diff --git a/test/data/test_data.statistics.v1.dbn b/tests/data/test_data.statistics.v1.dbn similarity index 100% rename from test/data/test_data.statistics.v1.dbn rename to tests/data/test_data.statistics.v1.dbn diff --git a/test/data/test_data.statistics.v1.dbn.zst b/tests/data/test_data.statistics.v1.dbn.zst similarity index 100% rename from test/data/test_data.statistics.v1.dbn.zst rename to tests/data/test_data.statistics.v1.dbn.zst diff --git a/test/data/test_data.tbbo.dbn b/tests/data/test_data.tbbo.dbn similarity index 100% rename from test/data/test_data.tbbo.dbn rename to tests/data/test_data.tbbo.dbn diff --git a/test/data/test_data.tbbo.dbn.zst b/tests/data/test_data.tbbo.dbn.zst similarity index 100% rename from test/data/test_data.tbbo.dbn.zst rename to tests/data/test_data.tbbo.dbn.zst diff --git a/test/data/test_data.tbbo.v1.dbn b/tests/data/test_data.tbbo.v1.dbn similarity index 100% rename from test/data/test_data.tbbo.v1.dbn rename to tests/data/test_data.tbbo.v1.dbn diff --git a/test/data/test_data.tbbo.v1.dbn.zst b/tests/data/test_data.tbbo.v1.dbn.zst similarity index 100% rename from test/data/test_data.tbbo.v1.dbn.zst rename to tests/data/test_data.tbbo.v1.dbn.zst diff --git a/test/data/test_data.trades.dbn b/tests/data/test_data.trades.dbn similarity index 100% rename from test/data/test_data.trades.dbn rename to tests/data/test_data.trades.dbn diff --git a/test/data/test_data.trades.dbn.zst b/tests/data/test_data.trades.dbn.zst similarity index 100% rename from test/data/test_data.trades.dbn.zst rename to tests/data/test_data.trades.dbn.zst diff --git a/test/data/test_data.trades.v1.dbn b/tests/data/test_data.trades.v1.dbn similarity index 100% rename from test/data/test_data.trades.v1.dbn rename to tests/data/test_data.trades.v1.dbn diff --git a/test/data/test_data.trades.v1.dbn.zst b/tests/data/test_data.trades.v1.dbn.zst similarity index 100% rename from test/data/test_data.trades.v1.dbn.zst rename to tests/data/test_data.trades.v1.dbn.zst diff --git a/test/include/mock/mock_http_server.hpp b/tests/include/mock/mock_http_server.hpp similarity index 100% rename from test/include/mock/mock_http_server.hpp rename to tests/include/mock/mock_http_server.hpp diff --git a/test/include/mock/mock_io.hpp b/tests/include/mock/mock_io.hpp similarity index 100% rename from test/include/mock/mock_io.hpp rename to tests/include/mock/mock_io.hpp diff --git a/test/include/mock/mock_lsg_server.hpp b/tests/include/mock/mock_lsg_server.hpp similarity index 100% rename from test/include/mock/mock_lsg_server.hpp rename to tests/include/mock/mock_lsg_server.hpp diff --git a/test/include/mock/mock_tcp_server.hpp b/tests/include/mock/mock_tcp_server.hpp similarity index 100% rename from test/include/mock/mock_tcp_server.hpp rename to tests/include/mock/mock_tcp_server.hpp diff --git a/test/include/temp_file.hpp b/tests/include/temp_file.hpp similarity index 100% rename from test/include/temp_file.hpp rename to tests/include/temp_file.hpp diff --git a/test/src/batch_tests.cpp b/tests/src/batch_tests.cpp similarity index 100% rename from test/src/batch_tests.cpp rename to tests/src/batch_tests.cpp diff --git a/test/src/datetime_tests.cpp b/tests/src/datetime_tests.cpp similarity index 100% rename from test/src/datetime_tests.cpp rename to tests/src/datetime_tests.cpp diff --git a/test/src/dbn_decoder_tests.cpp b/tests/src/dbn_decoder_tests.cpp similarity index 100% rename from test/src/dbn_decoder_tests.cpp rename to tests/src/dbn_decoder_tests.cpp diff --git a/test/src/dbn_encoder_tests.cpp b/tests/src/dbn_encoder_tests.cpp similarity index 100% rename from test/src/dbn_encoder_tests.cpp rename to tests/src/dbn_encoder_tests.cpp diff --git a/test/src/dbn_tests.cpp b/tests/src/dbn_tests.cpp similarity index 100% rename from test/src/dbn_tests.cpp rename to tests/src/dbn_tests.cpp diff --git a/test/src/file_stream_tests.cpp b/tests/src/file_stream_tests.cpp similarity index 100% rename from test/src/file_stream_tests.cpp rename to tests/src/file_stream_tests.cpp diff --git a/test/src/flag_set_tests.cpp b/tests/src/flag_set_tests.cpp similarity index 100% rename from test/src/flag_set_tests.cpp rename to tests/src/flag_set_tests.cpp diff --git a/test/src/historical_tests.cpp b/tests/src/historical_tests.cpp similarity index 100% rename from test/src/historical_tests.cpp rename to tests/src/historical_tests.cpp diff --git a/test/src/http_client_tests.cpp b/tests/src/http_client_tests.cpp similarity index 100% rename from test/src/http_client_tests.cpp rename to tests/src/http_client_tests.cpp diff --git a/test/src/live_blocking_tests.cpp b/tests/src/live_blocking_tests.cpp similarity index 100% rename from test/src/live_blocking_tests.cpp rename to tests/src/live_blocking_tests.cpp diff --git a/test/src/live_tests.cpp b/tests/src/live_tests.cpp similarity index 100% rename from test/src/live_tests.cpp rename to tests/src/live_tests.cpp diff --git a/test/src/live_threaded_tests.cpp b/tests/src/live_threaded_tests.cpp similarity index 100% rename from test/src/live_threaded_tests.cpp rename to tests/src/live_threaded_tests.cpp diff --git a/test/src/log_tests.cpp b/tests/src/log_tests.cpp similarity index 100% rename from test/src/log_tests.cpp rename to tests/src/log_tests.cpp diff --git a/test/src/metadata_tests.cpp b/tests/src/metadata_tests.cpp similarity index 100% rename from test/src/metadata_tests.cpp rename to tests/src/metadata_tests.cpp diff --git a/test/src/mock_http_server.cpp b/tests/src/mock_http_server.cpp similarity index 100% rename from test/src/mock_http_server.cpp rename to tests/src/mock_http_server.cpp diff --git a/test/src/mock_io.cpp b/tests/src/mock_io.cpp similarity index 100% rename from test/src/mock_io.cpp rename to tests/src/mock_io.cpp diff --git a/test/src/mock_lsg_server.cpp b/tests/src/mock_lsg_server.cpp similarity index 100% rename from test/src/mock_lsg_server.cpp rename to tests/src/mock_lsg_server.cpp diff --git a/test/src/mock_tcp_server.cpp b/tests/src/mock_tcp_server.cpp similarity index 100% rename from test/src/mock_tcp_server.cpp rename to tests/src/mock_tcp_server.cpp diff --git a/test/src/record_tests.cpp b/tests/src/record_tests.cpp similarity index 100% rename from test/src/record_tests.cpp rename to tests/src/record_tests.cpp diff --git a/test/src/scoped_thread_tests.cpp b/tests/src/scoped_thread_tests.cpp similarity index 100% rename from test/src/scoped_thread_tests.cpp rename to tests/src/scoped_thread_tests.cpp diff --git a/test/src/shared_channel_tests.cpp b/tests/src/shared_channel_tests.cpp similarity index 100% rename from test/src/shared_channel_tests.cpp rename to tests/src/shared_channel_tests.cpp diff --git a/test/src/stream_op_helper_tests.cpp b/tests/src/stream_op_helper_tests.cpp similarity index 100% rename from test/src/stream_op_helper_tests.cpp rename to tests/src/stream_op_helper_tests.cpp diff --git a/test/src/symbol_map_tests.cpp b/tests/src/symbol_map_tests.cpp similarity index 100% rename from test/src/symbol_map_tests.cpp rename to tests/src/symbol_map_tests.cpp diff --git a/test/src/symbology_tests.cpp b/tests/src/symbology_tests.cpp similarity index 100% rename from test/src/symbology_tests.cpp rename to tests/src/symbology_tests.cpp diff --git a/test/src/tcp_client_tests.cpp b/tests/src/tcp_client_tests.cpp similarity index 100% rename from test/src/tcp_client_tests.cpp rename to tests/src/tcp_client_tests.cpp diff --git a/test/src/zstd_stream_tests.cpp b/tests/src/zstd_stream_tests.cpp similarity index 100% rename from test/src/zstd_stream_tests.cpp rename to tests/src/zstd_stream_tests.cpp