Error: The relationship of the prices for the orders is not correct.

https://imgur.com/a/5J25XL8Hello,

We are getting the following error when trying to open an OCO sell order after market buying.

.... API error while placing order: Error: The relationship of the prices for the orders is not correct.

Our trade value is $30 and our sell OCO Limit maker at 1% and our stop limit at 1.5%.

We seem to get this error intermittently using the same trade value and OCO configuration but sometimes we error and other times our OCO sell order is executed fine. The same pair may error and not place the oco and later the same day execute perfectly.

Has anyone ran into this issue?

Thanks in advance!

Price Restrictions:
SELL: Limit Price > Last Price > Stop Price
BUY: Limit Price < Last Price < Stop Price

Please read https://binance-docs.github.io/apidocs/spot/en/#new-oco-trade to confirm the details;
If you still have question, please share the exact request, especially the limit price, last price and stop price for further analysis

Hi thanks for your response. Unfortunately we have looked into your provided information and we don’t believe this is the issue. Perhaps it would be easier to talk about this with an example we had today.

We bought SXPDOWN/USDT at an average fill of $0.803 per coin.
We the tried to open a OCO sell order with a limit maker set at 1% and a stop limit at -1%

At this point we received the error…

API error while placing order: Error: The relationship of the prices for the orders is not correct.

Please can you advise on why we are experiencing this error.

Can you provide the exact Limit Price, Last Price and Stop Price of the OCO order that you got the error message? This because, the OCO order needs to have the following relationship of prices if it’s a SELL order:

Limit Price > Last Price > Stop Price

Maybe the 1% or -1% calculation is not making the above relation possible.

Hello, I’m also experiencing this issue - I’m fairly sure it’s not my code as I can issue the following request

{
  "symbol": "ETHGBP",
  "side": "BUY",
  "stopLimitTimeInForce": "GTC",
  "quantity": "0.05",
  "price": "1700.01",
  "stopPrice": "1850.01",
  "stopLimitPrice": "1855.01",
  "newOrderRespType": "FULL",
  "listClientOrderId": "<uuid_v4>"
}

but not this one, which was generated by just +500 the prices

{
  "symbol": "ETHGBP",
  "side": "BUY",
  "stopLimitTimeInForce": "GTC",
  "quantity": "0.05",
  "price": "2200.01",
  "stopPrice": "2350.01",
  "stopLimitPrice": "2355.01",
  "newOrderRespType": "FULL",
  "listClientOrderId": "<uuid_v4>"
}

Any ideas?

I have found something by trying this in the Binance trader tool - it gives a more useful error "Price should be less than market price - This is likely my root cause. I don’t know if it’s anyone else’s