Skip to content

Commit 4863d38

Browse files
committed
Correctly convert np float to Python float
1 parent a731406 commit 4863d38

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

thetagang/portfolio_manager.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2169,15 +2169,14 @@ async def adjust_prices(self) -> None:
21692169
log.info(
21702170
f"{contract.symbol}: Resubmitting {order.action} {contract.secType} order with old lmtPrice={dfmt(order.lmtPrice)} updated lmtPrice={dfmt(updated_price)}"
21712171
)
2172-
order.lmtPrice = float(updated_price)
21732172

21742173
# For some reason, we need to create a new order object
21752174
# and populate the fields rather than modifying the
21762175
# existing order in-place (janky).
21772176
order = LimitOrder(
21782177
order.action,
21792178
order.totalQuantity,
2180-
updated_price,
2179+
float(updated_price),
21812180
orderId=order.orderId,
21822181
algoStrategy=order.algoStrategy,
21832182
algoParams=order.algoParams,

0 commit comments

Comments
 (0)