Skip to content

Commit

Permalink
Fix: abs(sz) on market_close with None sz (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
liewhite authored Jan 30, 2024
1 parent 67864cf commit 5427ef5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hyperliquid/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def market_close(
continue
szi = float(item["szi"])
if not sz:
sz = szi
sz = abs(szi)
is_buy = True if szi < 0 else False
# Get aggressive Market Price
px = self._slippage_price(coin, is_buy, slippage, px)
Expand Down

0 comments on commit 5427ef5

Please sign in to comment.