Skip to content

Commit 83e26d4

Browse files
committed
ADD: Add raw_instrument_id to C++
1 parent 8efbf0f commit 83e26d4

File tree

5 files changed

+10
-4
lines changed

5 files changed

+10
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## 0.10.1 - TBD
44

5+
#### Enhancements
6+
- Added `raw_instrument_id` to definition schema
7+
58
#### Bug fixes
69
- Fixed installation of `nlohmann_json` when using bundled version
710

@@ -59,7 +62,7 @@
5962

6063
#### Breaking changes
6164
- Renamed `booklevel` MBP field to `levels` for brevity and consistent naming
62-
- Removed `open_interest_qty` and `cleared_volume` fields from definitions schema
65+
- Removed `open_interest_qty` and `cleared_volume` fields from definition schema
6366
that were always unset
6467

6568
## 0.7.0 - 2023-04-28

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ cd databento-cpp
4444
cmake -S . -B build \
4545
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
4646
-DCMAKE_INSTALL_PREFIX='/usr'
47-
cmake --build build --target databento --parallel 8
47+
cmake --build build --target databento --parallel
4848
cmake --install build
4949
```
5050

include/databento/record.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ struct InstrumentDefMsg {
199199
std::int64_t price_ratio;
200200
std::int32_t inst_attrib_value;
201201
std::uint32_t underlying_id;
202-
std::array<char, 4> _reserved1;
202+
std::uint32_t raw_instrument_id;
203203
std::int32_t market_depth_implied;
204204
std::int32_t market_depth;
205205
std::uint32_t market_segment_id;

src/record.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ bool databento::operator==(const InstrumentDefMsg& lhs,
121121
lhs.price_ratio == rhs.price_ratio &&
122122
lhs.inst_attrib_value == rhs.inst_attrib_value &&
123123
lhs.underlying_id == rhs.underlying_id &&
124+
lhs.raw_instrument_id == rhs.raw_instrument_id &&
124125
lhs.market_depth_implied == rhs.market_depth_implied &&
125126
lhs.market_depth == rhs.market_depth &&
126127
lhs.market_segment_id == rhs.market_segment_id &&
@@ -352,6 +353,7 @@ std::ostream& operator<<(std::ostream& stream,
352353
.AddField("price_ratio", instr_def_msg.price_ratio)
353354
.AddField("inst_attrib_value", instr_def_msg.inst_attrib_value)
354355
.AddField("underlying_id", instr_def_msg.underlying_id)
356+
.AddField("raw_instrument_id", instr_def_msg.raw_instrument_id)
355357
.AddField("market_depth_implied", instr_def_msg.market_depth_implied)
356358
.AddField("market_depth", instr_def_msg.market_depth)
357359
.AddField("market_segment_id", instr_def_msg.market_segment_id)

test/src/record_tests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
7777
11,
7878
12,
7979
13,
80-
{},
80+
14,
8181
15,
8282
16,
8383
17,
@@ -145,6 +145,7 @@ TEST(RecordTests, TestInstrumentDefMsgToString) {
145145
price_ratio = 11,
146146
inst_attrib_value = 12,
147147
underlying_id = 13,
148+
raw_instrument_id = 14,
148149
market_depth_implied = 15,
149150
market_depth = 16,
150151
market_segment_id = 17,

0 commit comments

Comments
 (0)