ccxt 4.3.58 → 4.3.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +4 -2
- package/dist/cjs/src/base/Exchange.js +4 -4
- package/dist/cjs/src/base/errors.js +22 -22
- package/dist/cjs/src/binance.js +90 -1
- package/dist/cjs/src/bingx.js +467 -123
- package/dist/cjs/src/bitfinex.js +38 -4
- package/dist/cjs/src/bitmart.js +1 -0
- package/dist/cjs/src/bitso.js +4 -1
- package/dist/cjs/src/btcbox.js +149 -7
- package/dist/cjs/src/bybit.js +3 -5
- package/dist/cjs/src/cryptocom.js +14 -6
- package/dist/cjs/src/deribit.js +15 -1
- package/dist/cjs/src/digifinex.js +32 -7
- package/dist/cjs/src/gate.js +16 -17
- package/dist/cjs/src/htx.js +7 -7
- package/dist/cjs/src/hyperliquid.js +108 -2
- package/dist/cjs/src/kraken.js +1 -1
- package/dist/cjs/src/mexc.js +11 -11
- package/dist/cjs/src/okx.js +11 -2
- package/dist/cjs/src/pro/binance.js +11 -13
- package/dist/cjs/src/pro/bingx.js +11 -8
- package/dist/cjs/src/pro/cex.js +1 -1
- package/dist/cjs/src/pro/kucoin.js +35 -3
- package/dist/cjs/src/pro/phemex.js +1 -1
- package/dist/cjs/src/pro/xt.js +1112 -0
- package/dist/cjs/src/timex.js +18 -2
- package/dist/cjs/src/upbit.js +148 -49
- package/dist/cjs/src/xt.js +73 -8
- package/js/ccxt.d.ts +6 -3
- package/js/ccxt.js +5 -3
- package/js/src/abstract/bingx.d.ts +1 -1
- package/js/src/abstract/bitmart.d.ts +1 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/abstract/upbit.d.ts +3 -0
- package/js/src/abstract/xt.d.ts +1 -0
- package/js/src/base/Exchange.d.ts +3 -3
- package/js/src/base/Exchange.js +5 -5
- package/js/src/base/errorHierarchy.d.ts +5 -5
- package/js/src/base/errorHierarchy.js +5 -5
- package/js/src/base/errors.d.ts +15 -15
- package/js/src/base/errors.js +22 -22
- package/js/src/binance.d.ts +1 -1
- package/js/src/binance.js +90 -1
- package/js/src/bingx.js +467 -123
- package/js/src/bitfinex.d.ts +2 -2
- package/js/src/bitfinex.js +38 -4
- package/js/src/bitmart.js +1 -0
- package/js/src/bitso.js +4 -1
- package/js/src/btcbox.d.ts +4 -1
- package/js/src/btcbox.js +149 -7
- package/js/src/bybit.js +3 -5
- package/js/src/cryptocom.js +14 -6
- package/js/src/deribit.d.ts +1 -1
- package/js/src/deribit.js +15 -1
- package/js/src/digifinex.d.ts +3 -2
- package/js/src/digifinex.js +32 -7
- package/js/src/gate.js +16 -17
- package/js/src/htx.js +7 -7
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +108 -2
- package/js/src/kraken.js +1 -1
- package/js/src/mexc.js +11 -11
- package/js/src/okx.js +11 -2
- package/js/src/pro/binance.js +11 -13
- package/js/src/pro/bingx.js +11 -8
- package/js/src/pro/bitmart.d.ts +3 -3
- package/js/src/pro/bitopro.d.ts +2 -2
- package/js/src/pro/cex.js +1 -1
- package/js/src/pro/coincheck.d.ts +2 -2
- package/js/src/pro/coinone.d.ts +2 -2
- package/js/src/pro/hyperliquid.d.ts +2 -2
- package/js/src/pro/kucoin.js +35 -3
- package/js/src/pro/phemex.js +1 -1
- package/js/src/pro/xt.d.ts +31 -0
- package/js/src/pro/xt.js +1113 -0
- package/js/src/timex.d.ts +2 -2
- package/js/src/timex.js +18 -2
- package/js/src/upbit.d.ts +0 -1
- package/js/src/upbit.js +148 -49
- package/js/src/xt.js +73 -8
- package/package.json +1 -1
package/js/src/base/Exchange.js
CHANGED
|
@@ -11,7 +11,7 @@ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sor
|
|
|
11
11
|
import { keys as keysFunc, values as valuesFunc, vwap as vwapFunc } from './functions.js';
|
|
12
12
|
// import exceptions from "./errors.js"
|
|
13
13
|
import { // eslint-disable-line object-curly-newline
|
|
14
|
-
ExchangeError, BadSymbol, NullResponse, InvalidAddress, InvalidOrder, NotSupported, BadResponse, AuthenticationError, DDoSProtection, RequestTimeout, NetworkError,
|
|
14
|
+
ExchangeError, BadSymbol, NullResponse, InvalidAddress, InvalidOrder, NotSupported, BadResponse, AuthenticationError, DDoSProtection, RequestTimeout, NetworkError, InvalidProxySettings, ExchangeNotAvailable, ArgumentsRequired, RateLimitExceeded, BadRequest, ExchangeClosedByUser } from "./errors.js";
|
|
15
15
|
import { Precise } from './Precise.js';
|
|
16
16
|
//-----------------------------------------------------------------------------
|
|
17
17
|
import WsClient from './ws/WsClient.js';
|
|
@@ -1689,7 +1689,7 @@ export default class Exchange {
|
|
|
1689
1689
|
const length = usedProxies.length;
|
|
1690
1690
|
if (length > 1) {
|
|
1691
1691
|
const joinedProxyNames = usedProxies.join(',');
|
|
1692
|
-
throw new
|
|
1692
|
+
throw new InvalidProxySettings(this.id + ' you have multiple conflicting proxy settings (' + joinedProxyNames + '), please use only one from : proxyUrl, proxy_url, proxyUrlCallback, proxy_url_callback');
|
|
1693
1693
|
}
|
|
1694
1694
|
return proxyUrl;
|
|
1695
1695
|
}
|
|
@@ -1753,7 +1753,7 @@ export default class Exchange {
|
|
|
1753
1753
|
const length = usedProxies.length;
|
|
1754
1754
|
if (length > 1) {
|
|
1755
1755
|
const joinedProxyNames = usedProxies.join(',');
|
|
1756
|
-
throw new
|
|
1756
|
+
throw new InvalidProxySettings(this.id + ' you have multiple conflicting proxy settings (' + joinedProxyNames + '), please use only one from: httpProxy, httpsProxy, httpProxyCallback, httpsProxyCallback, socksProxy, socksProxyCallback');
|
|
1757
1757
|
}
|
|
1758
1758
|
return [httpProxy, httpsProxy, socksProxy];
|
|
1759
1759
|
}
|
|
@@ -1793,13 +1793,13 @@ export default class Exchange {
|
|
|
1793
1793
|
const length = usedProxies.length;
|
|
1794
1794
|
if (length > 1) {
|
|
1795
1795
|
const joinedProxyNames = usedProxies.join(',');
|
|
1796
|
-
throw new
|
|
1796
|
+
throw new InvalidProxySettings(this.id + ' you have multiple conflicting proxy settings (' + joinedProxyNames + '), please use only one from: wsProxy, wssProxy, wsSocksProxy');
|
|
1797
1797
|
}
|
|
1798
1798
|
return [wsProxy, wssProxy, wsSocksProxy];
|
|
1799
1799
|
}
|
|
1800
1800
|
checkConflictingProxies(proxyAgentSet, proxyUrlSet) {
|
|
1801
1801
|
if (proxyAgentSet && proxyUrlSet) {
|
|
1802
|
-
throw new
|
|
1802
|
+
throw new InvalidProxySettings(this.id + ' you have multiple conflicting proxy settings, please use only one from : proxyUrl, httpProxy, httpsProxy, socksProxy');
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
1805
|
findMessageHashes(client, element) {
|
|
@@ -17,9 +17,6 @@ declare const errorHierarchy: {
|
|
|
17
17
|
};
|
|
18
18
|
MarketClosed: {};
|
|
19
19
|
};
|
|
20
|
-
BadResponse: {
|
|
21
|
-
NullResponse: {};
|
|
22
|
-
};
|
|
23
20
|
InsufficientFunds: {};
|
|
24
21
|
InvalidAddress: {
|
|
25
22
|
AddressPending: {};
|
|
@@ -27,14 +24,13 @@ declare const errorHierarchy: {
|
|
|
27
24
|
InvalidOrder: {
|
|
28
25
|
OrderNotFound: {};
|
|
29
26
|
OrderNotCached: {};
|
|
30
|
-
CancelPending: {};
|
|
31
27
|
OrderImmediatelyFillable: {};
|
|
32
28
|
OrderNotFillable: {};
|
|
33
29
|
DuplicateOrderId: {};
|
|
34
30
|
ContractUnavailable: {};
|
|
35
31
|
};
|
|
36
32
|
NotSupported: {};
|
|
37
|
-
|
|
33
|
+
InvalidProxySettings: {};
|
|
38
34
|
ExchangeClosedByUser: {};
|
|
39
35
|
};
|
|
40
36
|
OperationFailed: {
|
|
@@ -47,6 +43,10 @@ declare const errorHierarchy: {
|
|
|
47
43
|
InvalidNonce: {};
|
|
48
44
|
RequestTimeout: {};
|
|
49
45
|
};
|
|
46
|
+
BadResponse: {
|
|
47
|
+
NullResponse: {};
|
|
48
|
+
};
|
|
49
|
+
CancelPending: {};
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
};
|
|
@@ -23,9 +23,6 @@ const errorHierarchy = {
|
|
|
23
23
|
},
|
|
24
24
|
'MarketClosed': {},
|
|
25
25
|
},
|
|
26
|
-
'BadResponse': {
|
|
27
|
-
'NullResponse': {},
|
|
28
|
-
},
|
|
29
26
|
'InsufficientFunds': {},
|
|
30
27
|
'InvalidAddress': {
|
|
31
28
|
'AddressPending': {},
|
|
@@ -33,14 +30,13 @@ const errorHierarchy = {
|
|
|
33
30
|
'InvalidOrder': {
|
|
34
31
|
'OrderNotFound': {},
|
|
35
32
|
'OrderNotCached': {},
|
|
36
|
-
'CancelPending': {},
|
|
37
33
|
'OrderImmediatelyFillable': {},
|
|
38
34
|
'OrderNotFillable': {},
|
|
39
35
|
'DuplicateOrderId': {},
|
|
40
36
|
'ContractUnavailable': {},
|
|
41
37
|
},
|
|
42
38
|
'NotSupported': {},
|
|
43
|
-
'
|
|
39
|
+
'InvalidProxySettings': {},
|
|
44
40
|
'ExchangeClosedByUser': {},
|
|
45
41
|
},
|
|
46
42
|
'OperationFailed': {
|
|
@@ -53,6 +49,10 @@ const errorHierarchy = {
|
|
|
53
49
|
'InvalidNonce': {},
|
|
54
50
|
'RequestTimeout': {},
|
|
55
51
|
},
|
|
52
|
+
'BadResponse': {
|
|
53
|
+
'NullResponse': {},
|
|
54
|
+
},
|
|
55
|
+
'CancelPending': {},
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
};
|
package/js/src/base/errors.d.ts
CHANGED
|
@@ -37,12 +37,6 @@ declare class MarginModeAlreadySet extends NoChange {
|
|
|
37
37
|
declare class MarketClosed extends OperationRejected {
|
|
38
38
|
constructor(message: string);
|
|
39
39
|
}
|
|
40
|
-
declare class BadResponse extends ExchangeError {
|
|
41
|
-
constructor(message: string);
|
|
42
|
-
}
|
|
43
|
-
declare class NullResponse extends BadResponse {
|
|
44
|
-
constructor(message: string);
|
|
45
|
-
}
|
|
46
40
|
declare class InsufficientFunds extends ExchangeError {
|
|
47
41
|
constructor(message: string);
|
|
48
42
|
}
|
|
@@ -61,9 +55,6 @@ declare class OrderNotFound extends InvalidOrder {
|
|
|
61
55
|
declare class OrderNotCached extends InvalidOrder {
|
|
62
56
|
constructor(message: string);
|
|
63
57
|
}
|
|
64
|
-
declare class CancelPending extends InvalidOrder {
|
|
65
|
-
constructor(message: string);
|
|
66
|
-
}
|
|
67
58
|
declare class OrderImmediatelyFillable extends InvalidOrder {
|
|
68
59
|
constructor(message: string);
|
|
69
60
|
}
|
|
@@ -79,7 +70,7 @@ declare class ContractUnavailable extends InvalidOrder {
|
|
|
79
70
|
declare class NotSupported extends ExchangeError {
|
|
80
71
|
constructor(message: string);
|
|
81
72
|
}
|
|
82
|
-
declare class
|
|
73
|
+
declare class InvalidProxySettings extends ExchangeError {
|
|
83
74
|
constructor(message: string);
|
|
84
75
|
}
|
|
85
76
|
declare class ExchangeClosedByUser extends ExchangeError {
|
|
@@ -109,7 +100,16 @@ declare class InvalidNonce extends NetworkError {
|
|
|
109
100
|
declare class RequestTimeout extends NetworkError {
|
|
110
101
|
constructor(message: string);
|
|
111
102
|
}
|
|
112
|
-
|
|
103
|
+
declare class BadResponse extends OperationFailed {
|
|
104
|
+
constructor(message: string);
|
|
105
|
+
}
|
|
106
|
+
declare class NullResponse extends BadResponse {
|
|
107
|
+
constructor(message: string);
|
|
108
|
+
}
|
|
109
|
+
declare class CancelPending extends OperationFailed {
|
|
110
|
+
constructor(message: string);
|
|
111
|
+
}
|
|
112
|
+
export { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending };
|
|
113
113
|
declare const _default: {
|
|
114
114
|
BaseError: typeof BaseError;
|
|
115
115
|
ExchangeError: typeof ExchangeError;
|
|
@@ -124,21 +124,18 @@ declare const _default: {
|
|
|
124
124
|
NoChange: typeof NoChange;
|
|
125
125
|
MarginModeAlreadySet: typeof MarginModeAlreadySet;
|
|
126
126
|
MarketClosed: typeof MarketClosed;
|
|
127
|
-
BadResponse: typeof BadResponse;
|
|
128
|
-
NullResponse: typeof NullResponse;
|
|
129
127
|
InsufficientFunds: typeof InsufficientFunds;
|
|
130
128
|
InvalidAddress: typeof InvalidAddress;
|
|
131
129
|
AddressPending: typeof AddressPending;
|
|
132
130
|
InvalidOrder: typeof InvalidOrder;
|
|
133
131
|
OrderNotFound: typeof OrderNotFound;
|
|
134
132
|
OrderNotCached: typeof OrderNotCached;
|
|
135
|
-
CancelPending: typeof CancelPending;
|
|
136
133
|
OrderImmediatelyFillable: typeof OrderImmediatelyFillable;
|
|
137
134
|
OrderNotFillable: typeof OrderNotFillable;
|
|
138
135
|
DuplicateOrderId: typeof DuplicateOrderId;
|
|
139
136
|
ContractUnavailable: typeof ContractUnavailable;
|
|
140
137
|
NotSupported: typeof NotSupported;
|
|
141
|
-
|
|
138
|
+
InvalidProxySettings: typeof InvalidProxySettings;
|
|
142
139
|
ExchangeClosedByUser: typeof ExchangeClosedByUser;
|
|
143
140
|
OperationFailed: typeof OperationFailed;
|
|
144
141
|
NetworkError: typeof NetworkError;
|
|
@@ -148,5 +145,8 @@ declare const _default: {
|
|
|
148
145
|
OnMaintenance: typeof OnMaintenance;
|
|
149
146
|
InvalidNonce: typeof InvalidNonce;
|
|
150
147
|
RequestTimeout: typeof RequestTimeout;
|
|
148
|
+
BadResponse: typeof BadResponse;
|
|
149
|
+
NullResponse: typeof NullResponse;
|
|
150
|
+
CancelPending: typeof CancelPending;
|
|
151
151
|
};
|
|
152
152
|
export default _default;
|
package/js/src/base/errors.js
CHANGED
|
@@ -83,18 +83,6 @@ class MarketClosed extends OperationRejected {
|
|
|
83
83
|
this.name = 'MarketClosed';
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
class BadResponse extends ExchangeError {
|
|
87
|
-
constructor(message) {
|
|
88
|
-
super(message);
|
|
89
|
-
this.name = 'BadResponse';
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
class NullResponse extends BadResponse {
|
|
93
|
-
constructor(message) {
|
|
94
|
-
super(message);
|
|
95
|
-
this.name = 'NullResponse';
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
86
|
class InsufficientFunds extends ExchangeError {
|
|
99
87
|
constructor(message) {
|
|
100
88
|
super(message);
|
|
@@ -131,12 +119,6 @@ class OrderNotCached extends InvalidOrder {
|
|
|
131
119
|
this.name = 'OrderNotCached';
|
|
132
120
|
}
|
|
133
121
|
}
|
|
134
|
-
class CancelPending extends InvalidOrder {
|
|
135
|
-
constructor(message) {
|
|
136
|
-
super(message);
|
|
137
|
-
this.name = 'CancelPending';
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
122
|
class OrderImmediatelyFillable extends InvalidOrder {
|
|
141
123
|
constructor(message) {
|
|
142
124
|
super(message);
|
|
@@ -167,10 +149,10 @@ class NotSupported extends ExchangeError {
|
|
|
167
149
|
this.name = 'NotSupported';
|
|
168
150
|
}
|
|
169
151
|
}
|
|
170
|
-
class
|
|
152
|
+
class InvalidProxySettings extends ExchangeError {
|
|
171
153
|
constructor(message) {
|
|
172
154
|
super(message);
|
|
173
|
-
this.name = '
|
|
155
|
+
this.name = 'InvalidProxySettings';
|
|
174
156
|
}
|
|
175
157
|
}
|
|
176
158
|
class ExchangeClosedByUser extends ExchangeError {
|
|
@@ -227,5 +209,23 @@ class RequestTimeout extends NetworkError {
|
|
|
227
209
|
this.name = 'RequestTimeout';
|
|
228
210
|
}
|
|
229
211
|
}
|
|
230
|
-
|
|
231
|
-
|
|
212
|
+
class BadResponse extends OperationFailed {
|
|
213
|
+
constructor(message) {
|
|
214
|
+
super(message);
|
|
215
|
+
this.name = 'BadResponse';
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
class NullResponse extends BadResponse {
|
|
219
|
+
constructor(message) {
|
|
220
|
+
super(message);
|
|
221
|
+
this.name = 'NullResponse';
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
class CancelPending extends OperationFailed {
|
|
225
|
+
constructor(message) {
|
|
226
|
+
super(message);
|
|
227
|
+
this.name = 'CancelPending';
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
export { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending };
|
|
231
|
+
export default { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, BadResponse, NullResponse, CancelPending };
|
package/js/src/binance.d.ts
CHANGED
|
@@ -68,7 +68,7 @@ export default class binance extends Exchange {
|
|
|
68
68
|
fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
|
|
69
69
|
fetchCanceledAndClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
70
70
|
cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
|
|
71
|
-
cancelAllOrders(symbol?: Str, params?: {}): Promise<
|
|
71
|
+
cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
|
|
72
72
|
cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<Order[]>;
|
|
73
73
|
fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
74
74
|
fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
package/js/src/binance.js
CHANGED
|
@@ -7105,31 +7105,73 @@ export default class binance extends Exchange {
|
|
|
7105
7105
|
let response = undefined;
|
|
7106
7106
|
if (market['option']) {
|
|
7107
7107
|
response = await this.eapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
7108
|
+
//
|
|
7109
|
+
// {
|
|
7110
|
+
// "code": 0,
|
|
7111
|
+
// "msg": "success"
|
|
7112
|
+
// }
|
|
7113
|
+
//
|
|
7108
7114
|
}
|
|
7109
7115
|
else if (market['linear']) {
|
|
7110
7116
|
if (isPortfolioMargin) {
|
|
7111
7117
|
if (isConditional) {
|
|
7112
7118
|
response = await this.papiDeleteUmConditionalAllOpenOrders(this.extend(request, params));
|
|
7119
|
+
//
|
|
7120
|
+
// {
|
|
7121
|
+
// "code": "200",
|
|
7122
|
+
// "msg": "The operation of cancel all conditional open order is done."
|
|
7123
|
+
// }
|
|
7124
|
+
//
|
|
7113
7125
|
}
|
|
7114
7126
|
else {
|
|
7115
7127
|
response = await this.papiDeleteUmAllOpenOrders(this.extend(request, params));
|
|
7128
|
+
//
|
|
7129
|
+
// {
|
|
7130
|
+
// "code": 200,
|
|
7131
|
+
// "msg": "The operation of cancel all open order is done."
|
|
7132
|
+
// }
|
|
7133
|
+
//
|
|
7116
7134
|
}
|
|
7117
7135
|
}
|
|
7118
7136
|
else {
|
|
7119
7137
|
response = await this.fapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
7138
|
+
//
|
|
7139
|
+
// {
|
|
7140
|
+
// "code": 200,
|
|
7141
|
+
// "msg": "The operation of cancel all open order is done."
|
|
7142
|
+
// }
|
|
7143
|
+
//
|
|
7120
7144
|
}
|
|
7121
7145
|
}
|
|
7122
7146
|
else if (market['inverse']) {
|
|
7123
7147
|
if (isPortfolioMargin) {
|
|
7124
7148
|
if (isConditional) {
|
|
7125
7149
|
response = await this.papiDeleteCmConditionalAllOpenOrders(this.extend(request, params));
|
|
7150
|
+
//
|
|
7151
|
+
// {
|
|
7152
|
+
// "code": "200",
|
|
7153
|
+
// "msg": "The operation of cancel all conditional open order is done."
|
|
7154
|
+
// }
|
|
7155
|
+
//
|
|
7126
7156
|
}
|
|
7127
7157
|
else {
|
|
7128
7158
|
response = await this.papiDeleteCmAllOpenOrders(this.extend(request, params));
|
|
7159
|
+
//
|
|
7160
|
+
// {
|
|
7161
|
+
// "code": 200,
|
|
7162
|
+
// "msg": "The operation of cancel all open order is done."
|
|
7163
|
+
// }
|
|
7164
|
+
//
|
|
7129
7165
|
}
|
|
7130
7166
|
}
|
|
7131
7167
|
else {
|
|
7132
7168
|
response = await this.dapiPrivateDeleteAllOpenOrders(this.extend(request, params));
|
|
7169
|
+
//
|
|
7170
|
+
// {
|
|
7171
|
+
// "code": 200,
|
|
7172
|
+
// "msg": "The operation of cancel all open order is done."
|
|
7173
|
+
// }
|
|
7174
|
+
//
|
|
7133
7175
|
}
|
|
7134
7176
|
}
|
|
7135
7177
|
else if ((type === 'margin') || (marginMode !== undefined) || isPortfolioMargin) {
|
|
@@ -7141,16 +7183,63 @@ export default class binance extends Exchange {
|
|
|
7141
7183
|
request['isIsolated'] = true;
|
|
7142
7184
|
}
|
|
7143
7185
|
response = await this.sapiDeleteMarginOpenOrders(this.extend(request, params));
|
|
7186
|
+
//
|
|
7187
|
+
// [
|
|
7188
|
+
// {
|
|
7189
|
+
// "symbol": "BTCUSDT",
|
|
7190
|
+
// "isIsolated": true, // if isolated margin
|
|
7191
|
+
// "origClientOrderId": "E6APeyTJvkMvLMYMqu1KQ4",
|
|
7192
|
+
// "orderId": 11,
|
|
7193
|
+
// "orderListId": -1,
|
|
7194
|
+
// "clientOrderId": "pXLV6Hz6mprAcVYpVMTGgx",
|
|
7195
|
+
// "price": "0.089853",
|
|
7196
|
+
// "origQty": "0.178622",
|
|
7197
|
+
// "executedQty": "0.000000",
|
|
7198
|
+
// "cummulativeQuoteQty": "0.000000",
|
|
7199
|
+
// "status": "CANCELED",
|
|
7200
|
+
// "timeInForce": "GTC",
|
|
7201
|
+
// "type": "LIMIT",
|
|
7202
|
+
// "side": "BUY",
|
|
7203
|
+
// "selfTradePreventionMode": "NONE"
|
|
7204
|
+
// },
|
|
7205
|
+
// ...
|
|
7206
|
+
// ]
|
|
7207
|
+
//
|
|
7144
7208
|
}
|
|
7145
7209
|
}
|
|
7146
7210
|
else {
|
|
7147
7211
|
response = await this.privateDeleteOpenOrders(this.extend(request, params));
|
|
7212
|
+
//
|
|
7213
|
+
// [
|
|
7214
|
+
// {
|
|
7215
|
+
// "symbol": "ADAUSDT",
|
|
7216
|
+
// "origClientOrderId": "x-R4BD3S82662cde7a90114475b86e21",
|
|
7217
|
+
// "orderId": 3935107,
|
|
7218
|
+
// "orderListId": -1,
|
|
7219
|
+
// "clientOrderId": "bqM2w1oTlugfRAjnTIFBE8",
|
|
7220
|
+
// "transactTime": 1720589016657,
|
|
7221
|
+
// "price": "0.35000000",
|
|
7222
|
+
// "origQty": "30.00000000",
|
|
7223
|
+
// "executedQty": "0.00000000",
|
|
7224
|
+
// "cummulativeQuoteQty": "0.00000000",
|
|
7225
|
+
// "status": "CANCELED",
|
|
7226
|
+
// "timeInForce": "GTC",
|
|
7227
|
+
// "type": "LIMIT",
|
|
7228
|
+
// "side": "BUY",
|
|
7229
|
+
// "selfTradePreventionMode": "EXPIRE_MAKER"
|
|
7230
|
+
// }
|
|
7231
|
+
// ]
|
|
7232
|
+
//
|
|
7148
7233
|
}
|
|
7149
7234
|
if (Array.isArray(response)) {
|
|
7150
7235
|
return this.parseOrders(response, market);
|
|
7151
7236
|
}
|
|
7152
7237
|
else {
|
|
7153
|
-
return
|
|
7238
|
+
return [
|
|
7239
|
+
this.safeOrder({
|
|
7240
|
+
'info': response,
|
|
7241
|
+
}),
|
|
7242
|
+
];
|
|
7154
7243
|
}
|
|
7155
7244
|
}
|
|
7156
7245
|
async cancelOrders(ids, symbol = undefined, params = {}) {
|