ccxt 4.2.77 → 4.2.78

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.
@@ -1072,7 +1072,10 @@ export default class coinbase extends Exchange {
1072
1072
  * @returns {object[]} an array of objects representing market data
1073
1073
  */
1074
1074
  const method = this.safeString(this.options, 'fetchMarkets', 'fetchMarketsV3');
1075
- return await this[method](params);
1075
+ if (method === 'fetchMarketsV3') {
1076
+ return await this.fetchMarketsV3(params);
1077
+ }
1078
+ return await this.fetchMarketsV2(params);
1076
1079
  }
1077
1080
  async fetchMarketsV2(params = {}) {
1078
1081
  const response = await this.fetchCurrenciesFromCache(params);
@@ -1147,7 +1150,13 @@ export default class coinbase extends Exchange {
1147
1150
  return result;
1148
1151
  }
1149
1152
  async fetchMarketsV3(params = {}) {
1150
- const response = await this.v3PrivateGetBrokerageProducts(params);
1153
+ const promisesUnresolved = [
1154
+ this.v3PrivateGetBrokerageProducts(params),
1155
+ this.v3PrivateGetBrokerageTransactionSummary(params),
1156
+ ];
1157
+ // const response = await this.v3PrivateGetBrokerageProducts (params);
1158
+ const promises = await Promise.all(promisesUnresolved);
1159
+ const response = this.safeDict(promises, 0, {});
1151
1160
  //
1152
1161
  // [
1153
1162
  // {
@@ -1182,7 +1191,8 @@ export default class coinbase extends Exchange {
1182
1191
  // ...
1183
1192
  // ]
1184
1193
  //
1185
- const fees = await this.v3PrivateGetBrokerageTransactionSummary(params);
1194
+ // const fees = await this.v3PrivateGetBrokerageTransactionSummary (params);
1195
+ const fees = this.safeDict(promises, 1, {});
1186
1196
  //
1187
1197
  // {
1188
1198
  // "total_volume": 0,
@@ -1899,6 +1909,9 @@ export default class coinbase extends Exchange {
1899
1909
  const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, params));
1900
1910
  const ledger = this.parseLedger(response['data'], currency, since, limit);
1901
1911
  const length = ledger.length;
1912
+ if (length === 0) {
1913
+ return ledger;
1914
+ }
1902
1915
  const lastIndex = length - 1;
1903
1916
  const last = this.safeDict(ledger, lastIndex);
1904
1917
  const pagination = this.safeDict(response, 'pagination', {});
@@ -2238,9 +2251,9 @@ export default class coinbase extends Exchange {
2238
2251
  'fee': fee,
2239
2252
  };
2240
2253
  }
2241
- async findAccountId(code) {
2254
+ async findAccountId(code, params = {}) {
2242
2255
  await this.loadMarkets();
2243
- await this.loadAccounts();
2256
+ await this.loadAccounts(false, params);
2244
2257
  for (let i = 0; i < this.accounts.length; i++) {
2245
2258
  const account = this.accounts[i];
2246
2259
  if (account['code'] === code) {
@@ -2269,7 +2282,7 @@ export default class coinbase extends Exchange {
2269
2282
  if (code === undefined) {
2270
2283
  throw new ArgumentsRequired(this.id + ' prepareAccountRequestWithCurrencyCode() method requires an account_id (or accountId) parameter OR a currency code argument');
2271
2284
  }
2272
- accountId = await this.findAccountId(code);
2285
+ accountId = await this.findAccountId(code, params);
2273
2286
  if (accountId === undefined) {
2274
2287
  throw new ExchangeError(this.id + ' prepareAccountRequestWithCurrencyCode() could not find account id for ' + code);
2275
2288
  }
@@ -3413,7 +3426,7 @@ export default class coinbase extends Exchange {
3413
3426
  if (code === undefined) {
3414
3427
  throw new ArgumentsRequired(this.id + ' withdraw() requires an account_id (or accountId) parameter OR a currency code argument');
3415
3428
  }
3416
- accountId = await this.findAccountId(code);
3429
+ accountId = await this.findAccountId(code, params);
3417
3430
  if (accountId === undefined) {
3418
3431
  throw new ExchangeError(this.id + ' withdraw() could not find account id for ' + code);
3419
3432
  }
@@ -3638,7 +3651,7 @@ export default class coinbase extends Exchange {
3638
3651
  if (code === undefined) {
3639
3652
  throw new ArgumentsRequired(this.id + ' deposit() requires an account_id (or accountId) parameter OR a currency code argument');
3640
3653
  }
3641
- accountId = await this.findAccountId(code);
3654
+ accountId = await this.findAccountId(code, params);
3642
3655
  if (accountId === undefined) {
3643
3656
  throw new ExchangeError(this.id + ' deposit() could not find account id for ' + code);
3644
3657
  }
@@ -3708,7 +3721,7 @@ export default class coinbase extends Exchange {
3708
3721
  if (code === undefined) {
3709
3722
  throw new ArgumentsRequired(this.id + ' fetchDeposit() requires an account_id (or accountId) parameter OR a currency code argument');
3710
3723
  }
3711
- accountId = await this.findAccountId(code);
3724
+ accountId = await this.findAccountId(code, params);
3712
3725
  if (accountId === undefined) {
3713
3726
  throw new ExchangeError(this.id + ' fetchDeposit() could not find account id for ' + code);
3714
3727
  }
package/js/src/gate.js CHANGED
@@ -52,6 +52,7 @@ export default class gate extends Exchange {
52
52
  'rebate': 'https://api.gateio.ws/api/v4',
53
53
  'earn': 'https://api.gateio.ws/api/v4',
54
54
  'account': 'https://api.gateio.ws/api/v4',
55
+ 'loan': 'https://api.gateio.ws/api/v4',
55
56
  },
56
57
  },
57
58
  'test': {
package/js/src/htx.js CHANGED
@@ -2980,42 +2980,47 @@ export default class htx extends Exchange {
2980
2980
  // 'from': parseInt ((since / 1000).toString ()), spot only
2981
2981
  // 'to': this.seconds (), spot only
2982
2982
  };
2983
- const price = this.safeString(params, 'price');
2984
- params = this.omit(params, 'price');
2983
+ const priceType = this.safeStringN(params, ['priceType', 'price']);
2984
+ params = this.omit(params, ['priceType', 'price']);
2985
+ let until = undefined;
2986
+ [until, params] = this.handleParamInteger(params, 'until');
2987
+ const untilSeconds = (until !== undefined) ? this.parseToInt(until / 1000) : undefined;
2985
2988
  if (market['contract']) {
2986
2989
  if (limit !== undefined) {
2987
- request['size'] = limit; // when using limit from and to are ignored
2990
+ request['size'] = limit; // when using limit: from & to are ignored
2988
2991
  // https://huobiapi.github.io/docs/usdt_swap/v1/en/#general-get-kline-data
2989
2992
  }
2990
2993
  else {
2991
2994
  limit = 2000; // only used for from/to calculation
2992
2995
  }
2993
- if (price === undefined) {
2996
+ if (priceType === undefined) {
2994
2997
  const duration = this.parseTimeframe(timeframe);
2998
+ let calcualtedEnd = undefined;
2995
2999
  if (since === undefined) {
2996
3000
  const now = this.seconds();
2997
3001
  request['from'] = now - duration * (limit - 1);
2998
- request['to'] = now;
3002
+ calcualtedEnd = now;
2999
3003
  }
3000
3004
  else {
3001
3005
  const start = this.parseToInt(since / 1000);
3002
3006
  request['from'] = start;
3003
- request['to'] = this.sum(start, duration * (limit - 1));
3007
+ calcualtedEnd = this.sum(start, duration * (limit - 1));
3004
3008
  }
3009
+ request['to'] = (untilSeconds !== undefined) ? untilSeconds : calcualtedEnd;
3005
3010
  }
3006
3011
  }
3007
3012
  let response = undefined;
3008
3013
  if (market['future']) {
3009
3014
  if (market['inverse']) {
3010
3015
  request['symbol'] = market['id'];
3011
- if (price === 'mark') {
3016
+ if (priceType === 'mark') {
3012
3017
  response = await this.contractPublicGetIndexMarketHistoryMarkPriceKline(this.extend(request, params));
3013
3018
  }
3014
- else if (price === 'index') {
3019
+ else if (priceType === 'index') {
3015
3020
  response = await this.contractPublicGetIndexMarketHistoryIndex(this.extend(request, params));
3016
3021
  }
3017
- else if (price === 'premiumIndex') {
3018
- throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + price + ' kline data');
3022
+ else if (priceType === 'premiumIndex') {
3023
+ throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + priceType + ' kline data');
3019
3024
  }
3020
3025
  else {
3021
3026
  response = await this.contractPublicGetMarketHistoryKline(this.extend(request, params));
@@ -3023,13 +3028,13 @@ export default class htx extends Exchange {
3023
3028
  }
3024
3029
  else if (market['linear']) {
3025
3030
  request['contract_code'] = market['id'];
3026
- if (price === 'mark') {
3031
+ if (priceType === 'mark') {
3027
3032
  response = await this.contractPublicGetIndexMarketHistoryLinearSwapMarkPriceKline(this.extend(request, params));
3028
3033
  }
3029
- else if (price === 'index') {
3030
- throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + price + ' kline data');
3034
+ else if (priceType === 'index') {
3035
+ throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + priceType + ' kline data');
3031
3036
  }
3032
- else if (price === 'premiumIndex') {
3037
+ else if (priceType === 'premiumIndex') {
3033
3038
  response = await this.contractPublicGetIndexMarketHistoryLinearSwapPremiumIndexKline(this.extend(request, params));
3034
3039
  }
3035
3040
  else {
@@ -3040,13 +3045,13 @@ export default class htx extends Exchange {
3040
3045
  else if (market['swap']) {
3041
3046
  request['contract_code'] = market['id'];
3042
3047
  if (market['inverse']) {
3043
- if (price === 'mark') {
3048
+ if (priceType === 'mark') {
3044
3049
  response = await this.contractPublicGetIndexMarketHistorySwapMarkPriceKline(this.extend(request, params));
3045
3050
  }
3046
- else if (price === 'index') {
3047
- throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + price + ' kline data');
3051
+ else if (priceType === 'index') {
3052
+ throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + priceType + ' kline data');
3048
3053
  }
3049
- else if (price === 'premiumIndex') {
3054
+ else if (priceType === 'premiumIndex') {
3050
3055
  response = await this.contractPublicGetIndexMarketHistorySwapPremiumIndexKline(this.extend(request, params));
3051
3056
  }
3052
3057
  else {
@@ -3054,13 +3059,13 @@ export default class htx extends Exchange {
3054
3059
  }
3055
3060
  }
3056
3061
  else if (market['linear']) {
3057
- if (price === 'mark') {
3062
+ if (priceType === 'mark') {
3058
3063
  response = await this.contractPublicGetIndexMarketHistoryLinearSwapMarkPriceKline(this.extend(request, params));
3059
3064
  }
3060
- else if (price === 'index') {
3061
- throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + price + ' kline data');
3065
+ else if (priceType === 'index') {
3066
+ throw new BadRequest(this.id + ' ' + market['type'] + ' has no api endpoint for ' + priceType + ' kline data');
3062
3067
  }
3063
- else if (price === 'premiumIndex') {
3068
+ else if (priceType === 'premiumIndex') {
3064
3069
  response = await this.contractPublicGetIndexMarketHistoryLinearSwapPremiumIndexKline(this.extend(request, params));
3065
3070
  }
3066
3071
  else {
@@ -3073,18 +3078,22 @@ export default class htx extends Exchange {
3073
3078
  let useHistorical = undefined;
3074
3079
  [useHistorical, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'useHistoricalEndpointForSpot', true);
3075
3080
  if (!useHistorical) {
3076
- // `limit` only available for the this endpoint
3077
3081
  if (limit !== undefined) {
3078
- request['size'] = limit; // max 2000
3082
+ request['size'] = Math.min(2000, limit); // max 2000
3079
3083
  }
3080
3084
  response = await this.spotPublicGetMarketHistoryKline(this.extend(request, params));
3081
3085
  }
3082
3086
  else {
3083
- // `since` only available for the this endpoint
3087
+ // "from & to" only available for the this endpoint
3084
3088
  if (since !== undefined) {
3085
- // default 150 bars
3086
3089
  request['from'] = this.parseToInt(since / 1000);
3087
3090
  }
3091
+ if (untilSeconds !== undefined) {
3092
+ request['to'] = untilSeconds;
3093
+ }
3094
+ if (limit !== undefined) {
3095
+ request['size'] = Math.min(1000, limit); // max 1000, otherwise default returns 150
3096
+ }
3088
3097
  response = await this.spotPublicGetMarketHistoryCandles(this.extend(request, params));
3089
3098
  }
3090
3099
  }
@@ -3100,7 +3109,7 @@ export default class htx extends Exchange {
3100
3109
  // ]
3101
3110
  // }
3102
3111
  //
3103
- const data = this.safeValue(response, 'data', []);
3112
+ const data = this.safeList(response, 'data', []);
3104
3113
  return this.parseOHLCVs(data, market, timeframe, since, limit);
3105
3114
  }
3106
3115
  async fetchAccounts(params = {}) {
@@ -764,8 +764,9 @@ export default class hyperliquid extends Exchange {
764
764
  * @param {bool} [params.postOnly] true or false whether the order is post-only
765
765
  * @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
766
766
  * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
767
- * @param {string} [params.clientOrderId] client order id, optional 128 bit hex string
767
+ * @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
768
768
  * @param {string} [params.slippage] the slippage for market order
769
+ * @param {string} [params.vaultAddress] the vault address for order
769
770
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
770
771
  */
771
772
  await this.loadMarkets();
@@ -815,7 +816,7 @@ export default class hyperliquid extends Exchange {
815
816
  }
816
817
  }
817
818
  }
818
- params = this.omit(params, ['slippage', 'clientOrderId', 'client_id', 'slippage', 'triggerPrice', 'stopPrice', 'stopLossPrice', 'takeProfitPrice']);
819
+ params = this.omit(params, ['slippage', 'clientOrderId', 'client_id', 'slippage', 'triggerPrice', 'stopPrice', 'stopLossPrice', 'takeProfitPrice', 'timeInForce']);
819
820
  const nonce = this.milliseconds();
820
821
  const orderReq = [];
821
822
  for (let i = 0; i < orders.length; i++) {
@@ -942,7 +943,7 @@ export default class hyperliquid extends Exchange {
942
943
  * @param {string} id order id
943
944
  * @param {string} symbol unified symbol of the market the order was made in
944
945
  * @param {object} [params] extra parameters specific to the exchange API endpoint
945
- * @param {string} [params.clientOrderId] client order id (default undefined)
946
+ * @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
946
947
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
947
948
  */
948
949
  return await this.cancelOrders([id], symbol, params);
@@ -957,7 +958,7 @@ export default class hyperliquid extends Exchange {
957
958
  * @param {string[]} ids order ids
958
959
  * @param {string} [symbol] unified market symbol
959
960
  * @param {object} [params] extra parameters specific to the exchange API endpoint
960
- * @param {string|string[]} [params.clientOrderId] client order ids (default undefined)
961
+ * @param {string|string[]} [params.clientOrderId] client order ids, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
961
962
  * @returns {object} an list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
962
963
  */
963
964
  this.checkRequiredCredentials();
@@ -1040,6 +1041,7 @@ export default class hyperliquid extends Exchange {
1040
1041
  * @param {bool} [params.reduceOnly] true or false whether the order is reduce-only
1041
1042
  * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1042
1043
  * @param {string} [params.clientOrderId] client order id, (optional 128 bit hex string e.g. 0x1234567890abcdef1234567890abcdef)
1044
+ * @param {string} [params.vaultAddress] the vault address for order
1043
1045
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1044
1046
  */
1045
1047
  this.checkRequiredCredentials();
package/js/src/kucoin.js CHANGED
@@ -449,6 +449,56 @@ export default class kucoin extends Exchange {
449
449
  '130202': ExchangeError,
450
450
  '130203': InsufficientFunds,
451
451
  '130204': BadRequest,
452
+ '130301': InsufficientFunds,
453
+ '130302': PermissionDenied,
454
+ '130303': NotSupported,
455
+ '130304': NotSupported,
456
+ '130305': NotSupported,
457
+ '130306': NotSupported,
458
+ '130307': NotSupported,
459
+ '130308': InvalidOrder,
460
+ '130309': InvalidOrder,
461
+ '130310': ExchangeError,
462
+ '130311': InvalidOrder,
463
+ '130312': InvalidOrder,
464
+ '130313': InvalidOrder,
465
+ '130314': InvalidOrder,
466
+ '130315': NotSupported,
467
+ '126000': ExchangeError,
468
+ '126001': NotSupported,
469
+ '126002': ExchangeError,
470
+ '126003': InvalidOrder,
471
+ '126004': ExchangeError,
472
+ '126005': PermissionDenied,
473
+ '126006': ExchangeError,
474
+ '126007': ExchangeError,
475
+ '126009': ExchangeError,
476
+ '126010': ExchangeError,
477
+ '126011': ExchangeError,
478
+ '126013': InsufficientFunds,
479
+ '126015': ExchangeError,
480
+ '126021': NotSupported,
481
+ '126022': InvalidOrder,
482
+ '126027': InvalidOrder,
483
+ '126028': InvalidOrder,
484
+ '126029': InvalidOrder,
485
+ '126030': InvalidOrder,
486
+ '126033': InvalidOrder,
487
+ '126034': InvalidOrder,
488
+ '126036': InvalidOrder,
489
+ '126037': ExchangeError,
490
+ '126038': ExchangeError,
491
+ '126039': ExchangeError,
492
+ '126041': ExchangeError,
493
+ '126042': ExchangeError,
494
+ '126043': OrderNotFound,
495
+ '126044': InvalidOrder,
496
+ '126045': NotSupported,
497
+ '126046': NotSupported,
498
+ '126047': PermissionDenied,
499
+ '126048': PermissionDenied,
500
+ '135005': ExchangeError,
501
+ '135018': ExchangeError,
452
502
  '200004': InsufficientFunds,
453
503
  '210014': InvalidOrder,
454
504
  '210021': InsufficientFunds,
@@ -470,10 +520,12 @@ export default class kucoin extends Exchange {
470
520
  '400350': InvalidOrder,
471
521
  '400370': InvalidOrder,
472
522
  '400400': BadRequest,
523
+ '400401': AuthenticationError,
473
524
  '400500': InvalidOrder,
474
525
  '400600': BadSymbol,
475
526
  '400760': InvalidOrder,
476
527
  '401000': BadRequest,
528
+ '408000': BadRequest,
477
529
  '411100': AccountSuspended,
478
530
  '415000': BadRequest,
479
531
  '400303': PermissionDenied,
package/js/src/okcoin.js CHANGED
@@ -248,6 +248,16 @@ export default class okcoin extends Exchange {
248
248
  '50026': ExchangeNotAvailable,
249
249
  '50027': PermissionDenied,
250
250
  '50028': ExchangeError,
251
+ '50029': ExchangeError,
252
+ '50030': PermissionDenied,
253
+ '50032': AccountSuspended,
254
+ '50033': AccountSuspended,
255
+ '50035': BadRequest,
256
+ '50036': BadRequest,
257
+ '50037': BadRequest,
258
+ '50038': ExchangeError,
259
+ '50039': ExchangeError,
260
+ '50041': ExchangeError,
251
261
  '50044': BadRequest,
252
262
  // API Class
253
263
  '50100': ExchangeError,
@@ -291,9 +301,25 @@ export default class okcoin extends Exchange {
291
301
  '51024': AccountSuspended,
292
302
  '51025': ExchangeError,
293
303
  '51026': BadSymbol,
304
+ '51030': InvalidOrder,
305
+ '51031': InvalidOrder,
306
+ '51032': InvalidOrder,
307
+ '51033': InvalidOrder,
308
+ '51037': InvalidOrder,
309
+ '51038': InvalidOrder,
310
+ '51044': InvalidOrder,
294
311
  '51046': InvalidOrder,
295
312
  '51047': InvalidOrder,
296
- '51031': InvalidOrder,
313
+ '51048': InvalidOrder,
314
+ '51049': InvalidOrder,
315
+ '51050': InvalidOrder,
316
+ '51051': InvalidOrder,
317
+ '51052': InvalidOrder,
318
+ '51053': InvalidOrder,
319
+ '51054': BadRequest,
320
+ '51056': InvalidOrder,
321
+ '51058': InvalidOrder,
322
+ '51059': InvalidOrder,
297
323
  '51100': InvalidOrder,
298
324
  '51102': InvalidOrder,
299
325
  '51103': InvalidOrder,
package/js/src/okx.js CHANGED
@@ -576,6 +576,7 @@ export default class okx extends Exchange {
576
576
  '50027': PermissionDenied,
577
577
  '50028': ExchangeError,
578
578
  '50044': BadRequest,
579
+ '50061': ExchangeError,
579
580
  '50062': ExchangeError,
580
581
  // API Class
581
582
  '50100': ExchangeError,
@@ -763,6 +764,15 @@ export default class okx extends Exchange {
763
764
  // SPOT/MARGIN error codes 54000-54999
764
765
  '54000': ExchangeError,
765
766
  '54001': ExchangeError,
767
+ // Trading bot Error Code from 55100 to 55999
768
+ '55100': InvalidOrder,
769
+ '55101': InvalidOrder,
770
+ '55102': InvalidOrder,
771
+ '55103': InvalidOrder,
772
+ '55104': InvalidOrder,
773
+ '55111': InvalidOrder,
774
+ '55112': InvalidOrder,
775
+ '55113': InvalidOrder,
766
776
  // FUNDING error codes 58000-58999
767
777
  '58000': ExchangeError,
768
778
  '58001': AuthenticationError,
@@ -5024,6 +5034,14 @@ export default class okx extends Exchange {
5024
5034
  '3': 'pending',
5025
5035
  '4': 'pending',
5026
5036
  '5': 'pending',
5037
+ '6': 'pending',
5038
+ '7': 'pending',
5039
+ '8': 'pending',
5040
+ '9': 'pending',
5041
+ '10': 'pending',
5042
+ '12': 'pending',
5043
+ '15': 'pending',
5044
+ '16': 'pending',
5027
5045
  };
5028
5046
  return this.safeString(statuses, status, status);
5029
5047
  }
package/js/src/woo.d.ts CHANGED
@@ -30,6 +30,8 @@ export default class woo extends Exchange {
30
30
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
31
31
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
32
32
  fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
33
+ fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
34
+ fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
33
35
  parseTimeInForce(timeInForce: any): string;
34
36
  parseOrder(order: any, market?: Market): Order;
35
37
  parseOrderStatus(status: any): any;
package/js/src/woo.js CHANGED
@@ -59,7 +59,7 @@ export default class woo extends Exchange {
59
59
  'fetchBalance': true,
60
60
  'fetchCanceledOrders': false,
61
61
  'fetchClosedOrder': false,
62
- 'fetchClosedOrders': false,
62
+ 'fetchClosedOrders': true,
63
63
  'fetchCurrencies': true,
64
64
  'fetchDepositAddress': true,
65
65
  'fetchDeposits': true,
@@ -78,7 +78,7 @@ export default class woo extends Exchange {
78
78
  'fetchOHLCV': true,
79
79
  'fetchOpenInterestHistory': false,
80
80
  'fetchOpenOrder': false,
81
- 'fetchOpenOrders': false,
81
+ 'fetchOpenOrders': true,
82
82
  'fetchOrder': true,
83
83
  'fetchOrderBook': true,
84
84
  'fetchOrders': true,
@@ -1448,7 +1448,51 @@ export default class woo extends Exchange {
1448
1448
  //
1449
1449
  const data = this.safeValue(response, 'data', response);
1450
1450
  const orders = this.safeList(data, 'rows');
1451
- return this.parseOrders(orders, market, since, limit, params);
1451
+ return this.parseOrders(orders, market, since, limit);
1452
+ }
1453
+ async fetchOpenOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1454
+ /**
1455
+ * @method
1456
+ * @name woo#fetchOpenOrders
1457
+ * @description fetches information on multiple orders made by the user
1458
+ * @see https://docs.woo.org/#get-orders
1459
+ * @see https://docs.woo.org/#get-algo-orders
1460
+ * @param {string} symbol unified market symbol of the market orders were made in
1461
+ * @param {int} [since] the earliest time in ms to fetch orders for
1462
+ * @param {int} [limit] the maximum number of order structures to retrieve
1463
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1464
+ * @param {boolean} [params.stop] whether the order is a stop/algo order
1465
+ * @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
1466
+ * @param {string} [params.side] 'buy' or 'sell'
1467
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
1468
+ * @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
1469
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1470
+ */
1471
+ await this.loadMarkets();
1472
+ const extendedParams = this.extend(params, { 'status': 'INCOMPLETE' });
1473
+ return await this.fetchOrders(symbol, since, limit, extendedParams);
1474
+ }
1475
+ async fetchClosedOrders(symbol = undefined, since = undefined, limit = undefined, params = {}) {
1476
+ /**
1477
+ * @method
1478
+ * @name woo#fetchClosedOrders
1479
+ * @description fetches information on multiple orders made by the user
1480
+ * @see https://docs.woo.org/#get-orders
1481
+ * @see https://docs.woo.org/#get-algo-orders
1482
+ * @param {string} symbol unified market symbol of the market orders were made in
1483
+ * @param {int} [since] the earliest time in ms to fetch orders for
1484
+ * @param {int} [limit] the maximum number of order structures to retrieve
1485
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1486
+ * @param {boolean} [params.stop] whether the order is a stop/algo order
1487
+ * @param {boolean} [params.isTriggered] whether the order has been triggered (false by default)
1488
+ * @param {string} [params.side] 'buy' or 'sell'
1489
+ * @param {boolean} [params.trailing] set to true if you want to fetch trailing orders
1490
+ * @param {boolean} [params.paginate] set to true if you want to fetch orders with pagination
1491
+ * @returns {Order[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
1492
+ */
1493
+ await this.loadMarkets();
1494
+ const extendedParams = this.extend(params, { 'status': 'COMPLETED' });
1495
+ return await this.fetchOrders(symbol, since, limit, extendedParams);
1452
1496
  }
1453
1497
  parseTimeInForce(timeInForce) {
1454
1498
  const timeInForces = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.77",
3
+ "version": "4.2.78",
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
@@ -728,6 +728,9 @@
728
728
  "ticker": {
729
729
  "baseVolume": "quoteVolume >= baseVolume * low is failing",
730
730
  "bid": "failing the test"
731
+ },
732
+ "fetchOHLCV": {
733
+ "4":"https://app.travis-ci.com/github/ccxt/ccxt/builds/269542746#L3512"
731
734
  }
732
735
  }
733
736
  },
@@ -1397,7 +1400,8 @@
1397
1400
  "side": "undefined"
1398
1401
  },
1399
1402
  "ticker": {
1400
- "baseVolume": "not supported"
1403
+ "baseVolume": "not supported",
1404
+ "spread": "same bid-ask https://app.travis-ci.com/github/ccxt/ccxt/builds/269550508#L3581"
1401
1405
  },
1402
1406
  "fetchOHLCV": "spot not supported",
1403
1407
  "fetchCurrencies": {