ccxt 4.2.74 → 4.2.75

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +206 -10
  2. package/README.md +8 -7
  3. package/dist/ccxt.browser.js +862 -198
  4. package/dist/ccxt.browser.min.js +3 -3
  5. package/dist/cjs/ccxt.js +4 -1
  6. package/dist/cjs/src/abstract/tradeogre.js +9 -0
  7. package/dist/cjs/src/ascendex.js +3 -2
  8. package/dist/cjs/src/bitmart.js +1 -0
  9. package/dist/cjs/src/coinex.js +4 -3
  10. package/dist/cjs/src/gate.js +1 -0
  11. package/dist/cjs/src/kraken.js +3 -3
  12. package/dist/cjs/src/kucoin.js +1 -1
  13. package/dist/cjs/src/tradeogre.js +632 -0
  14. package/js/ccxt.d.ts +5 -2
  15. package/js/ccxt.js +4 -2
  16. package/js/src/abstract/tradeogre.d.ts +19 -0
  17. package/js/src/abstract/tradeogre.js +11 -0
  18. package/js/src/ascendex.d.ts +2 -7
  19. package/js/src/ascendex.js +3 -2
  20. package/js/src/base/Exchange.d.ts +5 -5
  21. package/js/src/base/types.d.ts +7 -1
  22. package/js/src/binance.d.ts +1 -1
  23. package/js/src/bitmart.d.ts +1 -1
  24. package/js/src/bitmart.js +2 -1
  25. package/js/src/coinbase.d.ts +4 -4
  26. package/js/src/coinbaseinternational.d.ts +1 -1
  27. package/js/src/coinbasepro.d.ts +2 -2
  28. package/js/src/coinex.js +4 -3
  29. package/js/src/coinlist.d.ts +2 -2
  30. package/js/src/cryptocom.d.ts +2 -2
  31. package/js/src/currencycom.d.ts +2 -2
  32. package/js/src/deribit.d.ts +2 -2
  33. package/js/src/gate.d.ts +1 -1
  34. package/js/src/gate.js +1 -0
  35. package/js/src/htx.d.ts +2 -2
  36. package/js/src/huobijp.d.ts +2 -2
  37. package/js/src/kraken.d.ts +1 -1
  38. package/js/src/kraken.js +3 -3
  39. package/js/src/kucoin.d.ts +3 -3
  40. package/js/src/kucoin.js +1 -1
  41. package/js/src/luno.d.ts +2 -2
  42. package/js/src/mexc.d.ts +3 -3
  43. package/js/src/ndax.d.ts +2 -2
  44. package/js/src/novadax.d.ts +2 -2
  45. package/js/src/okx.d.ts +2 -2
  46. package/js/src/pro/bitfinex2.d.ts +1 -1
  47. package/js/src/tradeogre.d.ts +32 -0
  48. package/js/src/tradeogre.js +633 -0
  49. package/js/src/woo.d.ts +2 -2
  50. package/package.json +1 -1
  51. package/skip-tests.json +5 -0
package/dist/cjs/ccxt.js CHANGED
@@ -106,6 +106,7 @@ var poloniexfutures = require('./src/poloniexfutures.js');
106
106
  var probit = require('./src/probit.js');
107
107
  var timex = require('./src/timex.js');
108
108
  var tokocrypto = require('./src/tokocrypto.js');
109
+ var tradeogre = require('./src/tradeogre.js');
109
110
  var upbit = require('./src/upbit.js');
110
111
  var wavesexchange = require('./src/wavesexchange.js');
111
112
  var wazirx = require('./src/wazirx.js');
@@ -180,7 +181,7 @@ var woo$1 = require('./src/pro/woo.js');
180
181
 
181
182
  //-----------------------------------------------------------------------------
182
183
  // this is updated by vss.js when building
183
- const version = '4.2.74';
184
+ const version = '4.2.75';
184
185
  Exchange["default"].ccxtVersion = version;
185
186
  const exchanges = {
186
187
  'ace': ace,
@@ -277,6 +278,7 @@ const exchanges = {
277
278
  'probit': probit,
278
279
  'timex': timex,
279
280
  'tokocrypto': tokocrypto,
281
+ 'tradeogre': tradeogre,
280
282
  'upbit': upbit,
281
283
  'wavesexchange': wavesexchange,
282
284
  'wazirx': wazirx,
@@ -486,6 +488,7 @@ exports.poloniexfutures = poloniexfutures;
486
488
  exports.probit = probit;
487
489
  exports.timex = timex;
488
490
  exports.tokocrypto = tokocrypto;
491
+ exports.tradeogre = tradeogre;
489
492
  exports.upbit = upbit;
490
493
  exports.wavesexchange = wavesexchange;
491
494
  exports.wazirx = wazirx;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Exchange$1 = require('../base/Exchange.js');
4
+
5
+ // -------------------------------------------------------------------------------
6
+ class Exchange extends Exchange$1["default"] {
7
+ }
8
+
9
+ module.exports = Exchange;
@@ -750,7 +750,7 @@ class ascendex extends ascendex$1 {
750
750
  {
751
751
  'id': accountGroup,
752
752
  'type': undefined,
753
- 'currency': undefined,
753
+ 'code': undefined,
754
754
  'info': response,
755
755
  },
756
756
  ];
@@ -2730,7 +2730,8 @@ class ascendex extends ascendex$1 {
2730
2730
  if (Precise["default"].stringEq(notional, '0')) {
2731
2731
  notional = this.safeString(position, 'sellOpenOrderNotional');
2732
2732
  }
2733
- const marginMode = this.safeString(position, 'marginType');
2733
+ const marginType = this.safeString(position, 'marginType');
2734
+ const marginMode = (marginType === 'crossed') ? 'cross' : 'isolated';
2734
2735
  let collateral = undefined;
2735
2736
  if (marginMode === 'isolated') {
2736
2737
  collateral = this.safeString(position, 'isolatedMargin');
@@ -347,6 +347,7 @@ class bitmart extends bitmart$1 {
347
347
  '70000': errors.ExchangeError,
348
348
  '70001': errors.BadRequest,
349
349
  '70002': errors.BadSymbol,
350
+ '70003': errors.NetworkError,
350
351
  '71001': errors.BadRequest,
351
352
  '71002': errors.BadRequest,
352
353
  '71003': errors.BadRequest,
@@ -134,7 +134,7 @@ class coinex extends coinex$1 {
134
134
  'perpetualPrivate': 'https://api.coinex.com/perpetual',
135
135
  },
136
136
  'www': 'https://www.coinex.com',
137
- 'doc': 'https://github.com/coinexcom/coinex_exchange_api/wiki',
137
+ 'doc': 'https://viabtc.github.io/coinex_api_en_doc',
138
138
  'fees': 'https://www.coinex.com/fees',
139
139
  'referral': 'https://www.coinex.com/register?refer_code=yw5fz',
140
140
  },
@@ -348,6 +348,7 @@ class coinex extends coinex$1 {
348
348
  },
349
349
  'broad': {
350
350
  'ip not allow visit': errors.PermissionDenied,
351
+ 'service too busy': errors.ExchangeNotAvailable,
351
352
  },
352
353
  },
353
354
  });
@@ -5154,7 +5155,7 @@ class coinex extends coinex$1 {
5154
5155
  * @method
5155
5156
  * @name coinex#borrowIsolatedMargin
5156
5157
  * @description create a loan to borrow margin
5157
- * @see https://github.com/coinexcom/coinex_exchange_api/wiki/086margin_loan
5158
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account017_margin_loan
5158
5159
  * @param {string} symbol unified market symbol, required for coinex
5159
5160
  * @param {string} code unified currency code of the currency to borrow
5160
5161
  * @param {float} amount the amount to borrow
@@ -5191,7 +5192,7 @@ class coinex extends coinex$1 {
5191
5192
  * @method
5192
5193
  * @name coinex#repayIsolatedMargin
5193
5194
  * @description repay borrowed margin and interest
5194
- * @see https://github.com/coinexcom/coinex_exchange_api/wiki/087margin_flat
5195
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account018_margin_flat
5195
5196
  * @param {string} symbol unified market symbol, required for coinex
5196
5197
  * @param {string} code unified currency code of the currency to repay
5197
5198
  * @param {float} amount the amount to repay
@@ -4286,6 +4286,7 @@ class gate extends gate$1 {
4286
4286
  'failed': 'canceled',
4287
4287
  'expired': 'canceled',
4288
4288
  'finished': 'closed',
4289
+ 'finish': 'closed',
4289
4290
  'succeeded': 'closed',
4290
4291
  };
4291
4292
  return this.safeString(statuses, status, status);
@@ -2761,7 +2761,7 @@ class kraken extends kraken$1 {
2761
2761
  // todo unify parsePosition/parsePositions
2762
2762
  return result;
2763
2763
  }
2764
- parseAccount(account) {
2764
+ parseAccountType(account) {
2765
2765
  const accountByType = {
2766
2766
  'spot': 'Spot Wallet',
2767
2767
  'swap': 'Futures Wallet',
@@ -2795,8 +2795,8 @@ class kraken extends kraken$1 {
2795
2795
  */
2796
2796
  await this.loadMarkets();
2797
2797
  const currency = this.currency(code);
2798
- fromAccount = this.parseAccount(fromAccount);
2799
- toAccount = this.parseAccount(toAccount);
2798
+ fromAccount = this.parseAccountType(fromAccount);
2799
+ toAccount = this.parseAccountType(toAccount);
2800
2800
  const request = {
2801
2801
  'amount': this.currencyToPrecision(code, amount),
2802
2802
  'from': fromAccount,
@@ -461,7 +461,7 @@ class kucoin extends kucoin$1 {
461
461
  '400006': errors.AuthenticationError,
462
462
  '400007': errors.AuthenticationError,
463
463
  '400008': errors.NotSupported,
464
- '400100': errors.BadRequest,
464
+ '400100': errors.InsufficientFunds,
465
465
  '400200': errors.InvalidOrder,
466
466
  '400350': errors.InvalidOrder,
467
467
  '400370': errors.InvalidOrder,