ccxt 4.2.85 → 4.2.86

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/idex.js CHANGED
@@ -165,13 +165,15 @@ export default class idex extends Exchange {
165
165
  'network': 'MATIC',
166
166
  },
167
167
  'exceptions': {
168
- 'INVALID_ORDER_QUANTITY': InvalidOrder,
169
- 'INSUFFICIENT_FUNDS': InsufficientFunds,
170
- 'SERVICE_UNAVAILABLE': ExchangeNotAvailable,
171
- 'EXCEEDED_RATE_LIMIT': DDoSProtection,
172
- 'INVALID_PARAMETER': BadRequest,
173
- 'WALLET_NOT_ASSOCIATED': InvalidAddress,
174
- 'INVALID_WALLET_SIGNATURE': AuthenticationError,
168
+ 'exact': {
169
+ 'INVALID_ORDER_QUANTITY': InvalidOrder,
170
+ 'INSUFFICIENT_FUNDS': InsufficientFunds,
171
+ 'SERVICE_UNAVAILABLE': ExchangeNotAvailable,
172
+ 'EXCEEDED_RATE_LIMIT': DDoSProtection,
173
+ 'INVALID_PARAMETER': BadRequest,
174
+ 'WALLET_NOT_ASSOCIATED': InvalidAddress,
175
+ 'INVALID_WALLET_SIGNATURE': AuthenticationError,
176
+ },
175
177
  },
176
178
  'requiredCredentials': {
177
179
  'walletAddress': true,
@@ -1497,11 +1499,8 @@ export default class idex extends Exchange {
1497
1499
  handleErrors(code, reason, url, method, headers, body, response, requestHeaders, requestBody) {
1498
1500
  const errorCode = this.safeString(response, 'code');
1499
1501
  const message = this.safeString(response, 'message');
1500
- if (errorCode in this.exceptions) {
1501
- const Exception = this.exceptions[errorCode];
1502
- throw new Exception(this.id + ' ' + message);
1503
- }
1504
1502
  if (errorCode !== undefined) {
1503
+ this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, message);
1505
1504
  throw new ExchangeError(this.id + ' ' + message);
1506
1505
  }
1507
1506
  return undefined;
package/js/src/okcoin.js CHANGED
@@ -1136,8 +1136,10 @@ export default class okcoin extends Exchange {
1136
1136
  const request = {
1137
1137
  'instId': market['id'],
1138
1138
  'bar': bar,
1139
- 'limit': limit,
1140
1139
  };
1140
+ if (limit !== undefined) {
1141
+ request['limit'] = limit; // default 100, max 100
1142
+ }
1141
1143
  let method = undefined;
1142
1144
  [method, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'method', 'publicGetMarketCandles');
1143
1145
  let response = undefined;
@@ -86,6 +86,7 @@ export default class bitget extends bitgetRest {
86
86
  '30015': AuthenticationError,
87
87
  '30016': BadRequest, // { event: 'error', code: 30016, msg: 'Param error' }
88
88
  },
89
+ 'broad': {},
89
90
  },
90
91
  },
91
92
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.85",
3
+ "version": "4.2.86",
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
@@ -597,6 +597,9 @@
597
597
  "skipMethods": {
598
598
  "fetchTrades": {
599
599
  "side":"side is undefined"
600
+ },
601
+ "ticker": {
602
+ "spread": "https://app.travis-ci.com/github/ccxt/ccxt/builds/269687705#L3745"
600
603
  }
601
604
  }
602
605
  },
@@ -961,6 +964,7 @@
961
964
  },
962
965
  "idex": {
963
966
  "skipWs": "timeouts",
967
+ "skipCSharp": "for some reasons, frequent rate limits only in C#",
964
968
  "skipMethods": {
965
969
  "fetchCurrencies": {
966
970
  "withdraw":"not provided",