Skip to content

Commit 0ee424c

Browse files
committed
DEL: Deprecate mode param in get_cost
1 parent 3751912 commit 0ee424c

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

CHANGELOG.md

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

3+
## 0.43.0 - TBD
4+
5+
### Breaking changes
6+
- Removed `mode` parameter in `Historical::MetadataGetCost()`
7+
38
## 0.42.0 - 2025-08-19
49

510
### Enhancements

include/databento/historical.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,11 @@ class Historical {
139139
double MetadataGetCost(const std::string& dataset,
140140
const DateTimeRange<UnixNanos>& datetime_range,
141141
const std::vector<std::string>& symbols, Schema schema,
142-
FeedMode mode, SType stype_in, std::uint64_t limit);
142+
SType stype_in, std::uint64_t limit);
143143
double MetadataGetCost(const std::string& dataset,
144144
const DateTimeRange<std::string>& datetime_range,
145145
const std::vector<std::string>& symbols, Schema schema,
146-
FeedMode mode, SType stype_in, std::uint64_t limit);
146+
SType stype_in, std::uint64_t limit);
147147

148148
/*
149149
* Symbology API

src/historical.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,25 +665,23 @@ double Historical::MetadataGetCost(const std::string& dataset,
665665
const std::vector<std::string>& symbols,
666666
Schema schema) {
667667
return this->MetadataGetCost(dataset, datetime_range, symbols, schema,
668-
FeedMode::HistoricalStreaming, kDefaultSTypeIn, {});
668+
kDefaultSTypeIn, {});
669669
}
670670
double Historical::MetadataGetCost(const std::string& dataset,
671671
const DateTimeRange<std::string>& datetime_range,
672672
const std::vector<std::string>& symbols,
673673
Schema schema) {
674674
return this->MetadataGetCost(dataset, datetime_range, symbols, schema,
675-
FeedMode::HistoricalStreaming, kDefaultSTypeIn, {});
675+
kDefaultSTypeIn, {});
676676
}
677677
double Historical::MetadataGetCost(const std::string& dataset,
678678
const DateTimeRange<UnixNanos>& datetime_range,
679679
const std::vector<std::string>& symbols,
680-
Schema schema, FeedMode mode, SType stype_in,
681-
std::uint64_t limit) {
680+
Schema schema, SType stype_in, std::uint64_t limit) {
682681
httplib::Params params{
683682
{"dataset", dataset},
684683
{"start", ToString(datetime_range.start)},
685684
{"symbols", JoinSymbolStrings(kMetadataGetCostEndpoint, symbols)},
686-
{"mode", ToString(mode)},
687685
{"schema", ToString(schema)},
688686
{"stype_in", ToString(stype_in)}};
689687
detail::SetIfPositive(&params, "end", datetime_range.end);
@@ -693,13 +691,11 @@ double Historical::MetadataGetCost(const std::string& dataset,
693691
double Historical::MetadataGetCost(const std::string& dataset,
694692
const DateTimeRange<std::string>& datetime_range,
695693
const std::vector<std::string>& symbols,
696-
Schema schema, FeedMode mode, SType stype_in,
697-
std::uint64_t limit) {
694+
Schema schema, SType stype_in, std::uint64_t limit) {
698695
httplib::Params params{
699696
{"dataset", dataset},
700697
{"start", datetime_range.start},
701698
{"symbols", JoinSymbolStrings(kMetadataGetCostEndpoint, symbols)},
702-
{"mode", ToString(mode)},
703699
{"schema", ToString(schema)},
704700
{"stype_in", ToString(stype_in)}};
705701
detail::SetIfNotEmpty(&params, "end", datetime_range.end);

tests/src/historical_tests.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ TEST_F(HistoricalTests, TestMetadataGetCost_Full) {
552552
{{"dataset", dataset::kGlbxMdp3},
553553
{"start", "2020-06-06T00:00"},
554554
{"end", "2021-03-02T00:00"},
555-
{"mode", "historical-streaming"},
556555
{"symbols", "MES.OPT,EW.OPT"},
557556
{"schema", "tbbo"},
558557
{"stype_in", "parent"}},
@@ -562,8 +561,7 @@ TEST_F(HistoricalTests, TestMetadataGetCost_Full) {
562561
databento::Historical target = Client(port);
563562
const auto res = target.MetadataGetCost(
564563
dataset::kGlbxMdp3, {"2020-06-06T00:00", "2021-03-02T00:00"},
565-
{"MES.OPT", "EW.OPT"}, Schema::Tbbo, FeedMode::HistoricalStreaming, SType::Parent,
566-
{});
564+
{"MES.OPT", "EW.OPT"}, Schema::Tbbo, SType::Parent, {});
567565
ASSERT_DOUBLE_EQ(res, kResp);
568566
}
569567

0 commit comments

Comments
 (0)