MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / mgCancelOrders

Method mgCancelOrders

src/node-binance-api.ts:5466–5480  ·  view source on GitHub ↗

* Cancels all order of a given symbol * @param {string} symbol - the symbol to cancel all orders for * @return {undefined}

(symbol: string, params: Dict = {})

Source from the content-addressed store, hash-verified

5464 * @return {undefined}
5465 */
5466 async mgCancelOrders(symbol: string, params: Dict = {}) {
5467 // signedRequest(this.sapi + 'v1/margin/openOrders', { symbol: symbol }, function (error, json) {
5468 // if (json.length === 0) {
5469 // if (callback) return callback.call(this, 'No orders present for this symbol', {}, symbol);
5470 // }
5471 // for (let obj of json) {
5472 // let quantity = obj.origQty - obj.executedQty;
5473 // this.options.log('cancel order: ' + obj.side + ' ' + symbol + ' ' + quantity + ' @ ' + obj.price + ' #' + obj.orderId);
5474 // signedRequest(this.sapi + 'v1/margin/order', { symbol: symbol, orderId: obj.orderId }, function (error, data) {
5475 // if (callback) return callback.call(this, error, data, symbol);
5476 // }, 'DELETE');
5477 // }
5478 // }); // to do check this
5479 return await this.privateSapiRequest('v1/margin/openOrders', this.extend({ symbol: symbol }, params), 'DELETE');
5480 }
5481
5482 /**
5483 * Transfer from main account to margin account

Callers

nothing calls this directly

Calls 1

privateSapiRequestMethod · 0.95

Tested by

no test coverage detected