@@ -13,7 +13,7 @@ int main() {
1313 const auto publishers = client.MetadataListPublishers ();
1414 std::cout << " Publishers:\n " ;
1515 for (const auto & publisher : publishers) {
16- std::cout << " - " << publisher. first << " : " << publisher. second << ' \n ' ;
16+ std::cout << " - " << publisher << ' \n ' ;
1717 }
1818 std::cout << ' \n ' ;
1919
@@ -31,15 +31,11 @@ int main() {
3131 }
3232 std::cout << ' \n ' ;
3333
34- const auto fields = client.MetadataListFields (
35- kGlbxMdp3 , databento::Encoding::Dbn, databento::Schema::Trades);
34+ const auto fields = client.MetadataListFields (databento::Encoding::Dbn,
35+ databento::Schema::Trades);
3636 std::cout << " Fields:\n " ;
37- const auto & dbn_trades_fields = fields.at (" GLBX.MDP3" )
38- .at (databento::Encoding::Dbn)
39- .at (databento::Schema::Trades);
40- for (const auto & field_and_type : dbn_trades_fields) {
41- std::cout << " - " << field_and_type.first << " : " << field_and_type.second
42- << ' \n ' ;
37+ for (const auto & field_detail : fields) {
38+ std::cout << " - " << field_detail << ' \n ' ;
4339 }
4440 std::cout << ' \n ' ;
4541
@@ -54,8 +50,8 @@ int main() {
5450 const auto all_unit_prices = client.MetadataListUnitPrices (kGlbxMdp3 );
5551 std::cout << " Unit prices:\n " ;
5652 for (const auto & mode_and_prices : all_unit_prices) {
57- const auto * mode_str = ToString (mode_and_prices.first );
58- for (const auto & schema_and_price : mode_and_prices.second ) {
53+ const auto * mode_str = ToString (mode_and_prices.mode );
54+ for (const auto & schema_and_price : mode_and_prices.unit_prices ) {
5955 std::cout << " - (" << mode_str << " , " << schema_and_price.first
6056 << " ): " << schema_and_price.second << ' \n ' ;
6157 }
@@ -67,29 +63,6 @@ int main() {
6763 {" ESH1" }, databento::Schema::Mbo);
6864 std::cout << " Record count: " << record_count << " \n\n " ;
6965
70- const auto live_unit_prices =
71- client.MetadataListUnitPrices (kGlbxMdp3 , databento::FeedMode::Live);
72- std::cout << " Unit prices (live):\n " ;
73- for (const auto & schema_and_price : live_unit_prices) {
74- std::cout << " - (" << schema_and_price.first
75- << " ): " << schema_and_price.second << ' \n ' ;
76- }
77- std::cout << ' \n ' ;
78-
79- const auto trades_unit_prices =
80- client.MetadataListUnitPrices (kGlbxMdp3 , databento::Schema::Trades);
81- std::cout << " Unit prices (trades):\n " ;
82- for (const auto & mode_and_price : trades_unit_prices) {
83- std::cout << " - (" << mode_and_price.first << " ): " << mode_and_price.second
84- << ' \n ' ;
85- }
86- std::cout << ' \n ' ;
87-
88- const auto unit_price = client.MetadataListUnitPrices (
89- kGlbxMdp3 , databento::FeedMode::Historical, databento::Schema::Trades);
90- std::cout << " Unit price (GLBX.MDP3, Historical, Trades): " << unit_price
91- << " \n\n " ;
92-
9366 const std::size_t billable_size = client.MetadataGetBillableSize (
9467 kGlbxMdp3 , {" 2020-12-28" , " 2020-12-29" }, {" ESH1" }, databento::Schema::Mbo,
9568 databento::SType::RawSymbol, {});
0 commit comments