Why am I getting this error? "Parameter 'stopLimitPrice' sent when not required."

I’m getting this error when making OCO sell order on DATAUSDT.

{
“code”: -1106,
“msg”: “Parameter ‘stopLimitPrice’ sent when not required.”
}

How to avoid these weird types of errors completely when making OCO orders???
:disappointed_relieved:

What are the parameters you sent? Please post your query.

const queryString = ‘symbol=${pair}&side=SELL&quantity=${baseBalanceIHave}&price=${+%1}&stopPrice=${-%0.3}&stopLimitPrice=${-%0.4}&stopLimitTimeInForce=GTC&timestamp=${Date.now()}

According to the API docs, type=… is a mandatory parameter, which you seem to be missing. You need to specify (based on the info for DATAUSDT) either STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT. Not sure why the API is complaining about the stop price; seems the lack of order type would be a more fundamental error.

This doesn’t make any sense because Binance has a special endpoint for OCO orders:

POST /api/v3/order/oco

So why would we want to add the type parameter?
Also, I made many successful orders without adding the type.

As for telling that

You need to specify (based on the info for DATAUSDT) either STOP_LOSS_LIMIT or TAKE_PROFIT_LIMIT

Al the symbols share the EXACT same orderTypes like this:

“orderTypes”: [
“LIMIT”,
“LIMIT_MAKER”,
“MARKET”,
“STOP_LOSS_LIMIT”,
“TAKE_PROFIT_LIMIT”
]

And this thing makes the errors below so weird because sometimes the order is placed successfully and sometimes not!!!

“Parameter ‘stopLimitPrice’ sent when not required.”
“Parameter ‘stopPrice’ sent when not required.”

So, why would these errors appear when all the symbols share the exact same order types???

My apologies, I missed the OCO part. I’ll defer to someone else who knows better.

can you share the exactly parameters that returned the error? Also the error message, error code, etc.

thanks

I am facing the same probleme with some symbols (CHZUSDT, DIAUSDT … ) , and not with others . So , i can’t figure out what seems to be the probleme

Hi all,

OCOs in SPOT are composed of two different order types: stop loss or stop loss limit order, and a limit maker order. Both those orders have their own parameters needed when sending the OCO.

Based on the errors that people are having the issue seems to be what is being sent for the stop loss or stop loss limit part of the OCO.

So, as a reminder, on top of the other mandatory parameters in order placement (e.g. symbol, timestamp,etc) to send a stop loss order, you need the following:

  • stop price
  • quantity

To send a stop loss limit order, you need the following:

  • stop price
  • quantity
  • price (in case of OCO, the stopLimitPrice)
  • time in force (in the case of OCO, the stopLimitTimeInForce)

As of writing, the spot exchange doesn’t allow STOP_LOSS orders, so in reality you can only really place an OCO with a stop loss limit order + limit maker order.

So, when debugging errors with this, please verify what exactly you are sending to the engine.

If anyone else is still facing this issue, we highly recommend pasting the actual code that is placing this order, or the actual body of the request. It will make it easier for us to see what combinations are being sent and where the problem lies.