Skip to content

Commit

Permalink
add randomness to match dans orders (#189)
Browse files Browse the repository at this point in the history
* add randomness to match dans orders

* conv to dec
  • Loading branch information
uv-orbs authored Apr 21, 2024
1 parent ea76eb8 commit 094306c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions e2e/maker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def update_orders(self, price):
print("Ask Price: ", cur_price)
cur_size = Decimal((i + 1) * int(ORDER_SIZE_SCALE))
# add random float to size 0.5-10
cur_size += random.uniform(0.5, 10)

cur_size += Decimal(random.uniform(0.5, 10))
order_input = CreateOrderInput(
price=str(self._round(cur_price)),
size=str(cur_size),
Expand Down Expand Up @@ -92,7 +91,7 @@ def update_orders(self, price):
print("Bid Price: ", cur_price)
cur_size = Decimal((i + 1) * int(ORDER_SIZE_SCALE))
# add random float to size 0.5-10
cur_size += random.uniform(0.5, 10)
cur_size += Decimal(random.uniform(0.5, 10))

order_input = CreateOrderInput(
price=str(self._round(cur_price)),
Expand Down

0 comments on commit 094306c

Please sign in to comment.