set reduceOnly for futures exit orders

This commit is contained in:
Sam Germain
2022-02-01 22:23:05 -06:00
parent b3477c4802
commit 386be2d889
5 changed files with 48 additions and 9 deletions

View File

@@ -70,6 +70,8 @@ class Ftx(Exchange):
if order_types.get('stoploss', 'market') == 'limit':
# set orderPrice to place limit order, otherwise it's a market order
params['orderPrice'] = limit_rate
if self.trading_mode == TradingMode.FUTURES:
params.update({'reduceOnly': True})
params['stopPrice'] = stop_price
amount = self.amount_to_precision(pair, amount)