We would like to inform Bybit users that CCXT has decided to change the endpoint used for placing independent
stopLossPrice / takeProfitPrice orders.Previously, these orders were placed using the
trading-stop endpoint. After further analysis, we concluded that this endpoint does not align well with our unification standards and, since it does not return an orderId, it makes order tracking more difficult for users.As a result, such orders will now be placed using the standard
create-order endpoint. tp_order = await bybit.create_order(symbol, 'limit', 'sell', 50, 1.5, {"takeProfitPrice": 1.6}) # take profit order
sl_order = await bybit.create_order(symbol, 'limit', 'sell', 50, 0.24, {"stopLossPrice": 0.25}) # stop loss orderHowever, if you still want to use the previous endpoint (
trading-stop) you can just provide tradingStopEndpoint: true in params and the behavior will remain unchanged tp_order = await bybit.create_order(symbol, 'limit', 'sell', 50, 1.5, {"takeProfitPrice": 1.6, "tradingStopEndpoint": true}) # take profit order
sl_order = await bybit.create_order(symbol, 'limit', 'sell', 50, 0.24, {"stopLossPrice": 0.25, "tradingStopEndpoint": true}) # stop loss order-
create-order: https://bybit-exchange.github.io/docs/v5/order/create-order-
trading-stop: https://bybit-exchange.github.io/docs/v5/position/trading-stopThis feature is available starting from CCXT v4.5.27.
As always, if you have any questions or need assistance, feel free to reach out to the CCXT team!
Thank you for your continued support,
The CCXT Team