ccxt 4.2.41 → 4.2.42
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 +3 -3
- package/dist/ccxt.browser.js +43 -26
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitget.js +9 -2
- package/dist/cjs/src/bitrue.js +7 -15
- package/dist/cjs/src/digifinex.js +4 -1
- package/dist/cjs/src/gate.js +4 -1
- package/dist/cjs/src/gemini.js +4 -1
- package/dist/cjs/src/mexc.js +4 -1
- package/dist/cjs/src/phemex.js +4 -1
- package/dist/cjs/src/poloniex.js +4 -1
- package/dist/cjs/src/pro/hitbtc.js +1 -1
- package/dist/cjs/src/pro/poloniex.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/base/Exchange.d.ts +20 -20
- package/js/src/bitget.d.ts +2 -2
- package/js/src/bitget.js +9 -2
- package/js/src/bitrue.js +7 -15
- package/js/src/digifinex.js +4 -1
- package/js/src/gate.js +4 -1
- package/js/src/gemini.js +4 -1
- package/js/src/mexc.js +4 -1
- package/js/src/phemex.js +4 -1
- package/js/src/poloniex.js +4 -1
- package/js/src/pro/hitbtc.js +1 -1
- package/js/src/pro/poloniex.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -210,13 +210,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
210
210
|
|
|
211
211
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
212
212
|
|
|
213
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.
|
|
214
|
-
* unpkg: https://unpkg.com/ccxt@4.2.
|
|
213
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.42/dist/ccxt.browser.js
|
|
214
|
+
* unpkg: https://unpkg.com/ccxt@4.2.42/dist/ccxt.browser.js
|
|
215
215
|
|
|
216
216
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
217
217
|
|
|
218
218
|
```HTML
|
|
219
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.
|
|
219
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.42/dist/ccxt.browser.js"></script>
|
|
220
220
|
```
|
|
221
221
|
|
|
222
222
|
Creates a global `ccxt` object:
|
package/dist/ccxt.browser.js
CHANGED
|
@@ -46879,7 +46879,10 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
46879
46879
|
await this.loadMarkets();
|
|
46880
46880
|
const networkCode = this.safeString2(params, 'chain', 'network');
|
|
46881
46881
|
params = this.omit(params, 'network');
|
|
46882
|
-
|
|
46882
|
+
let networkId = undefined;
|
|
46883
|
+
if (networkCode !== undefined) {
|
|
46884
|
+
networkId = this.networkCodeToId(networkCode, code);
|
|
46885
|
+
}
|
|
46883
46886
|
const currency = this.currency(code);
|
|
46884
46887
|
const request = {
|
|
46885
46888
|
'coin': currency['code'],
|
|
@@ -46918,11 +46921,15 @@ class bitget extends _abstract_bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
46918
46921
|
const currencyId = this.safeString(depositAddress, 'coin');
|
|
46919
46922
|
const networkId = this.safeString(depositAddress, 'chain');
|
|
46920
46923
|
const parsedCurrency = this.safeCurrencyCode(currencyId, currency);
|
|
46924
|
+
let network = undefined;
|
|
46925
|
+
if (networkId !== undefined) {
|
|
46926
|
+
network = this.networkIdToCode(networkId, parsedCurrency);
|
|
46927
|
+
}
|
|
46921
46928
|
return {
|
|
46922
46929
|
'currency': parsedCurrency,
|
|
46923
46930
|
'address': this.safeString(depositAddress, 'address'),
|
|
46924
46931
|
'tag': this.safeString(depositAddress, 'tag'),
|
|
46925
|
-
'network':
|
|
46932
|
+
'network': network,
|
|
46926
46933
|
'info': depositAddress,
|
|
46927
46934
|
};
|
|
46928
46935
|
}
|
|
@@ -65817,28 +65824,20 @@ class bitrue extends _abstract_bitrue_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
65817
65824
|
this.checkAddress(address);
|
|
65818
65825
|
await this.loadMarkets();
|
|
65819
65826
|
const currency = this.currency(code);
|
|
65820
|
-
let chainName = this.safeString2(params, 'network', 'chainName');
|
|
65821
|
-
if (chainName === undefined) {
|
|
65822
|
-
const networks = this.safeValue(currency, 'networks', {});
|
|
65823
|
-
const optionsNetworks = this.safeValue(this.options, 'networks', {});
|
|
65824
|
-
let network = this.safeStringUpper(params, 'network'); // this line allows the user to specify either ERC20 or ETH
|
|
65825
|
-
network = this.safeString(optionsNetworks, network, network);
|
|
65826
|
-
const networkEntry = this.safeValue(networks, network, {});
|
|
65827
|
-
chainName = this.safeString(networkEntry, 'id'); // handle ERC20>ETH alias
|
|
65828
|
-
if (chainName === undefined) {
|
|
65829
|
-
throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' withdraw() requires a network parameter or a chainName parameter');
|
|
65830
|
-
}
|
|
65831
|
-
params = this.omit(params, 'network');
|
|
65832
|
-
}
|
|
65833
65827
|
const request = {
|
|
65834
|
-
'coin': currency['id']
|
|
65828
|
+
'coin': currency['id'],
|
|
65835
65829
|
'amount': amount,
|
|
65836
65830
|
'addressTo': address,
|
|
65837
|
-
'chainName': chainName, // 'ERC20', 'TRC20', 'SOL'
|
|
65831
|
+
// 'chainName': chainName, // 'ERC20', 'TRC20', 'SOL'
|
|
65838
65832
|
// 'addressMark': '', // mark of address
|
|
65839
65833
|
// 'addrType': '', // type of address
|
|
65840
65834
|
// 'tag': tag,
|
|
65841
65835
|
};
|
|
65836
|
+
let networkCode = undefined;
|
|
65837
|
+
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
65838
|
+
if (networkCode !== undefined) {
|
|
65839
|
+
request['chainName'] = this.networkCodeToId(networkCode);
|
|
65840
|
+
}
|
|
65842
65841
|
if (tag !== undefined) {
|
|
65843
65842
|
request['tag'] = tag;
|
|
65844
65843
|
}
|
|
@@ -124444,7 +124443,10 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
|
|
|
124444
124443
|
const minFoundPrecision = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMin(feeString, _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMin(minDepositString, minWithdrawString));
|
|
124445
124444
|
const precision = this.parseNumber(minFoundPrecision);
|
|
124446
124445
|
const networkId = this.safeString(currency, 'chain');
|
|
124447
|
-
|
|
124446
|
+
let networkCode = undefined;
|
|
124447
|
+
if (networkId !== undefined) {
|
|
124448
|
+
networkCode = this.networkIdToCode(networkId);
|
|
124449
|
+
}
|
|
124448
124450
|
const network = {
|
|
124449
124451
|
'info': currency,
|
|
124450
124452
|
'id': networkId,
|
|
@@ -132660,7 +132662,10 @@ class gate extends _abstract_gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
132660
132662
|
const currency = parts[0];
|
|
132661
132663
|
const code = this.safeCurrencyCode(currency);
|
|
132662
132664
|
const networkId = this.safeString(entry, 'chain');
|
|
132663
|
-
|
|
132665
|
+
let networkCode = undefined;
|
|
132666
|
+
if (networkId !== undefined) {
|
|
132667
|
+
networkCode = this.networkIdToCode(networkId, code);
|
|
132668
|
+
}
|
|
132664
132669
|
const delisted = this.safeValue(entry, 'delisted');
|
|
132665
132670
|
const withdrawDisabled = this.safeBool(entry, 'withdraw_disabled', false);
|
|
132666
132671
|
const depositDisabled = this.safeBool(entry, 'deposit_disabled', false);
|
|
@@ -138476,7 +138481,10 @@ class gemini extends _abstract_gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
138476
138481
|
const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 5)));
|
|
138477
138482
|
const networks = {};
|
|
138478
138483
|
const networkId = this.safeString(currency, 9);
|
|
138479
|
-
|
|
138484
|
+
let networkCode = undefined;
|
|
138485
|
+
if (networkId !== undefined) {
|
|
138486
|
+
networkCode = this.networkIdToCode(networkId);
|
|
138487
|
+
}
|
|
138480
138488
|
if (networkCode !== undefined) {
|
|
138481
138489
|
networks[networkCode] = {
|
|
138482
138490
|
'info': currency,
|
|
@@ -187086,7 +187094,10 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
|
|
|
187086
187094
|
'coin': currency['id'],
|
|
187087
187095
|
};
|
|
187088
187096
|
const networkCode = this.safeString(params, 'network');
|
|
187089
|
-
|
|
187097
|
+
let networkId = undefined;
|
|
187098
|
+
if (networkCode !== undefined) {
|
|
187099
|
+
networkId = this.networkCodeToId(networkCode, code);
|
|
187100
|
+
}
|
|
187090
187101
|
if (networkId !== undefined) {
|
|
187091
187102
|
request['network'] = networkId;
|
|
187092
187103
|
}
|
|
@@ -212241,7 +212252,10 @@ class phemex extends _abstract_phemex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
|
|
|
212241
212252
|
const currency = this.currency(code);
|
|
212242
212253
|
let networkCode = undefined;
|
|
212243
212254
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
212244
|
-
let networkId =
|
|
212255
|
+
let networkId = undefined;
|
|
212256
|
+
if (networkCode !== undefined) {
|
|
212257
|
+
networkId = this.networkCodeToId(networkCode);
|
|
212258
|
+
}
|
|
212245
212259
|
const stableCoins = this.safeValue(this.options, 'stableCoins');
|
|
212246
212260
|
if (networkId === undefined) {
|
|
212247
212261
|
if (!(this.inArray(code, stableCoins))) {
|
|
@@ -213038,7 +213052,10 @@ class poloniex extends _abstract_poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
|
|
|
213038
213052
|
const code = this.safeCurrencyCode(id);
|
|
213039
213053
|
const name = this.safeString(currency, 'name');
|
|
213040
213054
|
const networkId = this.safeString(currency, 'blockchain');
|
|
213041
|
-
|
|
213055
|
+
let networkCode = undefined;
|
|
213056
|
+
if (networkId !== undefined) {
|
|
213057
|
+
networkCode = this.networkIdToCode(networkId, code);
|
|
213058
|
+
}
|
|
213042
213059
|
const delisted = this.safeValue(currency, 'delisted');
|
|
213043
213060
|
const walletEnabled = this.safeString(currency, 'walletState') === 'ENABLED';
|
|
213044
213061
|
const depositEnabled = this.safeString(currency, 'walletDepositState') === 'ENABLED';
|
|
@@ -244978,7 +244995,7 @@ class hitbtc extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
|
|
|
244978
244995
|
await this.loadMarkets();
|
|
244979
244996
|
await this.authenticate();
|
|
244980
244997
|
const url = this.urls['api']['ws']['private'];
|
|
244981
|
-
const messageHash = this.nonce();
|
|
244998
|
+
const messageHash = this.nonce().toString();
|
|
244982
244999
|
const subscribe = {
|
|
244983
245000
|
'method': name,
|
|
244984
245001
|
'params': params,
|
|
@@ -264597,7 +264614,7 @@ class poloniex extends _poloniex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
|
|
|
264597
264614
|
* @returns {object} data from the websocket stream
|
|
264598
264615
|
*/
|
|
264599
264616
|
const url = this.urls['api']['ws']['private'];
|
|
264600
|
-
const messageHash = this.nonce();
|
|
264617
|
+
const messageHash = this.nonce().toString();
|
|
264601
264618
|
const subscribe = {
|
|
264602
264619
|
'id': messageHash,
|
|
264603
264620
|
'event': name,
|
|
@@ -305255,7 +305272,7 @@ SOFTWARE.
|
|
|
305255
305272
|
|
|
305256
305273
|
//-----------------------------------------------------------------------------
|
|
305257
305274
|
// this is updated by vss.js when building
|
|
305258
|
-
const version = '4.2.
|
|
305275
|
+
const version = '4.2.42';
|
|
305259
305276
|
_src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
|
|
305260
305277
|
//-----------------------------------------------------------------------------
|
|
305261
305278
|
|