Skip to content

Commit

Permalink
ADD: Python client stub data for IFEU and NDEX
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacholl committed Feb 14, 2024
1 parent 481242b commit 296f820
Show file tree
Hide file tree
Showing 35 changed files with 50 additions and 0 deletions.
Binary file added tests/data/DBEQ.BASIC/test_data.mbp-10.dbn.zst
Binary file not shown.
Binary file added tests/data/DBEQ.BASIC/test_data.ohlcv-1d.dbn.zst
Binary file not shown.
Binary file added tests/data/DBEQ.BASIC/test_data.ohlcv-1h.dbn.zst
Binary file not shown.
Binary file added tests/data/DBEQ.BASIC/test_data.ohlcv-1m.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.definition.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.mbo.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.mbp-1.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.mbp-10.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.ohlcv-1d.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.ohlcv-1h.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.ohlcv-1m.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.ohlcv-1s.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.statistics.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.tbbo.dbn.zst
Binary file not shown.
Binary file added tests/data/IFEU.IMPACT/test_data.trades.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.definition.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.mbo.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.mbp-1.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.mbp-10.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.ohlcv-1d.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.ohlcv-1h.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.ohlcv-1m.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.ohlcv-1s.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.statistics.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.tbbo.dbn.zst
Binary file not shown.
Binary file added tests/data/NDEX.IMPACT/test_data.trades.dbn.zst
Binary file not shown.
Binary file added tests/data/OPRA.PILLAR/test_data.ohlcv-1d.dbn.zst
Binary file not shown.
Binary file added tests/data/OPRA.PILLAR/test_data.ohlcv-1h.dbn.zst
Binary file not shown.
Binary file added tests/data/OPRA.PILLAR/test_data.ohlcv-1m.dbn.zst
Binary file not shown.
34 changes: 34 additions & 0 deletions tests/data/generator.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utility to generate stub data for testing purposes.
"""

from __future__ import annotations

import argparse
Expand Down Expand Up @@ -55,16 +56,49 @@
(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"),
],
Dataset.DBEQ_BASIC: [
(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.OHLCV_1S, ["QQQ"], "2023-03-28"),
(Schema.OHLCV_1M, ["QQQ"], "2023-03-28"),
(Schema.OHLCV_1H, ["QQQ"], "2023-03-28"),
(Schema.OHLCV_1D, ["QQQ"], "2023-03-28"),
(Schema.DEFINITION, ["QQQ"], "2023-03-28"),
],
Dataset.IFEU_IMPACT: [
(Schema.MBO, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.MBP_1, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.MBP_10, ["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"),
(Schema.OHLCV_1M, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.OHLCV_1H, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.OHLCV_1D, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.DEFINITION, ["BRN FMJ0024!"], "2024-01-18"),
(Schema.STATISTICS, ["BRN FMJ0024!"], "2024-01-18"),
],
Dataset.NDEX_IMPACT: [
(Schema.MBO, ["TFM FMH0024!"], "2024-01-18"),
(Schema.MBP_1, ["TFM FMH0024!"], "2024-01-18"),
(Schema.MBP_10, ["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"),
(Schema.OHLCV_1M, ["TFM FMH0024!"], "2024-01-18"),
(Schema.OHLCV_1H, ["TFM FMH0024!"], "2024-01-18"),
(Schema.OHLCV_1D, ["TFM FMH0024!"], "2024-01-18"),
(Schema.DEFINITION, ["TFM FMH0024!"], "2024-01-18"),
(Schema.STATISTICS, ["TFM FMH0024!"], "2024-01-18"),
],
}


Expand Down
4 changes: 4 additions & 0 deletions tests/test_bento_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize("schema", [pytest.param(x) for x in Schema.variants()])
Expand Down Expand Up @@ -42,6 +44,8 @@ def test_memory_data_source(
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize("schema", [pytest.param(x) for x in Schema.variants()])
Expand Down
2 changes: 2 additions & 0 deletions tests/test_common_symbology.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,8 @@ def test_instrument_map_ignore_duplicate(
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize(
Expand Down
2 changes: 2 additions & 0 deletions tests/test_historical_bento.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ def test_to_df_with_price_type_handles_null(
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize(
Expand Down
4 changes: 4 additions & 0 deletions tests/test_live_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,8 @@ def callback(record: DBNRecord) -> None:
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize(
Expand Down Expand Up @@ -1054,6 +1056,8 @@ async def test_live_stream_to_dbn(
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
@pytest.mark.parametrize(
Expand Down
4 changes: 4 additions & 0 deletions tests/test_live_protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
async def test_protocol_connection(
Expand Down Expand Up @@ -51,6 +53,8 @@ async def test_protocol_connection(
Dataset.XNAS_ITCH,
Dataset.OPRA_PILLAR,
Dataset.DBEQ_BASIC,
Dataset.IFEU_IMPACT,
Dataset.NDEX_IMPACT,
],
)
async def test_protocol_connection_streaming(
Expand Down

0 comments on commit 296f820

Please sign in to comment.