Skip to content

Commit 40c65da

Browse files
authored
Merge pull request #943 from ccxt/futuresCancelAll-type-fix
fix(client): update return type for futuresCancelMultipleOrders and f…
2 parents e6a8a90 + 42bf438 commit 40c65da

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/node-binance-api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4343,7 +4343,7 @@ export default class Binance {
43434343
/**
43444344
* @see https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders
43454345
*/
4346-
async futuresCancelMultipleOrders(symbol: string, params: Dict = {}) {
4346+
async futuresCancelMultipleOrders(symbol: string, params: Dict = {}): Promise<(FuturesOrder|Response)[]> {
43474347
return await this.privateFuturesRequest('v1/batchOrders', this.extend({ 'symbol': symbol }, params), 'DELETE');
43484348
}
43494349

@@ -4379,7 +4379,7 @@ export default class Binance {
43794379
* @param params extra parameters to be sent in the request
43804380
* @returns
43814381
*/
4382-
async futuresCancelAll(symbol: string, params: Dict = {}): Promise<FuturesCancelAllOpenOrder[]> {
4382+
async futuresCancelAll(symbol: string, params: Dict = {}): Promise<Response> {
43834383
params.symbol = symbol;
43844384
return await this.privateFuturesRequest('v1/allOpenOrders', params, 'DELETE');
43854385
}

src/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ export type OrderStatus =
4444

4545
export type TimeInForce = 'GTC' | 'IOC' | 'FOK' | 'GTE_GTC' | 'GTD'
4646

47+
export interface Response {
48+
code: number
49+
msg: string
50+
}
51+
4752
export interface Candle {
4853
openTime: number
4954
open: string

0 commit comments

Comments
 (0)