ccxt 4.5.44 → 4.5.45
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 +9 -12
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -12
- package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +36 -3
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/functions/generic.js +8 -2
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/gate.js +227 -168
- package/dist/cjs/src/grvt.js +3 -2
- package/dist/cjs/src/hyperliquid.js +16 -5
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/krakenfutures.js +1 -5
- package/dist/cjs/src/kucoin.js +4729 -970
- package/dist/cjs/src/kucoinfutures.js +14 -3434
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/gate.js +37 -1
- package/dist/cjs/src/pro/kucoin.js +819 -178
- package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
- package/dist/cjs/src/pro/mexc.js +10 -5
- package/dist/cjs/src/pro/okx.js +84 -39
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/kucoin.d.ts +46 -3
- package/js/src/abstract/kucoinfutures.d.ts +27 -12
- package/js/src/base/Exchange.d.ts +12 -1
- package/js/src/base/Exchange.js +36 -3
- package/js/src/base/functions/encode.js +2 -2
- package/js/src/base/functions/generic.js +9 -3
- package/js/src/bitrue.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/cex.js +2 -1
- package/js/src/gate.d.ts +125 -119
- package/js/src/gate.js +227 -168
- package/js/src/grvt.js +3 -2
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +16 -5
- package/js/src/kraken.js +2 -2
- package/js/src/krakenfutures.js +1 -5
- package/js/src/kucoin.d.ts +696 -100
- package/js/src/kucoin.js +4730 -971
- package/js/src/kucoinfutures.d.ts +4 -522
- package/js/src/kucoinfutures.js +14 -3434
- package/js/src/lbank.js +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/gate.d.ts +30 -1
- package/js/src/pro/gate.js +37 -1
- package/js/src/pro/kucoin.d.ts +70 -30
- package/js/src/pro/kucoin.js +821 -180
- package/js/src/pro/kucoinfutures.d.ts +17 -195
- package/js/src/pro/kucoinfutures.js +96 -1262
- package/js/src/pro/mexc.js +10 -5
- package/js/src/pro/okx.d.ts +1 -0
- package/js/src/pro/okx.js +84 -39
- package/package.json +1 -1
- package/dist/cjs/src/abstract/alp.js +0 -11
- package/dist/cjs/src/abstract/defx.js +0 -11
- package/dist/cjs/src/abstract/timex.js +0 -11
- package/dist/cjs/src/alp.js +0 -1059
- package/dist/cjs/src/defx.js +0 -2142
- package/dist/cjs/src/pro/defx.js +0 -866
- package/dist/cjs/src/timex.js +0 -1793
- package/js/src/abstract/alp.d.ts +0 -21
- package/js/src/abstract/alp.js +0 -5
- package/js/src/abstract/defx.d.ts +0 -72
- package/js/src/abstract/defx.js +0 -5
- package/js/src/abstract/timex.d.ts +0 -65
- package/js/src/abstract/timex.js +0 -5
- package/js/src/alp.d.ts +0 -209
- package/js/src/alp.js +0 -1052
- package/js/src/defx.d.ts +0 -348
- package/js/src/defx.js +0 -2135
- package/js/src/pro/defx.d.ts +0 -236
- package/js/src/pro/defx.js +0 -859
- package/js/src/timex.d.ts +0 -247
- package/js/src/timex.js +0 -1786
package/dist/cjs/ccxt.js
CHANGED
|
@@ -9,7 +9,6 @@ var Precise = require('./src/base/Precise.js');
|
|
|
9
9
|
var functions = require('./src/base/functions.js');
|
|
10
10
|
var errors = require('./src/base/errors.js');
|
|
11
11
|
var aftermath = require('./src/aftermath.js');
|
|
12
|
-
var alp = require('./src/alp.js');
|
|
13
12
|
var alpaca = require('./src/alpaca.js');
|
|
14
13
|
var apex = require('./src/apex.js');
|
|
15
14
|
var arkham = require('./src/arkham.js');
|
|
@@ -63,7 +62,6 @@ var coinspot = require('./src/coinspot.js');
|
|
|
63
62
|
var cryptocom = require('./src/cryptocom.js');
|
|
64
63
|
var cryptomus = require('./src/cryptomus.js');
|
|
65
64
|
var deepcoin = require('./src/deepcoin.js');
|
|
66
|
-
var defx = require('./src/defx.js');
|
|
67
65
|
var delta = require('./src/delta.js');
|
|
68
66
|
var deribit = require('./src/deribit.js');
|
|
69
67
|
var derive = require('./src/derive.js');
|
|
@@ -108,7 +106,6 @@ var paradex = require('./src/paradex.js');
|
|
|
108
106
|
var paymium = require('./src/paymium.js');
|
|
109
107
|
var phemex = require('./src/phemex.js');
|
|
110
108
|
var poloniex = require('./src/poloniex.js');
|
|
111
|
-
var timex = require('./src/timex.js');
|
|
112
109
|
var tokocrypto = require('./src/tokocrypto.js');
|
|
113
110
|
var toobit = require('./src/toobit.js');
|
|
114
111
|
var upbit = require('./src/upbit.js');
|
|
@@ -160,7 +157,6 @@ var coinex$1 = require('./src/pro/coinex.js');
|
|
|
160
157
|
var coinone$1 = require('./src/pro/coinone.js');
|
|
161
158
|
var cryptocom$1 = require('./src/pro/cryptocom.js');
|
|
162
159
|
var deepcoin$1 = require('./src/pro/deepcoin.js');
|
|
163
|
-
var defx$1 = require('./src/pro/defx.js');
|
|
164
160
|
var deribit$1 = require('./src/pro/deribit.js');
|
|
165
161
|
var derive$1 = require('./src/pro/derive.js');
|
|
166
162
|
var dydx$1 = require('./src/pro/dydx.js');
|
|
@@ -204,11 +200,10 @@ var xt$1 = require('./src/pro/xt.js');
|
|
|
204
200
|
|
|
205
201
|
//-----------------------------------------------------------------------------
|
|
206
202
|
// this is updated by vss.js when building
|
|
207
|
-
const version = '4.5.
|
|
203
|
+
const version = '4.5.45';
|
|
208
204
|
Exchange["default"].ccxtVersion = version;
|
|
209
205
|
const exchanges = {
|
|
210
206
|
'aftermath': aftermath["default"],
|
|
211
|
-
'alp': alp["default"],
|
|
212
207
|
'alpaca': alpaca["default"],
|
|
213
208
|
'apex': apex["default"],
|
|
214
209
|
'arkham': arkham["default"],
|
|
@@ -262,7 +257,6 @@ const exchanges = {
|
|
|
262
257
|
'cryptocom': cryptocom["default"],
|
|
263
258
|
'cryptomus': cryptomus["default"],
|
|
264
259
|
'deepcoin': deepcoin["default"],
|
|
265
|
-
'defx': defx["default"],
|
|
266
260
|
'delta': delta["default"],
|
|
267
261
|
'deribit': deribit["default"],
|
|
268
262
|
'derive': derive["default"],
|
|
@@ -307,7 +301,6 @@ const exchanges = {
|
|
|
307
301
|
'paymium': paymium["default"],
|
|
308
302
|
'phemex': phemex["default"],
|
|
309
303
|
'poloniex': poloniex["default"],
|
|
310
|
-
'timex': timex["default"],
|
|
311
304
|
'tokocrypto': tokocrypto["default"],
|
|
312
305
|
'toobit': toobit["default"],
|
|
313
306
|
'upbit': upbit["default"],
|
|
@@ -361,7 +354,6 @@ const pro = {
|
|
|
361
354
|
'coinone': coinone$1["default"],
|
|
362
355
|
'cryptocom': cryptocom$1["default"],
|
|
363
356
|
'deepcoin': deepcoin$1["default"],
|
|
364
|
-
'defx': defx$1["default"],
|
|
365
357
|
'deribit': deribit$1["default"],
|
|
366
358
|
'derive': derive$1["default"],
|
|
367
359
|
'dydx': dydx$1["default"],
|
|
@@ -455,7 +447,6 @@ exports.RestrictedLocation = errors.RestrictedLocation;
|
|
|
455
447
|
exports.UnsubscribeError = errors.UnsubscribeError;
|
|
456
448
|
exports.errors = errors;
|
|
457
449
|
exports.aftermath = aftermath["default"];
|
|
458
|
-
exports.alp = alp["default"];
|
|
459
450
|
exports.alpaca = alpaca["default"];
|
|
460
451
|
exports.apex = apex["default"];
|
|
461
452
|
exports.arkham = arkham["default"];
|
|
@@ -509,7 +500,6 @@ exports.coinspot = coinspot["default"];
|
|
|
509
500
|
exports.cryptocom = cryptocom["default"];
|
|
510
501
|
exports.cryptomus = cryptomus["default"];
|
|
511
502
|
exports.deepcoin = deepcoin["default"];
|
|
512
|
-
exports.defx = defx["default"];
|
|
513
503
|
exports.delta = delta["default"];
|
|
514
504
|
exports.deribit = deribit["default"];
|
|
515
505
|
exports.derive = derive["default"];
|
|
@@ -554,7 +544,6 @@ exports.paradex = paradex["default"];
|
|
|
554
544
|
exports.paymium = paymium["default"];
|
|
555
545
|
exports.phemex = phemex["default"];
|
|
556
546
|
exports.poloniex = poloniex["default"];
|
|
557
|
-
exports.timex = timex["default"];
|
|
558
547
|
exports.tokocrypto = tokocrypto["default"];
|
|
559
548
|
exports.toobit = toobit["default"];
|
|
560
549
|
exports.upbit = upbit["default"];
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var kucoin$1 = require('../kucoin.js');
|
|
6
6
|
|
|
7
|
-
//
|
|
7
|
+
// ----------------------------------------------------------------------------
|
|
8
8
|
class kucoin extends kucoin$1["default"] {
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -2872,8 +2872,8 @@ class Exchange {
|
|
|
2872
2872
|
const res = this.parseToNumeric((value % 1));
|
|
2873
2873
|
return res === 0;
|
|
2874
2874
|
}
|
|
2875
|
-
|
|
2876
|
-
return this.valueIsDefined(value)
|
|
2875
|
+
isEmptyString(value) {
|
|
2876
|
+
return !this.valueIsDefined(value) || value === '';
|
|
2877
2877
|
}
|
|
2878
2878
|
safeNumberOmitZero(obj, key, defaultValue = undefined) {
|
|
2879
2879
|
const value = this.safeString(obj, key);
|
|
@@ -4281,6 +4281,12 @@ class Exchange {
|
|
|
4281
4281
|
}
|
|
4282
4282
|
throw new errors.NotSupported(this.id + ' fetchOHLCV() is not supported yet' + message);
|
|
4283
4283
|
}
|
|
4284
|
+
async fetchSpotOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4285
|
+
throw new errors.NotSupported(this.id + ' fetchSpotOHLCV() is not supported yet');
|
|
4286
|
+
}
|
|
4287
|
+
async fetchContractOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4288
|
+
throw new errors.NotSupported(this.id + ' fetchContractOHLCV() is not supported yet');
|
|
4289
|
+
}
|
|
4284
4290
|
async fetchOHLCVWs(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
4285
4291
|
let message = '';
|
|
4286
4292
|
if (this.has['fetchTradesWs']) {
|
|
@@ -5615,11 +5621,17 @@ class Exchange {
|
|
|
5615
5621
|
async fetchTickers(symbols = undefined, params = {}) {
|
|
5616
5622
|
throw new errors.NotSupported(this.id + ' fetchTickers() is not supported yet');
|
|
5617
5623
|
}
|
|
5624
|
+
async fetchSpotTickers(symbols = undefined, params = {}) {
|
|
5625
|
+
throw new errors.NotSupported(this.id + ' fetchSpotTickers() is not supported yet');
|
|
5626
|
+
}
|
|
5627
|
+
async fetchContractTickers(symbols = undefined, params = {}) {
|
|
5628
|
+
throw new errors.NotSupported(this.id + ' fetchContractTickers() is not supported yet');
|
|
5629
|
+
}
|
|
5618
5630
|
async fetchMarkPrices(symbols = undefined, params = {}) {
|
|
5619
5631
|
throw new errors.NotSupported(this.id + ' fetchMarkPrices() is not supported yet');
|
|
5620
5632
|
}
|
|
5621
5633
|
async fetchTickersWs(symbols = undefined, params = {}) {
|
|
5622
|
-
throw new errors.NotSupported(this.id + '
|
|
5634
|
+
throw new errors.NotSupported(this.id + ' fetchTickersWs() is not supported yet');
|
|
5623
5635
|
}
|
|
5624
5636
|
async fetchOrderBooks(symbols = undefined, limit = undefined, params = {}) {
|
|
5625
5637
|
throw new errors.NotSupported(this.id + ' fetchOrderBooks() is not supported yet');
|
|
@@ -6124,6 +6136,12 @@ class Exchange {
|
|
|
6124
6136
|
async createOrders(orders, params = {}) {
|
|
6125
6137
|
throw new errors.NotSupported(this.id + ' createOrders() is not supported yet');
|
|
6126
6138
|
}
|
|
6139
|
+
async createSpotOrders(orders, params = {}) {
|
|
6140
|
+
throw new errors.NotSupported(this.id + ' createSpotOrders() is not supported yet');
|
|
6141
|
+
}
|
|
6142
|
+
async createContractOrders(orders, params = {}) {
|
|
6143
|
+
throw new errors.NotSupported(this.id + ' createContractOrders() is not supported yet');
|
|
6144
|
+
}
|
|
6127
6145
|
async editOrders(orders, params = {}) {
|
|
6128
6146
|
throw new errors.NotSupported(this.id + ' editOrders() is not supported yet');
|
|
6129
6147
|
}
|
|
@@ -6133,6 +6151,12 @@ class Exchange {
|
|
|
6133
6151
|
async cancelOrder(id, symbol = undefined, params = {}) {
|
|
6134
6152
|
throw new errors.NotSupported(this.id + ' cancelOrder() is not supported yet');
|
|
6135
6153
|
}
|
|
6154
|
+
async cancelSpotOrder(id, symbol = undefined, params = {}) {
|
|
6155
|
+
throw new errors.NotSupported(this.id + ' cancelSpotOrder() is not supported yet');
|
|
6156
|
+
}
|
|
6157
|
+
async cancelContractOrder(id, symbol = undefined, params = {}) {
|
|
6158
|
+
throw new errors.NotSupported(this.id + ' cancelContractOrder() is not supported yet');
|
|
6159
|
+
}
|
|
6136
6160
|
/**
|
|
6137
6161
|
* @method
|
|
6138
6162
|
* @name cancelOrderWithClientOrderId
|
|
@@ -6171,6 +6195,12 @@ class Exchange {
|
|
|
6171
6195
|
async cancelAllOrders(symbol = undefined, params = {}) {
|
|
6172
6196
|
throw new errors.NotSupported(this.id + ' cancelAllOrders() is not supported yet');
|
|
6173
6197
|
}
|
|
6198
|
+
async cancelAllSpotOrders(symbol = undefined, params = {}) {
|
|
6199
|
+
throw new errors.NotSupported(this.id + ' cancelAllSpotOrders() is not supported yet');
|
|
6200
|
+
}
|
|
6201
|
+
async cancelAllContractOrders(symbol = undefined, params = {}) {
|
|
6202
|
+
throw new errors.NotSupported(this.id + ' cancelAllContractOrders() is not supported yet');
|
|
6203
|
+
}
|
|
6174
6204
|
async cancelAllOrdersAfter(timeout, params = {}) {
|
|
6175
6205
|
throw new errors.NotSupported(this.id + ' cancelAllOrdersAfter() is not supported yet');
|
|
6176
6206
|
}
|
|
@@ -6333,6 +6363,9 @@ class Exchange {
|
|
|
6333
6363
|
throw new errors.NotSupported(this.id + ' fetchDepositAddress() is not supported yet');
|
|
6334
6364
|
}
|
|
6335
6365
|
}
|
|
6366
|
+
async fetchContractDepositAddress(code, params = {}) {
|
|
6367
|
+
throw new errors.NotSupported(this.id + ' fetchContractDepositAddress() is not supported yet');
|
|
6368
|
+
}
|
|
6336
6369
|
account() {
|
|
6337
6370
|
return {
|
|
6338
6371
|
'free': undefined,
|
|
@@ -10,8 +10,8 @@ var index$1 = require('../../static_dependencies/qs/index.js');
|
|
|
10
10
|
/* eslint-disable */
|
|
11
11
|
/* ------------------------------------------------------------------------ */
|
|
12
12
|
const json = (data, params = undefined) => JSON.stringify(data), isJsonEncodedObject = (object) => ((typeof object === 'string') &&
|
|
13
|
-
(object.length >= 2) &&
|
|
14
|
-
((object[0] === '{') || (object[0] === '['))), binaryToString = index.utf8.encode, stringToBinary = index.utf8.decode, stringToBase64 = (string) => index.base64.encode(index.utf8.decode(string)), base64ToString = (string) => index.utf8.encode(index.base64.decode(string)), base64ToBinary = index.base64.decode, binaryToBase64 = index.base64.encode, base16ToBinary = index.base16.decode, binaryToBase16 = index.base16.encode, base58ToBinary = index.base58.decode, binaryToBase58 = index.base58.encode, binaryConcat = utils.concatBytes, binaryConcatArray = (arr) => utils.concatBytes(...arr), urlencode = (object, sort = false) => index$1["default"].stringify(object), urlencodeNested = (object) => index$1["default"].stringify(object) // implemented only in python
|
|
13
|
+
// (object.length >= 2) && // commented: https://github.com/ccxt/ccxt/pull/28193
|
|
14
|
+
((object[0] === '{') || (object[0] === '['))), binaryToString = index.utf8.encode, stringToBinary = index.utf8.decode, stringToBase64 = (string) => index.base64.encode(index.utf8.decode(string)), base64ToString = (string) => index.utf8.encode(index.base64.decode(string)), base64ToBinary = index.base64.decode, binaryToBase64 = index.base64.encode, base16ToBinary = index.base16.decode, binaryToBase16 = index.base16.encode, base58ToBinary = index.base58.decode, binaryToBase58 = index.base58.encode, binaryConcat = utils.concatBytes, binaryConcatArray = (arr) => utils.concatBytes(...arr), urlencode = (object, sort = false) => index$1["default"].stringify(object), urlencodeNested = (object) => index$1["default"].stringify(object, { encodeValuesOnly: true }) // implemented only in python
|
|
15
15
|
, urlencodeWithArrayRepeat = (object) => index$1["default"].stringify(object, { arrayFormat: 'repeat' }), rawencode = (object, sort = false) => index$1["default"].stringify(object, { encode: false }), encode = index.utf8.decode // lol
|
|
16
16
|
, decode = index.utf8.encode
|
|
17
17
|
// Url-safe-base64 without equals signs, with + replaced by - and slashes replaced by underscores
|
|
@@ -19,10 +19,16 @@ const arrayConcat = (a, b) => a.concat(b);
|
|
|
19
19
|
const inArray = (needle, haystack) => haystack.includes(needle);
|
|
20
20
|
const toArray = (object) => Object.values(object);
|
|
21
21
|
const isEmpty = (object) => {
|
|
22
|
-
if (
|
|
22
|
+
if (object === null || object === undefined) {
|
|
23
23
|
return true;
|
|
24
24
|
}
|
|
25
|
-
|
|
25
|
+
if (Array.isArray(object)) {
|
|
26
|
+
return object.length < 1;
|
|
27
|
+
}
|
|
28
|
+
if (type.isDictionary(object)) {
|
|
29
|
+
return Object.keys(object).length < 1;
|
|
30
|
+
}
|
|
31
|
+
return false;
|
|
26
32
|
};
|
|
27
33
|
const keysort = (x, out = {}) => {
|
|
28
34
|
for (const k of keys(x).sort()) {
|
package/dist/cjs/src/bitrue.js
CHANGED
|
@@ -753,7 +753,7 @@ class bitrue extends bitrue$1["default"] {
|
|
|
753
753
|
// {
|
|
754
754
|
// "chain": "BEP20",
|
|
755
755
|
// "enableWithdraw": true,
|
|
756
|
-
// "enableDeposit":
|
|
756
|
+
// "enableDeposit": false,
|
|
757
757
|
// "withdrawFee": "0.2000",
|
|
758
758
|
// "minWithdraw": "5.0000",
|
|
759
759
|
// "maxWithdraw": "1000000000000000.0000",
|
package/dist/cjs/src/bitteam.js
CHANGED
|
@@ -828,7 +828,7 @@ class bitteam extends bitteam$1["default"] {
|
|
|
828
828
|
const response = await this.publicGetTradeApiCmcOrderbookPair(this.extend(request, params));
|
|
829
829
|
//
|
|
830
830
|
// {
|
|
831
|
-
// "timestamp":
|
|
831
|
+
// "timestamp": 1701166703284,
|
|
832
832
|
// "bids": [
|
|
833
833
|
// [
|
|
834
834
|
// 2019.334988,
|
package/dist/cjs/src/btcbox.js
CHANGED
package/dist/cjs/src/cex.js
CHANGED
|
@@ -245,6 +245,7 @@ class cex extends cex$1["default"] {
|
|
|
245
245
|
'Get deposit address for main account is not allowed': errors.PermissionDenied,
|
|
246
246
|
'Market Trigger orders are not allowed': errors.BadRequest,
|
|
247
247
|
'key not passed or incorrect': errors.AuthenticationError,
|
|
248
|
+
'API rate limit reached': errors.RateLimitExceeded, // {"error":"API rate limit reached"}
|
|
248
249
|
},
|
|
249
250
|
},
|
|
250
251
|
'timeframes': {
|