Add risk management features: implement loss limits, trade limits, and pre-trade validation; update settings and tests
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user