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 :
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.