ccxt 4.1.99 → 4.1.100

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/js/src/mexc.js CHANGED
@@ -445,7 +445,7 @@ export default class mexc extends Exchange {
445
445
  'BCH': 'BCH',
446
446
  'TRC20': 'Tron(TRC20)',
447
447
  'ERC20': 'Ethereum(ERC20)',
448
- 'BEP20': 'BNBSmartChain(BEP20)',
448
+ 'BEP20': 'BNB Smart Chain(BEP20)',
449
449
  'OPTIMISM': 'Optimism(OP)',
450
450
  'SOL': 'Solana(SOL)',
451
451
  'CRC20': 'CRONOS',
@@ -1043,7 +1043,7 @@ export default class mexc extends Exchange {
1043
1043
  'Algorand(ALGO)': 'ALGO',
1044
1044
  'ArbitrumOne(ARB)': 'ARBONE',
1045
1045
  'AvalancheCChain(AVAXCCHAIN)': 'AVAXC',
1046
- 'BNBSmartChain(BEP20)': 'BEP20',
1046
+ 'BNB Smart Chain(BEP20)': 'BEP20',
1047
1047
  'Polygon(MATIC)': 'MATIC',
1048
1048
  'Optimism(OP)': 'OPTIMISM',
1049
1049
  'Solana(SOL)': 'SOL',
@@ -4357,8 +4357,8 @@ export default class mexc extends Exchange {
4357
4357
  /**
4358
4358
  * @method
4359
4359
  * @name mexc3#createDepositAddress
4360
- * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4361
4360
  * @description create a currency deposit address
4361
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#generate-deposit-address-supporting-network
4362
4362
  * @param {string} code unified currency code of the currency for the deposit address
4363
4363
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4364
4364
  * @param {string} [params.network] the blockchain network name
package/js/src/okx.js CHANGED
@@ -874,8 +874,8 @@ export default class okx extends Exchange {
874
874
  'ALGO': 'Algorand',
875
875
  'BHP': 'BHP',
876
876
  'APT': 'Aptos',
877
- 'ARBONE': 'Arbitrum one',
878
- 'AVAXC': 'Avalanche C-Chain',
877
+ 'ARBONE': 'Arbitrum One',
878
+ 'AVAXC': 'Avalanche C',
879
879
  'AVAXX': 'Avalanche X-Chain',
880
880
  'ARK': 'ARK',
881
881
  'AR': 'Arweave',
@@ -4469,15 +4469,16 @@ export default class okx extends Exchange {
4469
4469
  // },
4470
4470
  //
4471
4471
  if (chain === 'USDT-Polygon') {
4472
- networkData = this.safeValue(networksById, 'USDT-Polygon-Bridge');
4472
+ networkData = this.safeValue2(networksById, 'USDT-Polygon-Bridge', 'USDT-Polygon');
4473
4473
  }
4474
4474
  const network = this.safeString(networkData, 'network');
4475
+ const networkCode = this.networkIdToCode(network, code);
4475
4476
  this.checkAddress(address);
4476
4477
  return {
4477
4478
  'currency': code,
4478
4479
  'address': address,
4479
4480
  'tag': tag,
4480
- 'network': network,
4481
+ 'network': networkCode,
4481
4482
  'info': depositAddress,
4482
4483
  };
4483
4484
  }
@@ -53,8 +53,9 @@ export default class kucoin extends kucoinRest {
53
53
  negotiate(privateChannel, params = {}) {
54
54
  const connectId = privateChannel ? 'private' : 'public';
55
55
  const urls = this.safeValue(this.options, 'urls', {});
56
- if (connectId in urls) {
57
- return urls[connectId];
56
+ const spawaned = this.safeValue(urls, connectId);
57
+ if (spawaned !== undefined) {
58
+ return spawaned;
58
59
  }
59
60
  // we store an awaitable to the url
60
61
  // so that multiple calls don't asynchronously
@@ -1025,6 +1026,13 @@ export default class kucoin extends kucoinRest {
1025
1026
  // }
1026
1027
  //
1027
1028
  const data = this.safeString(message, 'data', '');
1029
+ if (data === 'token is expired') {
1030
+ let type = 'public';
1031
+ if (client.url.indexOf('connectId=private') >= 0) {
1032
+ type = 'private';
1033
+ }
1034
+ this.options['urls'][type] = undefined;
1035
+ }
1028
1036
  this.handleErrors(undefined, undefined, client.url, undefined, undefined, data, message, undefined, undefined);
1029
1037
  }
1030
1038
  handleMessage(client, message) {
@@ -63,8 +63,9 @@ export default class kucoinfutures extends kucoinfuturesRest {
63
63
  negotiate(privateChannel, params = {}) {
64
64
  const connectId = privateChannel ? 'private' : 'public';
65
65
  const urls = this.safeValue(this.options, 'urls', {});
66
- if (connectId in urls) {
67
- return urls[connectId];
66
+ const spawaned = this.safeValue(urls, connectId);
67
+ if (spawaned !== undefined) {
68
+ return spawaned;
68
69
  }
69
70
  // we store an awaitable to the url
70
71
  // so that multiple calls don't asynchronously
@@ -954,6 +955,13 @@ export default class kucoinfutures extends kucoinfuturesRest {
954
955
  // }
955
956
  //
956
957
  const data = this.safeString(message, 'data', '');
958
+ if (data === 'token is expired') {
959
+ let type = 'public';
960
+ if (client.url.indexOf('connectId=private') >= 0) {
961
+ type = 'private';
962
+ }
963
+ this.options['urls'][type] = undefined;
964
+ }
957
965
  this.handleErrors(undefined, undefined, client.url, undefined, undefined, data, message, undefined, undefined);
958
966
  }
959
967
  handleMessage(client, message) {
@@ -15,7 +15,7 @@ export declare class BigInteger {
15
15
  protected intValue(): number;
16
16
  protected byteValue(): number;
17
17
  protected shortValue(): number;
18
- protected signum(): 0 | 1 | -1;
18
+ protected signum(): 1 | 0 | -1;
19
19
  toByteArray(): number[];
20
20
  protected equals(a: BigInteger): boolean;
21
21
  protected min(a: BigInteger): BigInteger;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.1.99",
3
+ "version": "4.1.100",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",
package/skip-tests.json CHANGED
@@ -1650,5 +1650,18 @@
1650
1650
  "ask": "invalid"
1651
1651
  }
1652
1652
  }
1653
+ },
1654
+ "bitteam": {
1655
+ "skipPhpAsync": true,
1656
+ "skipMethods": {
1657
+ "loadMarkets": {
1658
+ "taker": "is undefined",
1659
+ "maker": "is undefined"
1660
+ },
1661
+ "fetchCurrencies": {
1662
+ "deposit": "not provided",
1663
+ "withdraw": "not provided"
1664
+ }
1665
+ }
1653
1666
  }
1654
1667
  }