ccxt: KuCoin spot stop loss doesn't work
Operating System
Windows
Programming Languages
JS
CCXT Version
4.0.32
Description
Stop loss orders, using the unified method, on KuCoin doesn’t work. As an example, this is what I did:
await exchange.createOrder(‘SOL/USDT’, ‘limit’, ‘sell’, 0.0869, 26.5, { stopLossPrice: 26.6 });
The SOL/USDT price was around 26.85 when I created the order. The order was immediately triggered and filled. Instead, it should only be triggered when the price drops below 26.6.
The same code works well with Binance.
Now, I tried the above 3 times in a row. And interestingly, the 2nd time it did work as expected. I then manually canceled the stop loss, and ran the exact same code again. And the SOL was immediately sold.
Any idea what could be the problem?
Code
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 16 (5 by maintainers)
better to open a separate/new issue for different/WS problem 👍
Excellent, thanks for the quick fix @ttodua!