diff --git a/doc/rest-client.md b/doc/rest-client.md index 19e2255..b3537a1 100644 --- a/doc/rest-client.md +++ b/doc/rest-client.md @@ -43,6 +43,9 @@ If you only use the [public endpoints](#public-endpoints) you can omit key and s #### async cancelAllConditionalOrders(params) [See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-cancelallcond) +#### async replaceConditionalOrder(params) +[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-replacecond) + #### async queryConditionalOrder(params) [See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-querycond) diff --git a/lib/rest-client.js b/lib/rest-client.js index 8902687..84f81db 100644 --- a/lib/rest-client.js +++ b/lib/rest-client.js @@ -90,6 +90,14 @@ module.exports = class RestClient { return await this.request.post('v2/private/stop-order/cancelAll', params); } + async replaceConditionalOrder(params) { + assert(params, 'No params passed'); + assert(params.stop_order_id, 'Parameter stop_order_id is required'); + assert(params.symbol, 'Parameter symbol is required'); + + return await this.request.post('open-api/stop-order/replace', params); + } + async queryConditionalOrder(params) { assert(params, 'No params passed'); assert(params.stop_order_id || params.order_link_id, 'Parameter order_id OR order_link_id is required');