We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e6198d commit 1a646d4Copy full SHA for 1a646d4
src/frequenz/client/electricity_trading/_client.py
@@ -404,6 +404,8 @@ def validate_params(
404
validate_decimal_places(price.amount, PRECISION_DECIMAL_PRICE, "price")
405
if not isinstance(quantity, _Sentinel) and quantity is not None:
406
validate_decimal_places(quantity.mw, PRECISION_DECIMAL_QUANTITY, "quantity")
407
+ if quantity.mw <= 0:
408
+ raise ValueError("Quantity must be positive")
409
if not isinstance(stop_price, _Sentinel) and stop_price is not None:
410
raise NotImplementedError(
411
"STOP_LIMIT orders are not supported yet, so stop_price cannot be set."
0 commit comments