Skip to content

Commit 6abedc7

Browse files
authored
VER: Release 0.34.0
2 parents 58f9c73 + 5a3a935 commit 6abedc7

File tree

26 files changed

+619
-94
lines changed

26 files changed

+619
-94
lines changed

CHANGELOG.md

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

3+
## 0.34.0 - 2025-05-13
4+
5+
### Enhancements
6+
- Added a `v3::StatMsg` record with an expanded 64-bit `quantity` field
7+
- Added `with_compression_level` methods to `DynWriter`, `AsyncDynWriter`, and
8+
`AsyncDynBufWriter`
9+
- Added `DBN_VERSION` constants to each version module: `v1`, `v2`, and `v3`
10+
- Added `UNDEF_STAT_QUANTITY` constants to each version module
11+
- Added statistics compatibility trait `StatRec` for generalizing across different
12+
versions of the statistics record
13+
- Added `AsRef<[u8]>` implementations for `RecordEnum` and `RecordRefEnum`
14+
- Added new off-market publishers for Eurex and European Energy Exchange (EEX)
15+
16+
### Breaking changes
17+
- Made `Record` a subtrait of `AsRef<[u8]>` as all records should be convertible to
18+
bytes
19+
320
## 0.33.2 - 2025-05-06
421

522
### Enhancements
@@ -125,7 +142,7 @@
125142
### Enhancements
126143
- Added `v3` namespace in preparation for future DBN version 3 release. DBN version 2
127144
remains the current and default version
128-
- Added `v3::InstrumentDefMsg` record with new fields to support normalizing multi-leg
145+
- Added a `v3::InstrumentDefMsg` record with new fields to support normalizing multi-leg
129146
strategy definitions
130147
- Removal of statistics-schema related fields `trading_reference_price`,
131148
`trading_reference_date`, and `settl_price_type`

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ resolver = "2"
1111
[workspace.package]
1212
authors = ["Databento <[email protected]>"]
1313
edition = "2021"
14-
version = "0.33.2"
14+
version = "0.34.0"
1515
documentation = "https://databento.com/docs"
1616
repository = "https://github.com/databento/dbn"
1717
license = "Apache-2.0"

c/src/compat.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
use dbn::{
2-
compat::{ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV3, SymbolMappingMsgV1, SystemMsgV1},
3-
ErrorMsg, InstrumentDefMsg, SymbolMappingMsg, SystemMsg,
2+
compat::{
3+
ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV3, StatMsgV3, SymbolMappingMsgV1,
4+
SystemMsgV1,
5+
},
6+
ErrorMsg, InstrumentDefMsg, StatMsg, SymbolMappingMsg, SystemMsg,
47
};
58

69
/// Converts an V1 ErrorMsg to V2.
@@ -27,6 +30,12 @@ pub extern "C" fn from_instrument_def_v2_to_v3(def_v2: &InstrumentDefMsg) -> Ins
2730
InstrumentDefMsgV3::from(def_v2)
2831
}
2932

33+
/// Converts a V1 StatMsg to V3.
34+
#[no_mangle]
35+
pub extern "C" fn from_stat_v1_to_v3(stat_v1: &StatMsg) -> StatMsgV3 {
36+
StatMsgV3::from(stat_v1)
37+
}
38+
3039
/// Converts an V1 SymbolMappingMsg to V2.
3140
#[no_mangle]
3241
pub extern "C" fn from_symbol_mapping_v1_to_v2(def_v1: &SymbolMappingMsgV1) -> SymbolMappingMsg {

python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "databento-dbn"
3-
version = "0.33.2"
3+
version = "0.34.0"
44
description = "Python bindings for encoding and decoding Databento Binary Encoding (DBN)"
55
authors = ["Databento <[email protected]>"]
66
license = "Apache-2.0"
@@ -17,7 +17,7 @@ build-backend = "maturin"
1717

1818
[project]
1919
name = "databento-dbn"
20-
version = "0.33.2"
20+
version = "0.34.0"
2121
authors = [
2222
{ name = "Databento", email = "[email protected]" }
2323
]

python/python/databento_dbn/_lib.pyi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ _DBNRecord = Union[
4343
SystemMsg,
4444
SystemMsgV1,
4545
StatMsg,
46+
StatMsgV3,
4647
StatusMsg,
4748
]
4849

@@ -5991,6 +5992,15 @@ class StatusMsg(Record):
59915992
59925993
"""
59935994

5995+
class StatMsgV3(StatMsg):
5996+
"""
5997+
A statistics message.
5998+
5999+
A catchall for various data disseminated by publishers. The
6000+
`stat_type` field indicates the statistic contained in the message.
6001+
6002+
"""
6003+
59946004
class ErrorMsg(ErrorMsgV1):
59956005
"""
59966006
An error message from the Databento Live Subscription Gateway (LSG).

python/python/databento_dbn/v3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from ._lib import MBP1Msg
1010
from ._lib import MBP10Msg
1111
from ._lib import OHLCVMsg
12-
from ._lib import StatMsg
12+
from ._lib import StatMsgV3 as StatMsg
1313
from ._lib import StatusMsg
1414
from ._lib import SymbolMappingMsg
1515
from ._lib import SystemMsg

python/src/lib.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
use pyo3::{prelude::*, wrap_pyfunction, PyClass};
44

55
use dbn::{
6-
compat::{ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV3, SymbolMappingMsgV1, SystemMsgV1},
6+
compat::{
7+
ErrorMsgV1, InstrumentDefMsgV1, InstrumentDefMsgV3, StatMsgV3, SymbolMappingMsgV1,
8+
SystemMsgV1,
9+
},
710
flags,
811
python::{DBNError, EnumIterator},
912
Action, BboMsg, BidAskPair, CbboMsg, Cmbp1Msg, Compression, ConsolidatedBidAskPair, Encoding,
@@ -56,6 +59,7 @@ fn databento_dbn(_py: Python<'_>, m: &Bound<PyModule>) -> PyResult<()> {
5659
checked_add_class::<SystemMsg>(m)?;
5760
checked_add_class::<SystemMsgV1>(m)?;
5861
checked_add_class::<StatMsg>(m)?;
62+
checked_add_class::<StatMsgV3>(m)?;
5963
checked_add_class::<BboMsg>(m)?;
6064
checked_add_class::<CbboMsg>(m)?;
6165
checked_add_class::<Cmbp1Msg>(m)?;

rust/dbn-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ name = "dbn"
1616
path = "src/main.rs"
1717

1818
[dependencies]
19-
dbn = { path = "../dbn", version = "=0.33.2", default-features = false }
19+
dbn = { path = "../dbn", version = "=0.34.0", default-features = false }
2020

2121
anyhow = { workspace = true }
2222
clap = { version = "4.5", features = ["derive", "wrap_help"] }

rust/dbn/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ serde = ["dep:serde", "time/parsing", "time/serde"]
2525
trivial_copy = []
2626

2727
[dependencies]
28-
dbn-macros = { version = "=0.33.2", path = "../dbn-macros" }
28+
dbn-macros = { version = "=0.34.0", path = "../dbn-macros" }
2929

3030
async-compression = { version = "0.4.23", features = ["tokio", "zstd"], optional = true }
3131
csv = { workspace = true }

0 commit comments

Comments
 (0)