Refactor iteration calculation for hedge order placement in place_anchor_and_hedge function

This commit is contained in:
Nawaz Haider
2026-01-03 17:36:16 +06:00
parent b44829b474
commit 1e067d1f57
+2 -1
View File
@@ -38,7 +38,8 @@ async def place_anchor_and_hedge(
anchor_order_id = await place_limit_order(anchor_token_id, price, size, expire=True)
if PLACE_OPPOSITE_ORDER and anchor_order_id:
for _ in range(65 * (1 / 0.02)):
num_iter = int(66 * (1 / 0.02))
for _ in range(num_iter):
if in_memory_db_contains_item(anchor_order_id):
hedge_order_id = await place_limit_order(
hedge_token_id, 1 - price - PROFIT_MARGIN, size