Skip to content

Commit 8b4e384

Browse files
committed
MOD: Upgrade to databento_dbn to 0.17.0
1 parent df58449 commit 8b4e384

File tree

6 files changed

+28
-3
lines changed

6 files changed

+28
-3
lines changed

CHANGELOG.md

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

3-
## 0.31.2 - TBD
3+
## 0.32.0 - TBD
4+
5+
#### Enhancements
6+
- Upgraded `databento-dbn` to 0.17.0
47

58
#### Bug fixes
69
- Removed live session ID parsing to `int`, that could cause a session to fail when

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The library is fully compatible with the latest distribution of Anaconda 3.8 and
3232
The minimum dependencies as found in the `pyproject.toml` are also listed below:
3333
- python = "^3.8"
3434
- aiohttp = "^3.8.3"
35-
- databento-dbn = "0.16.0"
35+
- databento-dbn = "0.17.0"
3636
- numpy= ">=1.23.5"
3737
- pandas = ">=1.5.3"
3838
- pyarrow = ">=13.0.0"

databento/common/constants.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Final
44

55
import numpy as np
6+
from databento_dbn import CbboMsg
67
from databento_dbn import ImbalanceMsg
78
from databento_dbn import InstrumentDefMsg
89
from databento_dbn import InstrumentDefMsgV1
@@ -36,9 +37,16 @@
3637
Schema.OHLCV_1M: OHLCVMsg,
3738
Schema.OHLCV_1H: OHLCVMsg,
3839
Schema.OHLCV_1D: OHLCVMsg,
40+
Schema.OHLCV_EOD: OHLCVMsg,
3941
Schema.STATISTICS: StatMsg,
4042
Schema.TBBO: MBP1Msg,
4143
Schema.TRADES: TradeMsg,
44+
Schema.CBBO: CbboMsg,
45+
Schema.CBBO_1S: CbboMsg,
46+
Schema.CBBO_1M: CbboMsg,
47+
Schema.TCBBO: CbboMsg,
48+
Schema.BBO_1S: MBP1Msg,
49+
Schema.BBO_1M: MBP1Msg,
4250
}
4351

4452
SCHEMA_STRUCT_MAP_V1: Final[dict[Schema, type[DBNRecord]]] = {

databento/common/types.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
DBNRecord = Union[
12+
databento_dbn.CbboMsg,
1213
databento_dbn.MBOMsg,
1314
databento_dbn.MBP1Msg,
1415
databento_dbn.MBP10Msg,
@@ -18,6 +19,7 @@
1819
databento_dbn.InstrumentDefMsg,
1920
databento_dbn.InstrumentDefMsgV1,
2021
databento_dbn.StatMsg,
22+
databento_dbn.StatusMsg, # type: ignore [name-defined]
2123
databento_dbn.SymbolMappingMsg,
2224
databento_dbn.SymbolMappingMsgV1,
2325
databento_dbn.SystemMsg,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ aiohttp = [
3232
{version = "^3.8.3", python = "<3.12"},
3333
{version = "^3.9.0", python = "^3.12"}
3434
]
35-
databento-dbn = "0.16.0"
35+
databento-dbn = "0.17.0"
3636
numpy = [
3737
{version = ">=1.23.5", python = "<3.12"},
3838
{version = "^1.26.0", python = "^3.12"}

tests/test_live_client.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1424,6 +1424,18 @@ async def test_live_stream_with_reconnect(
14241424
pytest.skip("no stub data for ohlcv-eod schema")
14251425
if schema == "imbalance":
14261426
pytest.skip("imbalance is not supported for GLBX.MDP3")
1427+
if schema == "cbbo":
1428+
pytest.skip("no stub data for cbbo schema")
1429+
if schema == "cbbo-1s":
1430+
pytest.skip("no stub data for cbbo-1s schema")
1431+
if schema == "cbbo-1m":
1432+
pytest.skip("no stub data for cbbo-1m schema")
1433+
if schema == "bbo-1s":
1434+
pytest.skip("no stub data for bbo-1s schema")
1435+
if schema == "bbo-1m":
1436+
pytest.skip("no stub data for bbo-1m schema")
1437+
if schema == "tcbbo":
1438+
pytest.skip("no stub data for tcbbo schema")
14271439

14281440
output = tmp_path / "output.dbn"
14291441
live_client.add_stream(output.open("wb", buffering=0))

0 commit comments

Comments
 (0)