Stop price would trigger immediately.

Hi Everyone,

I’ve read everything I found on this subject but still cannot find a solution.

I try to perform STOP_LOSS_LIMIT orders.
Same code works for some currencies (with same logic regarding the calculation of the stop price) but not for others and this is a mystery to me.

Example
|stopPrice|2092.86|
|price|1938.65|
|side|SELL|
|type|STOP_LOSS_LIMIT|
|symbol|ETHUSDT|
|timeInForce|GTC|
|timestamp|1619473894414|

At the time I tried to perform the order, the ETHUSDT market was :

LastPrice : 2492,61000000
OpenPrice : 2213,67000000
AskPrice : 2492,61000000
BidPrice : 2492,14000000
HighPrice : 2531,51000000
LowPrice : 2203,01000000

So why would the API respond : -2010: Stop price would trigger immediately ?
Am I not looking a the correct “current” price of the ETHUSDT market ?

Should be TAKE_PROFIT_LIMIT as your stopPrice > lastPrice

Stop Price is 2092.86 and last price is 2492,61

Stop price is definitely not > last price or am I reading this wrong ?

BTW I’m on the test network (if this changes anything)

That’d be very unlikely. These parameters work for me.
Are you using testnet?

Yes I’m on testnet

I do confirm that the problem only occur on testnet not on production

How are you obtaining the LastPrice?

I’ve followed the same logic of placing a SELL STOP_LOSS_LIMIT order with stopPrice < Latest price for same symbol on Spot Testnet and wasn’t able to reproduce the error.

“Stop price would trigger immediately” only happens if my stopPrice >= Latest price, with latest price checked from /api/v3/ticker/price.

Are you checking the askPrice and bidPrice? lastPrice is the last price of the last filled order, but this does not mean that the price is at this level. On testnet spread is more higher.
If you want to set a StopLossLimit, you must place an order for askPrice or bidPrice.

Hi, the current average price for ETH/USDT on testnet is ~ 147 for me, that’s probably the reason.
It seems that volume on this pair is very low, try BTC/USDT on testnet, it might be better.