Refactor iteration calculation for hedge order placement in place_anchor_and_hedge function
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user