|
6 | 6 | MarketCredentialService, OrderService, PortfolioConfigurationService, \ |
7 | 7 | PortfolioService, PositionService, TradeService, DataProviderService, \ |
8 | 8 | TradeStopLossService, TradeTakeProfitService, BrokerBalanceTracker |
9 | | -from investing_algorithm_framework.services.portfolios.portfolio_provider_lookup \ |
10 | | - import PortfolioProviderLookup |
| 9 | +from investing_algorithm_framework.services.portfolios import ( |
| 10 | + PortfolioProviderLookup, |
| 11 | +) |
11 | 12 | from investing_algorithm_framework.domain import OrderStatus, OrderType, \ |
12 | 13 | OrderSide, OperationalException, Portfolio, RoundingService, \ |
13 | 14 | BACKTESTING_FLAG, INDEX_DATETIME, Order, \ |
@@ -1143,7 +1144,9 @@ def _reserved_cash_for_pending_orders( |
1143 | 1144 | for order in created_orders or []: |
1144 | 1145 | try: |
1145 | 1146 | price = float(order.get_price() or 0.0) |
1146 | | - amount = float(order.get_remaining() or order.get_amount() or 0.0) |
| 1147 | + amount = float( |
| 1148 | + order.get_remaining() or order.get_amount() or 0.0 |
| 1149 | + ) |
1147 | 1150 | except Exception: # noqa: BLE001 |
1148 | 1151 | continue |
1149 | 1152 | if OrderSide.BUY.equals(order.get_order_side()): |
|
0 commit comments