Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/node-binance-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1020,6 +1020,16 @@ export default class Binance {
return await this.privateSpotRequest('v3/order', this.extend({ symbol: symbol, orderId: orderid }, params), 'DELETE');
}

/**
* Cancels all orders
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#cancel-all-open-orders-on-a-symbol-trade
* @param {string} symbol - the symbol to cancel
* @return {promise or undefined} - omitting the callback returns a promise
*/
async cancelAll(symbol: string, params: Dict = {}): Promise<CancelOrder> {
return await this.privateSpotRequest('v3/openOrders', this.extend({ symbol: symbol }, params), 'DELETE');
}

/**
* Gets the status of an order
* @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/trading-endpoints#query-order-user_data
Expand Down
Loading