Trailing stop market error

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?

the position amount should be able to get from GET /fapi/v2/positionRisk, and you can only reduce position up to current amount in the hedge mode.