Add risk management features: implement loss limits, trade limits, and pre-trade validation; update settings and tests

This commit is contained in:
2026-06-01 11:16:37 +02:00
parent 9d8a8a8a45
commit 45e219d103
14 changed files with 718 additions and 20 deletions
+2 -4
View File
@@ -19,10 +19,8 @@ def _make_book_levels(
*, bids: list[tuple[float, float]], asks: list[tuple[float, float]]
) -> OrderBook:
book = OrderBook()
book.apply_bids([BookLevel(price=price, volume=volume)
for price, volume in bids])
book.apply_asks([BookLevel(price=price, volume=volume)
for price, volume in asks])
book.apply_bids([BookLevel(price=price, volume=volume) for price, volume in bids])
book.apply_asks([BookLevel(price=price, volume=volume) for price, volume in asks])
return book