TOSQUASH: 84ad34f51, lingering `float` casts..

decimal_prices_thru_ems
Tyler Goodlet 2025-04-22 00:20:48 -04:00
parent 3ff0a86741
commit 36cc0cf750
1 changed files with 3 additions and 5 deletions

View File

@ -181,7 +181,6 @@ class OrderMode:
line.update_labels(order_info)
# update bound-in staged order
# order.price = level
mkt: MktPair = self.curr_mkt
order.price: Decimal = mkt.quantize(
size=level,
@ -245,7 +244,6 @@ class OrderMode:
size=y,
quantity_type='price',
)
# order.price = y
line._on_level_change = update_order_price
@ -396,7 +394,7 @@ class OrderMode:
'oid': oid,
})
if order.price <= 0:
if float(order.price) <= 0:
log.error(
'*!? Invalid `Order.price <= 0` ?!*\n'
# TODO: make this present multi-line in object form
@ -1194,7 +1192,7 @@ async def process_trade_msg(
tm = time.time()
mode.on_fill(
oid,
price=req.price,
price=float(req.price),
time_s=tm,
)
mode.lines.remove_line(uuid=oid)
@ -1249,7 +1247,7 @@ async def process_trade_msg(
tm = details['broker_time']
mode.on_fill(
oid,
price=details['price'],
price=float(details['price']),
time_s=tm,
pointing='up' if action == 'buy' else 'down',
)