Merge pull request #10 from DimensionSoftware/replace-conditional-order
Implement replaceConditionalOrder
This commit is contained in:
@@ -43,6 +43,9 @@ If you only use the [public endpoints](#public-endpoints) you can omit key and s
|
|||||||
#### async cancelAllConditionalOrders(params)
|
#### async cancelAllConditionalOrders(params)
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-cancelallcond)
|
[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)
|
#### async queryConditionalOrder(params)
|
||||||
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-querycond)
|
[See bybit documentation](https://bybit-exchange.github.io/docs/inverse/#t-querycond)
|
||||||
|
|
||||||
|
|||||||
@@ -90,6 +90,14 @@ module.exports = class RestClient {
|
|||||||
return await this.request.post('v2/private/stop-order/cancelAll', params);
|
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) {
|
async queryConditionalOrder(params) {
|
||||||
assert(params, 'No params passed');
|
assert(params, 'No params passed');
|
||||||
assert(params.stop_order_id || params.order_link_id, 'Parameter order_id OR order_link_id is required');
|
assert(params.stop_order_id || params.order_link_id, 'Parameter order_id OR order_link_id is required');
|
||||||
|
|||||||
Reference in New Issue
Block a user