Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.4.2 #676

Merged
merged 2 commits into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
Release History
---------------

2.4.2 (2023-08-03)
+++++++++++++++++++

**Bug Fixes**

- #674 Update marketCatalogue fix when recording data

2.4.1 (2023-07-25)
+++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion flumine/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = "flumine"
__description__ = "Betting trading framework"
__url__ = "https://github.com/betcode-org/flumine"
__version__ = "2.4.1"
__version__ = "2.4.2"
__author__ = "Liam Pauling"
__license__ = "MIT"
13 changes: 6 additions & 7 deletions flumine/baseflumine.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,16 +222,15 @@ def _process_raw_data(self, event: events.RawDataEvent) -> None:
market_id = datum["id"]
market = self.markets.markets.get(market_id)
if market is None:
self._add_market(market_id, None)
market = self._add_market(market_id, None)
elif market.closed:
self.markets.add_market(market_id, market)

if (
"marketDefinition" in datum
and datum["marketDefinition"]["status"] == "CLOSED"
):
datum["_stream_id"] = stream_id
self.handler_queue.put(events.CloseMarketEvent(datum))
if "marketDefinition" in datum:
market.update_market_catalogue = True
if datum["marketDefinition"]["status"] == "CLOSED":
datum["_stream_id"] = stream_id
self.handler_queue.put(events.CloseMarketEvent(datum))

for strategy in self.strategies:
if stream_id in strategy.stream_ids:
Expand Down
1 change: 1 addition & 0 deletions tests/test_baseflumine.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ def test__process_raw_data_closed(self, mock__add_market, mock_events):
mock__add_market.assert_called_with("1.23", None)
mock_queue.put.assert_called_with(mock_events.CloseMarketEvent())
self.assertEqual(mock_event.event[3][0]["_stream_id"], mock_event.event[0])
self.assertTrue(mock__add_market.return_value.update_market_catalogue)

@mock.patch("flumine.baseflumine.BaseFlumine._add_market")
def test__process_raw_data_no_id(self, mock__add_market):
Expand Down
Loading