Skip to content

Commit 7631bd8

Browse files
committed
DEL: Remove unset definitions fields
1 parent d192586 commit 7631bd8

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Changelog
22

33
## 0.8.0 - TBD
4-
- Renamed `booklevel` MBP field to `levels` for brevity and consistent naming
54
- Changed `end` and `end_date` to optional to support new forward-fill behaviour
5+
- Renamed `booklevel` MBP field to `levels` for brevity and consistent naming
6+
- Removed `open_interest_qty` and `cleared_volume` fields from definitions schema
7+
that were always unset
68

79
## 0.7.0 - 2023-04-28
810
- Added initial support for live data with `LiveBlocking` and `LiveThreaded` clients

include/databento/record.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ struct InstrumentDefMsg {
183183
std::int64_t price_ratio;
184184
std::int32_t inst_attrib_value;
185185
std::uint32_t underlying_id;
186-
std::int32_t cleared_volume;
186+
std::array<char, 4> _reserved1;
187187
std::int32_t market_depth_implied;
188188
std::int32_t market_depth;
189189
std::uint32_t market_segment_id;
@@ -192,11 +192,11 @@ struct InstrumentDefMsg {
192192
std::int32_t min_lot_size_block;
193193
std::int32_t min_lot_size_round_lot;
194194
std::uint32_t min_trade_vol;
195-
std::int32_t open_interest_qty;
195+
std::array<char, 4> _reserved2;
196196
std::int32_t contract_multiplier;
197197
std::int32_t decay_quantity;
198198
std::int32_t original_contract_size;
199-
std::array<char, 4> reserved1;
199+
std::array<char, 4> _reserved3;
200200
std::uint16_t trading_reference_date;
201201
std::int16_t appl_id;
202202
std::uint16_t maturity_year;
@@ -215,9 +215,9 @@ struct InstrumentDefMsg {
215215
std::array<char, 21> underlying;
216216
std::array<char, 4> strike_price_currency;
217217
InstrumentClass instrument_class;
218-
std::array<char, 2> reserved2;
218+
std::array<char, 2> _reserved4;
219219
std::int64_t strike_price;
220-
std::array<char, 6> reserved3;
220+
std::array<char, 6> _reserved5;
221221
MatchAlgorithm match_algorithm;
222222
std::uint8_t md_security_trading_status;
223223
std::uint8_t main_fraction;

src/record.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ bool databento::operator==(const InstrumentDefMsg& lhs,
122122
lhs.price_ratio == rhs.price_ratio &&
123123
lhs.inst_attrib_value == rhs.inst_attrib_value &&
124124
lhs.underlying_id == rhs.underlying_id &&
125-
lhs.cleared_volume == rhs.cleared_volume &&
126125
lhs.market_depth_implied == rhs.market_depth_implied &&
127126
lhs.market_depth == rhs.market_depth &&
128127
lhs.market_segment_id == rhs.market_segment_id &&
@@ -131,7 +130,6 @@ bool databento::operator==(const InstrumentDefMsg& lhs,
131130
lhs.min_lot_size_block == rhs.min_lot_size_block &&
132131
lhs.min_lot_size_round_lot == rhs.min_lot_size_round_lot &&
133132
lhs.min_trade_vol == rhs.min_trade_vol &&
134-
lhs.open_interest_qty == rhs.open_interest_qty &&
135133
lhs.contract_multiplier == rhs.contract_multiplier &&
136134
lhs.decay_quantity == rhs.decay_quantity &&
137135
lhs.original_contract_size == rhs.original_contract_size &&
@@ -355,7 +353,6 @@ std::ostream& operator<<(std::ostream& stream,
355353
.AddField("price_ratio", instr_def_msg.price_ratio)
356354
.AddField("inst_attrib_value", instr_def_msg.inst_attrib_value)
357355
.AddField("underlying_id", instr_def_msg.underlying_id)
358-
.AddField("cleared_volume", instr_def_msg.cleared_volume)
359356
.AddField("market_depth_implied", instr_def_msg.market_depth_implied)
360357
.AddField("market_depth", instr_def_msg.market_depth)
361358
.AddField("market_segment_id", instr_def_msg.market_segment_id)
@@ -364,7 +361,6 @@ std::ostream& operator<<(std::ostream& stream,
364361
.AddField("min_lot_size_block", instr_def_msg.min_lot_size_block)
365362
.AddField("min_lot_size_round_lot", instr_def_msg.min_lot_size_round_lot)
366363
.AddField("min_trade_vol", instr_def_msg.min_trade_vol)
367-
.AddField("open_interest_qty", instr_def_msg.open_interest_qty)
368364
.AddField("contract_multiplier", instr_def_msg.contract_multiplier)
369365
.AddField("decay_quantity", instr_def_msg.decay_quantity)
370366
.AddField("original_contract_size", instr_def_msg.original_contract_size)

test/src/record_tests.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
7777
11,
7878
12,
7979
13,
80-
14,
80+
{},
8181
15,
8282
16,
8383
17,
@@ -86,7 +86,7 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
8686
20,
8787
21,
8888
22,
89-
23,
89+
{},
9090
24,
9191
25,
9292
26,
@@ -145,7 +145,6 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
145145
price_ratio = 11,
146146
inst_attrib_value = 12,
147147
underlying_id = 13,
148-
cleared_volume = 14,
149148
market_depth_implied = 15,
150149
market_depth = 16,
151150
market_segment_id = 17,
@@ -154,7 +153,6 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
154153
min_lot_size_block = 20,
155154
min_lot_size_round_lot = 21,
156155
min_trade_vol = 22,
157-
open_interest_qty = 23,
158156
contract_multiplier = 24,
159157
decay_quantity = 25,
160158
original_contract_size = 26,

0 commit comments

Comments
 (0)