I’m getting the following error when trying to place a take profit:
OrderImmediatelyFillable binance {"code":-2021,"msg":"Order would immediately trigger."}
The order looks like this:
take_profit_1 = exchange.create_order(coin, 'TAKE_PROFIT_MARKET', 'sell', amount_executed*0.40, None, {'stopPrice': price + (price*0.01), 'positionSide': 'BOTH', 'closePosition': 'true', 'workingType': 'MARK_PRICE', 'priceProtect': 'true'})
And has the following parameters:
symbol = coin
type = TAKE_PROFIT_MARKET
side = sell
amount = amount_executed*0.40
stopPrice = price + (price*0.01),
positionSide = BOTH
closePosition = true
workingType = MARK_PRICE
priceProtect = true