Skip to content

Commit 53503bb

Browse files
committed
ADD: Add VWAP stat type for ICE
1 parent 06785e9 commit 53503bb

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
- Changed default `upgrade_policy` to `Upgrade` so by default the primary record types
77
can always be used
88

9+
##### Bug fixes
10+
- Added missing `StatType::Vwap` variant used in the ICE datasets
11+
- Added missing `ToString` and `operator<<` handling for `StatType::ClosePrice` and
12+
`StatType::NetChange`
13+
914
## 0.15.0 - 2024-01-16
1015

1116
### Breaking changes

include/databento/enums.hpp

+4
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,10 @@ enum StatType : std::uint16_t {
254254
// The change in price from the close price of the previous trading session to
255255
// the most recent trading session. `price` will be set.
256256
NetChange = 12,
257+
/// The volume-weighted average price (VWAP) during the trading session.
258+
/// `price` will be set to the VWAP while `quantity` will be the traded
259+
/// volume.
260+
Vwap = 13,
257261
};
258262
} // namespace stat_type
259263
using stat_type::StatType;

src/enums.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,15 @@ const char* ToString(StatType stat_type) {
462462
case StatType::FixingPrice: {
463463
return "FixingPrice";
464464
}
465+
case StatType::ClosePrice: {
466+
return "ClosePrice";
467+
}
468+
case StatType::NetChange: {
469+
return "NetChange";
470+
}
471+
case StatType::Vwap: {
472+
return "Vwap";
473+
}
465474
default: {
466475
return "Unknown";
467476
}

0 commit comments

Comments
 (0)