A mandatory parameter was not sent, was empty/null, or malformed. ( python-binance )

1.3k Views Asked by At

I'm trying to open a 'long' position along with its stop loss and take profit orders.

The long position is successfully sent and placed. But whenever I try to create the TAKE_PROFIT order it throws an error

***binance.exceptions.BinanceAPIException: APIError(code=-1102): A mandatory parameter was not sent, was empty/null, or malformed.***

Code

position_order = client.futures_create_order(symbol='BTCUSDT', side='BUY', positionSide='BOTH', type=ORDER_TYPE_MARKET, quantity=0.05)
tp_order = client.futures_create_order(symbol='BTCUSDT', side='SELL', positionSide='BOTH', type='TAKE_PROFIT', quantity=0.05, stopPrice=26000.00, workingType='MARK_PRICE')

BINANCE CREATE NEW ORDER API DOCs https://binance-docs.github.io/apidocs/futures/en/#new-order-trade

0

There are 0 best solutions below