Skip to content

Commit 7ca0f86

Browse files
authored
VER: Release 0.25.0
2 parents ffc83f1 + 3b1e93c commit 7ca0f86

File tree

6 files changed

+29
-13
lines changed

6 files changed

+29
-13
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

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

525
### Enhancements

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "databento"
33
authors = ["Databento <support@databento.com>"]
4-
version = "0.24.0"
4+
version = "0.25.0"
55
edition = "2021"
66
repository = "https://github.com/databento/databento-rs"
77
description = "Official Databento client library"
@@ -23,7 +23,7 @@ historical = ["dep:futures", "dep:reqwest", "dep:serde", "dep:tokio-util", "dep:
2323
live = ["dep:hex", "dep:sha2", "tokio/net"]
2424

2525
[dependencies]
26-
dbn = { version = "0.33.0", features = ["async", "serde"] }
26+
dbn = { version = "0.34.0", features = ["async", "serde"] }
2727
# Async stream trait
2828
futures = { version = "0.3", optional = true }
2929
# Used for Live authentication

examples/live_smoke_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async fn run(args: Args, mut client: LiveClient) -> anyhow::Result<()> {
8484

8585
client.subscribe(subscription).await?;
8686

87-
//For start != 0 we stop at SymbolMappingMsg so that the tests can be run outside trading hours
87+
// For start != 0 we stop at SymbolMappingMsg so that the tests can be run outside trading hours
8888
let expected_rtype: RType = if start
8989
.is_some_and(|s| s == OffsetDateTime::UNIX_EPOCH || args.stype == SType::InstrumentId)
9090
{

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Symbols {
7474
/// Splits the symbol into chunks to stay within the message length requirements of
7575
/// the live gateway.
7676
pub fn to_chunked_api_string(&self) -> Vec<String> {
77-
const CHUNK_SIZE: usize = 128;
77+
const CHUNK_SIZE: usize = 500;
7878
match self {
7979
Symbols::All => vec![ALL_SYMBOLS.to_owned()],
8080
Symbols::Ids(ids) => ids

src/live/client.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,12 +422,7 @@ mod tests {
422422
if let Some(start) = subscription.start {
423423
assert!(sub_line.contains(&format!("start={}", start.unix_timestamp_nanos())))
424424
}
425-
426-
if subscription.use_snapshot {
427-
assert!(sub_line.contains("snapshot=1"));
428-
} else {
429-
assert!(sub_line.contains("snapshot=0"));
430-
}
425+
assert!(sub_line.contains(&format!("snapshot={}", subscription.use_snapshot as u8)));
431426
}
432427

433428
async fn start(&mut self) {
@@ -665,7 +660,7 @@ mod tests {
665660
#[tokio::test]
666661
async fn test_subscription_chunking() {
667662
const SYMBOL: &str = "TEST";
668-
const SYMBOL_COUNT: usize = 1000;
663+
const SYMBOL_COUNT: usize = 1001;
669664
let (mut fixture, mut client) = setup(Dataset::XnasItch, false, None).await;
670665
let sub_base = Subscription::builder()
671666
.schema(Schema::Ohlcv1M)
@@ -674,7 +669,7 @@ mod tests {
674669
client.subscribe(subscription).await.unwrap();
675670
let mut i = 0;
676671
while i < SYMBOL_COUNT {
677-
let chunk_size = 128.min(SYMBOL_COUNT - i);
672+
let chunk_size = 500.min(SYMBOL_COUNT - i);
678673
fixture.expect_subscribe(sub_base.clone().symbols(vec![SYMBOL; chunk_size]).build());
679674
i += chunk_size;
680675
}

src/live/protocol.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ where
133133
}
134134
let start_nanos = sub.start.as_ref().map(|start| start.unix_timestamp_nanos());
135135

136-
for sym_str in sub.symbols.to_chunked_api_string() {
136+
let symbol_chunks = sub.symbols.to_chunked_api_string();
137+
for sym_str in symbol_chunks {
137138
let sub_req = SubRequest::new(
138139
*schema,
139140
*stype_in,

0 commit comments

Comments
 (0)