diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f382bb27..22d4c019 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,11 +32,11 @@ jobs: - name: Test (release) timeout-minutes: 3 if: ${{ github.ref == 'refs/heads/main' }} - run: scripts/test.sh --release + run: scripts/test.sh -vvv --release shell: bash - name: Test timeout-minutes: 3 if: ${{ github.ref != 'refs/heads/main' }} - run: scripts/test.sh + run: scripts/test.sh -vvv shell: bash diff --git a/CHANGELOG.md b/CHANGELOG.md index a0bbeaaa..57b8ffa3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 0.52.0 - 2025-04-15 + +#### Enhancements +- Added new optional `id` field to `SubcriptionRequest` class which will be used for improved error messages +- Upgraded `databento-dbn` to 0.32.0 + - Fixed `RType` variant names in Python to match `Schema` + - Added missing Python type declarations for `RType` variants + - Fixed issue with Python `_hidden_fields` definition that caused `KeyError: _reserved1_00` + with `CMBP1Msg` and other records with `ConsolidatedBidAskPair` + ## 0.51.0 - 2025-04-08 #### Enhancements diff --git a/README.md b/README.md index a525291d..49c875c1 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ The library is fully compatible with the latest distribution of Anaconda 3.9 and The minimum dependencies as found in the `pyproject.toml` are also listed below: - python = "^3.9" - aiohttp = "^3.8.3" -- databento-dbn = "0.31.0" +- databento-dbn = "0.32.0" - numpy= ">=1.23.5" - pandas = ">=1.5.3" - pip-system-certs = ">=4.0" (Windows only) diff --git a/databento/common/dbnstore.py b/databento/common/dbnstore.py index 4c29dc94..6cc0d9c8 100644 --- a/databento/common/dbnstore.py +++ b/databento/common/dbnstore.py @@ -1335,7 +1335,7 @@ def __init__( count: int | None = None, ) -> None: self._reader = reader - self._dtype: np.typing.DTypeLike = np.dtype(dtype) + self._dtype: np.dtype[Any] = np.dtype(dtype) self._offset = offset self._count = count self._close_on_next = False diff --git a/databento/live/gateway.py b/databento/live/gateway.py index d109536f..661ce5be 100644 --- a/databento/live/gateway.py +++ b/databento/live/gateway.py @@ -132,6 +132,7 @@ class SubscriptionRequest(GatewayControl): symbols: str start: int | None = None snapshot: int = 0 + id: int | None = None @dataclasses.dataclass diff --git a/databento/live/protocol.py b/databento/live/protocol.py index d7d18a1a..a53c2e7f 100644 --- a/databento/live/protocol.py +++ b/databento/live/protocol.py @@ -284,6 +284,7 @@ def subscribe( stype_in: SType | str = SType.RAW_SYMBOL, start: str | int | None = None, snapshot: bool = False, + subscription_id: int | None = None, ) -> list[SubscriptionRequest]: """ Send a SubscriptionRequest to the gateway. Returns a list of all @@ -302,6 +303,8 @@ def subscribe( within 24 hours. snapshot: bool, default to 'False' Request subscription with snapshot. The `start` parameter must be `None`. + subscription_id : int, optional + A numerical identifier to associate with this subscription. Returns ------- @@ -329,6 +332,7 @@ def subscribe( symbols=batch_str, start=optional_datetime_to_unix_nanoseconds(start), snapshot=int(snapshot), + id=subscription_id, ) subscriptions.append(message) diff --git a/databento/live/session.py b/databento/live/session.py index a723f958..abcedfb2 100644 --- a/databento/live/session.py +++ b/databento/live/session.py @@ -332,6 +332,7 @@ def __init__( self._transport: asyncio.Transport | None = None self._session_id: str | None = None + self._subscription_counter = 0 self._subscriptions: list[SubscriptionRequest] = [] self._reconnect_policy = ReconnectPolicy(reconnect_policy) self._reconnect_task: asyncio.Task[None] | None = None @@ -499,6 +500,7 @@ def subscribe( if self._protocol is None: self._connect(dataset=dataset) + self._subscription_counter += 1 self._subscriptions.extend( self._protocol.subscribe( schema=schema, @@ -506,6 +508,7 @@ def subscribe( stype_in=stype_in, start=start, snapshot=snapshot, + subscription_id=self._subscription_counter, ), ) @@ -672,6 +675,7 @@ async def _reconnect(self) -> None: stype_in=sub.stype_in, snapshot=bool(sub.snapshot), start=None, + subscription_id=sub.id, ) if should_restart: diff --git a/databento/version.py b/databento/version.py index d942e9e7..aa212880 100644 --- a/databento/version.py +++ b/databento/version.py @@ -1 +1 @@ -__version__ = "0.51.0" +__version__ = "0.52.0" diff --git a/pyproject.toml b/pyproject.toml index e9f4bb3f..63b41b1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "databento" -version = "0.51.0" +version = "0.52.0" description = "Official Python client library for Databento" authors = [ "Databento ", @@ -32,7 +32,7 @@ aiohttp = [ {version = "^3.8.3", python = "<3.12"}, {version = "^3.9.0", python = "^3.12"} ] -databento-dbn = "0.31.0" +databento-dbn = "0.32.0" numpy = [ {version = ">=1.23.5", python = "<3.12"}, {version = ">=1.26.0", python = "^3.12"} diff --git a/tests/data/DBEQ.BASIC/test_data.definition.dbn.zst b/tests/data/DBEQ.BASIC/test_data.definition.dbn.zst deleted file mode 100644 index b3361645..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.definition.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.mbp-1.dbn.zst b/tests/data/DBEQ.BASIC/test_data.mbp-1.dbn.zst deleted file mode 100644 index 85a459cb..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.mbp-1.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.mbp-10.dbn.zst b/tests/data/DBEQ.BASIC/test_data.mbp-10.dbn.zst deleted file mode 100644 index c546ff15..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.mbp-10.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.ohlcv-1d.dbn.zst b/tests/data/DBEQ.BASIC/test_data.ohlcv-1d.dbn.zst deleted file mode 100644 index 0e0672a8..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.ohlcv-1d.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.ohlcv-1h.dbn.zst b/tests/data/DBEQ.BASIC/test_data.ohlcv-1h.dbn.zst deleted file mode 100644 index 22bc58bd..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.ohlcv-1h.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.ohlcv-1m.dbn.zst b/tests/data/DBEQ.BASIC/test_data.ohlcv-1m.dbn.zst deleted file mode 100644 index 770a3c88..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.ohlcv-1m.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.ohlcv-1s.dbn.zst b/tests/data/DBEQ.BASIC/test_data.ohlcv-1s.dbn.zst deleted file mode 100644 index ef646065..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.ohlcv-1s.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.tbbo.dbn.zst b/tests/data/DBEQ.BASIC/test_data.tbbo.dbn.zst deleted file mode 100644 index 59a81852..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.tbbo.dbn.zst and /dev/null differ diff --git a/tests/data/DBEQ.BASIC/test_data.trades.dbn.zst b/tests/data/DBEQ.BASIC/test_data.trades.dbn.zst deleted file mode 100644 index 34d7fc7d..00000000 Binary files a/tests/data/DBEQ.BASIC/test_data.trades.dbn.zst and /dev/null differ diff --git a/tests/data/EQUS.MINI/test_data.bbo-1m.dbn.zst b/tests/data/EQUS.MINI/test_data.bbo-1m.dbn.zst new file mode 100644 index 00000000..c40910b2 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.bbo-1m.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.bbo-1s.dbn.zst b/tests/data/EQUS.MINI/test_data.bbo-1s.dbn.zst new file mode 100644 index 00000000..f12e1097 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.bbo-1s.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.definition.dbn.zst b/tests/data/EQUS.MINI/test_data.definition.dbn.zst new file mode 100644 index 00000000..c43ff562 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.definition.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.mbp-1.dbn.zst b/tests/data/EQUS.MINI/test_data.mbp-1.dbn.zst new file mode 100644 index 00000000..4e4c22d8 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.mbp-1.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.ohlcv-1d.dbn.zst b/tests/data/EQUS.MINI/test_data.ohlcv-1d.dbn.zst new file mode 100644 index 00000000..c8764ca0 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.ohlcv-1d.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.ohlcv-1h.dbn.zst b/tests/data/EQUS.MINI/test_data.ohlcv-1h.dbn.zst new file mode 100644 index 00000000..43a6b549 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.ohlcv-1h.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.ohlcv-1m.dbn.zst b/tests/data/EQUS.MINI/test_data.ohlcv-1m.dbn.zst new file mode 100644 index 00000000..c2e00e76 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.ohlcv-1m.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.ohlcv-1s.dbn.zst b/tests/data/EQUS.MINI/test_data.ohlcv-1s.dbn.zst new file mode 100644 index 00000000..0d4d05c4 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.ohlcv-1s.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.tbbo.dbn.zst b/tests/data/EQUS.MINI/test_data.tbbo.dbn.zst new file mode 100644 index 00000000..c6cb743e Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.tbbo.dbn.zst differ diff --git a/tests/data/EQUS.MINI/test_data.trades.dbn.zst b/tests/data/EQUS.MINI/test_data.trades.dbn.zst new file mode 100644 index 00000000..29351936 Binary files /dev/null and b/tests/data/EQUS.MINI/test_data.trades.dbn.zst differ diff --git a/tests/data/IFEU.IMPACT/test_data.bbo-1m.dbn.zst b/tests/data/IFEU.IMPACT/test_data.bbo-1m.dbn.zst new file mode 100644 index 00000000..b20fe4b4 Binary files /dev/null and b/tests/data/IFEU.IMPACT/test_data.bbo-1m.dbn.zst differ diff --git a/tests/data/IFEU.IMPACT/test_data.bbo-1s.dbn.zst b/tests/data/IFEU.IMPACT/test_data.bbo-1s.dbn.zst new file mode 100644 index 00000000..d324eec6 Binary files /dev/null and b/tests/data/IFEU.IMPACT/test_data.bbo-1s.dbn.zst differ diff --git a/tests/data/NDEX.IMPACT/test_data.bbo-1m.dbn.zst b/tests/data/NDEX.IMPACT/test_data.bbo-1m.dbn.zst new file mode 100644 index 00000000..2ebf6b7f Binary files /dev/null and b/tests/data/NDEX.IMPACT/test_data.bbo-1m.dbn.zst differ diff --git a/tests/data/NDEX.IMPACT/test_data.bbo-1s.dbn.zst b/tests/data/NDEX.IMPACT/test_data.bbo-1s.dbn.zst new file mode 100644 index 00000000..aec1a465 Binary files /dev/null and b/tests/data/NDEX.IMPACT/test_data.bbo-1s.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.cbbo-1m.dbn.zst b/tests/data/OPRA.PILLAR/test_data.cbbo-1m.dbn.zst new file mode 100644 index 00000000..0d492edc Binary files /dev/null and b/tests/data/OPRA.PILLAR/test_data.cbbo-1m.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.cbbo-1s.dbn.zst b/tests/data/OPRA.PILLAR/test_data.cbbo-1s.dbn.zst new file mode 100644 index 00000000..ea783c5e Binary files /dev/null and b/tests/data/OPRA.PILLAR/test_data.cbbo-1s.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.definition.dbn.zst b/tests/data/OPRA.PILLAR/test_data.definition.dbn.zst index c60a902c..cfb96844 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.definition.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.definition.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.mbp-1.dbn.zst b/tests/data/OPRA.PILLAR/test_data.mbp-1.dbn.zst index d834885e..f0301d71 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.mbp-1.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.mbp-1.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.ohlcv-1d.dbn.zst b/tests/data/OPRA.PILLAR/test_data.ohlcv-1d.dbn.zst index 65731afd..76cb6d9f 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.ohlcv-1d.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.ohlcv-1d.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.ohlcv-1h.dbn.zst b/tests/data/OPRA.PILLAR/test_data.ohlcv-1h.dbn.zst index 3a6e6849..114a1c71 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.ohlcv-1h.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.ohlcv-1h.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.ohlcv-1m.dbn.zst b/tests/data/OPRA.PILLAR/test_data.ohlcv-1m.dbn.zst index 367f8be7..c442da21 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.ohlcv-1m.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.ohlcv-1m.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.ohlcv-1s.dbn.zst b/tests/data/OPRA.PILLAR/test_data.ohlcv-1s.dbn.zst index 95743579..91f0a342 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.ohlcv-1s.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.ohlcv-1s.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.statistics.dbn.zst b/tests/data/OPRA.PILLAR/test_data.statistics.dbn.zst index 2d2c4213..a0dd2071 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.statistics.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.statistics.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.tbbo.dbn.zst b/tests/data/OPRA.PILLAR/test_data.tbbo.dbn.zst index 0a65a315..a847cdd0 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.tbbo.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.tbbo.dbn.zst differ diff --git a/tests/data/OPRA.PILLAR/test_data.trades.dbn.zst b/tests/data/OPRA.PILLAR/test_data.trades.dbn.zst index d3a85d69..51e822eb 100644 Binary files a/tests/data/OPRA.PILLAR/test_data.trades.dbn.zst and b/tests/data/OPRA.PILLAR/test_data.trades.dbn.zst differ diff --git a/tests/data/generator.py b/tests/data/generator.py index 252e4f91..a0c232e5 100644 --- a/tests/data/generator.py +++ b/tests/data/generator.py @@ -55,21 +55,24 @@ (Schema.IMBALANCE, ["NVDA"], "2020-12-28"), ], Dataset.OPRA_PILLAR: [ - (Schema.MBP_1, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.TBBO, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.TRADES, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.OHLCV_1S, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.OHLCV_1M, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.OHLCV_1H, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.OHLCV_1D, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.DEFINITION, ["AAPL 230331C00157500"], "2023-03-28"), - (Schema.STATISTICS, ["AAPL 230331C00157500"], "2023-03-28"), + (Schema.MBP_1, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.TBBO, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.TRADES, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.CBBO_1S, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.CBBO_1M, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.OHLCV_1S, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.OHLCV_1M, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.OHLCV_1H, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.OHLCV_1D, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.DEFINITION, ["AAPL 250221C00250000"], "2025-02-20"), + (Schema.STATISTICS, ["AAPL 250221C00250000"], "2025-02-20"), ], - Dataset.DBEQ_BASIC: [ + Dataset.EQUS_MINI: [ (Schema.MBP_1, ["QQQ"], "2023-03-28"), - (Schema.MBP_10, ["QQQ"], "2023-03-28"), (Schema.TBBO, ["QQQ"], "2023-03-28"), (Schema.TRADES, ["QQQ"], "2023-03-28"), + (Schema.BBO_1S, ["QQQ"], "2023-03-28"), + (Schema.BBO_1M, ["QQQ"], "2023-03-28"), (Schema.OHLCV_1S, ["QQQ"], "2023-03-28"), (Schema.OHLCV_1M, ["QQQ"], "2023-03-28"), (Schema.OHLCV_1H, ["QQQ"], "2023-03-28"), @@ -80,6 +83,8 @@ (Schema.MBO, ["BRN FMJ0024!"], "2024-01-18"), (Schema.MBP_1, ["BRN FMJ0024!"], "2024-01-18"), (Schema.MBP_10, ["BRN FMJ0024!"], "2024-01-18"), + (Schema.BBO_1S, ["BRN FMJ0024!"], "2024-01-18"), + (Schema.BBO_1M, ["BRN FMJ0024!"], "2024-01-18"), (Schema.TBBO, ["BRN FMJ0024!"], "2024-01-18"), (Schema.TRADES, ["BRN FMJ0024!"], "2024-01-18"), (Schema.OHLCV_1S, ["BRN FMJ0024!"], "2024-01-18"), @@ -93,6 +98,8 @@ (Schema.MBO, ["TFM FMH0024!"], "2024-01-18"), (Schema.MBP_1, ["TFM FMH0024!"], "2024-01-18"), (Schema.MBP_10, ["TFM FMH0024!"], "2024-01-18"), + (Schema.BBO_1S, ["TFM FMH0024!"], "2024-01-18"), + (Schema.BBO_1M, ["TFM FMH0024!"], "2024-01-18"), (Schema.TBBO, ["TFM FMH0024!"], "2024-01-18"), (Schema.TRADES, ["TFM FMH0024!"], "2024-01-18"), (Schema.OHLCV_1S, ["TFM FMH0024!"], "2024-01-18"), diff --git a/tests/test_bento_data_source.py b/tests/test_bento_data_source.py index 2dbf6e50..435e79bf 100644 --- a/tests/test_bento_data_source.py +++ b/tests/test_bento_data_source.py @@ -14,7 +14,7 @@ Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], @@ -43,7 +43,7 @@ def test_memory_data_source( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], diff --git a/tests/test_common_symbology.py b/tests/test_common_symbology.py index 4ec6401f..aa2d4a2e 100644 --- a/tests/test_common_symbology.py +++ b/tests/test_common_symbology.py @@ -854,7 +854,7 @@ def test_instrument_map_ignore_duplicate( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], @@ -914,7 +914,7 @@ def test_instrument_map_symbols_csv( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, ], ) @pytest.mark.parametrize( diff --git a/tests/test_historical_bento.py b/tests/test_historical_bento.py index 028903f9..2a8af1af 100644 --- a/tests/test_historical_bento.py +++ b/tests/test_historical_bento.py @@ -665,7 +665,7 @@ def test_to_df_with_price_type_invalid( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], diff --git a/tests/test_live_client.py b/tests/test_live_client.py index 472e2f2b..06d46f7a 100644 --- a/tests/test_live_client.py +++ b/tests/test_live_client.py @@ -1151,7 +1151,7 @@ def callback(record: DBNRecord) -> None: Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], @@ -1204,7 +1204,7 @@ async def test_live_stream_to_dbn( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], diff --git a/tests/test_live_gateway_messages.py b/tests/test_live_gateway_messages.py index 24f8634c..3deaadae 100644 --- a/tests/test_live_gateway_messages.py +++ b/tests/test_live_gateway_messages.py @@ -299,15 +299,15 @@ def test_serialize_session_start( "line, expected", [ pytest.param( - "schema=trades|" "stype_in=instrument_id|" "symbols=1,2,3\n", - ("trades", "instrument_id", "1,2,3", None), + "schema=trades|" "stype_in=instrument_id|" "symbols=1,2,3|" "id=23\n", + ("trades", "instrument_id", "1,2,3", None, "23"), ), pytest.param( "schema=trades|" "stype_in=instrument_id|" "symbols=1,2,3|" "start=1671717080706865759\n", - ("trades", "instrument_id", "1,2,3", "1671717080706865759"), + ("trades", "instrument_id", "1,2,3", "1671717080706865759", None), ), pytest.param( "schema=trades|" "stype_in=instrument_id|" "symbols=1,2,3", @@ -336,6 +336,7 @@ def test_parse_subscription_request( msg.stype_in, msg.symbols, msg.start, + msg.id, ) == expected else: with pytest.raises(expected): @@ -374,8 +375,13 @@ def test_parse_subscription_request( symbols="1234,5678,90", start=None, snapshot=1, + id=5, ), - b"schema=mbo|" b"stype_in=instrument_id|" b"symbols=1234,5678,90|" b"snapshot=1\n", + b"schema=mbo|" + b"stype_in=instrument_id|" + b"symbols=1234,5678,90|" + b"snapshot=1|" + b"id=5\n", ), ], ) diff --git a/tests/test_live_protocol.py b/tests/test_live_protocol.py index 4a1273b5..8b98d43c 100644 --- a/tests/test_live_protocol.py +++ b/tests/test_live_protocol.py @@ -16,7 +16,7 @@ Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ], @@ -52,7 +52,7 @@ async def test_protocol_connection( Dataset.GLBX_MDP3, Dataset.XNAS_ITCH, Dataset.OPRA_PILLAR, - Dataset.DBEQ_BASIC, + Dataset.EQUS_MINI, Dataset.IFEU_IMPACT, Dataset.NDEX_IMPACT, ],