Skip to content

Commit 61827c1

Browse files
committed
Mimic Bug fix with wallet flipping when it shouldn't ReduceOnly now blocks all flipping on BUY orders as well.
Changes to be committed: modified: Base/Library/JRRmimic.py
1 parent a480cb5 commit 61827c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Base/Library/JRRmimic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,8 @@ def PlaceOrder(self,**kwargs):
463463
else:
464464
Fee=self.DefaultFeeRate
465465

466-
# Handle ReduceOnly
467-
if ro==True and action=='sell':
466+
# Handle ReduceOnly. If ReduceOnly is is payload, block all flipping altogether on all sides.
467+
if ro==True and abs(amount)>abs(self.Wallet['Wallet'][base]):
468468
amount=self.Wallet['Wallet'][base]
469469

470470
# Create base if not present

0 commit comments

Comments
 (0)