Skip to content
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
13 changes: 3 additions & 10 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,12 @@

## Upgrading

* Unify Public Trades streaming and listing (to align with the proto changes in v0.5.0)
* Removed `list_public_trades`
* Replaced `public_trades_stream` with `receive_public_trades`
* `receive_public_trades` now supports an optional time range (`start_time`, `end_time`)
* Update the `frequenz-api-electricity-trading` from >= 0.5.0, < 0.6.0 to >= 0.6.1, < 0.7.0
* Update repo-config from v0.11.0 to v0.13.0
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

## New Features

* Add the Public Order Book extension to the client
* Add the `PublicOrder` and `PublicOrderFilter` types
* Add the `receive_public_order()` endpoint
<!-- Here goes the main new features and examples or instructions on how to use them -->

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
- Ensure timestamp conversion errors are surfaced
15 changes: 5 additions & 10 deletions src/frequenz/client/electricity_trading/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,9 @@ def receive_public_order_book(
side=side,
)

start_time_utc = dt_to_pb_timestamp_utc(start_time) if start_time else None
end_time_utc = dt_to_pb_timestamp_utc(end_time) if end_time else None

if (
public_order_filter not in self._public_orders_streams
or not self._public_orders_streams[public_order_filter].is_running
Expand All @@ -1047,16 +1050,8 @@ def receive_public_order_book(
lambda: self.stub.ReceivePublicOrderBookStream(
electricity_trading_pb2.ReceivePublicOrderBookStreamRequest(
filter=public_order_filter.to_pb(),
start_time=(
dt_to_pb_timestamp_utc(start_time)
if start_time
else None
),
end_time=(
dt_to_pb_timestamp_utc(end_time)
if end_time
else None
),
start_time=start_time_utc,
end_time=end_time_utc,
),
metadata=self._metadata,
),
Expand Down
Loading