I have made a market order which is active and have retrieved symbol and orderId. I now want to put a trailing_stop_market on this order. I send following parameters:
(symbol=symbol, side=OrderSide.SELL, positionSide='LONG', ordertype=OrderType.TRAILING_STOP_MARKET, callbackRate=callbackRate, closePosition=True )
which gives me the error: BinanceApiException: (‘RuntimeError’, ‘[Json] Get json item field: clientOrderId does not exist’)
I’m unable to add the orderId, if i however remove closePosition the error changes to BinanceApiException: (‘ExecuteError’, ‘[Executing] -1102: A mandatory parameter was not sent, was empty/null, or malformed.’) because it is asking for the quantity, if I add a quantity, it works. But I want it to sell everything when price hits the callbackrate, not to define the amount beforehand.
What am I missing?