Skip to content

Commit 5427ef5

Browse files
authored
Fix: abs(sz) on market_close with None sz (#16)
1 parent 67864cf commit 5427ef5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

hyperliquid/exchange.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def market_close(
236236
continue
237237
szi = float(item["szi"])
238238
if not sz:
239-
sz = szi
239+
sz = abs(szi)
240240
is_buy = True if szi < 0 else False
241241
# Get aggressive Market Price
242242
px = self._slippage_price(coin, is_buy, slippage, px)

0 commit comments

Comments
 (0)