ccxt 4.2.75 → 4.2.77

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 (78) hide show
  1. package/README.md +5 -5
  2. package/build.sh +2 -2
  3. package/dist/ccxt.browser.js +1004 -616
  4. package/dist/ccxt.browser.min.js +7 -7
  5. package/dist/cjs/ccxt.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +6 -0
  7. package/dist/cjs/src/binance.js +504 -443
  8. package/dist/cjs/src/bingx.js +13 -15
  9. package/dist/cjs/src/blofin.js +14 -2
  10. package/dist/cjs/src/bybit.js +102 -59
  11. package/dist/cjs/src/coinbase.js +19 -3
  12. package/dist/cjs/src/coinbaseinternational.js +1 -1
  13. package/dist/cjs/src/delta.js +66 -49
  14. package/dist/cjs/src/gate.js +1 -0
  15. package/dist/cjs/src/htx.js +1 -0
  16. package/dist/cjs/src/hyperliquid.js +1 -1
  17. package/dist/cjs/src/kraken.js +8 -8
  18. package/dist/cjs/src/kucoin.js +152 -5
  19. package/dist/cjs/src/pro/ascendex.js +1 -1
  20. package/dist/cjs/src/pro/bitvavo.js +1 -1
  21. package/dist/cjs/src/pro/coinbaseinternational.js +1 -1
  22. package/dist/cjs/src/pro/coinex.js +20 -14
  23. package/dist/cjs/src/pro/deribit.js +1 -1
  24. package/dist/cjs/src/pro/exmo.js +1 -1
  25. package/dist/cjs/src/pro/krakenfutures.js +1 -1
  26. package/dist/cjs/src/pro/phemex.js +1 -1
  27. package/dist/cjs/src/pro/poloniex.js +1 -1
  28. package/dist/cjs/src/pro/probit.js +1 -1
  29. package/dist/cjs/src/pro/woo.js +61 -6
  30. package/dist/cjs/src/woo.js +25 -0
  31. package/js/ccxt.d.ts +1 -1
  32. package/js/ccxt.js +1 -1
  33. package/js/src/abstract/binance.d.ts +1 -0
  34. package/js/src/abstract/binancecoinm.d.ts +1 -0
  35. package/js/src/abstract/binanceus.d.ts +1 -0
  36. package/js/src/abstract/binanceusdm.d.ts +1 -0
  37. package/js/src/abstract/bingx.d.ts +2 -0
  38. package/js/src/abstract/kucoin.d.ts +1 -0
  39. package/js/src/abstract/kucoinfutures.d.ts +1 -0
  40. package/js/src/base/Exchange.d.ts +3 -3
  41. package/js/src/base/Exchange.js +6 -0
  42. package/js/src/base/types.d.ts +1 -1
  43. package/js/src/binance.d.ts +2 -2
  44. package/js/src/binance.js +504 -443
  45. package/js/src/bingx.js +13 -15
  46. package/js/src/bitflyer.d.ts +2 -2
  47. package/js/src/bithumb.d.ts +2 -2
  48. package/js/src/blofin.js +14 -2
  49. package/js/src/bybit.d.ts +1 -1
  50. package/js/src/bybit.js +102 -59
  51. package/js/src/coinbase.js +19 -3
  52. package/js/src/coinbaseinternational.js +1 -1
  53. package/js/src/delta.d.ts +2 -1
  54. package/js/src/delta.js +66 -49
  55. package/js/src/deribit.d.ts +1 -1
  56. package/js/src/gate.d.ts +1 -1
  57. package/js/src/gate.js +1 -0
  58. package/js/src/htx.js +1 -0
  59. package/js/src/hyperliquid.js +1 -1
  60. package/js/src/kraken.js +8 -8
  61. package/js/src/kucoin.d.ts +4 -1
  62. package/js/src/kucoin.js +152 -5
  63. package/js/src/okx.d.ts +1 -1
  64. package/js/src/pro/ascendex.js +1 -1
  65. package/js/src/pro/bitvavo.js +1 -1
  66. package/js/src/pro/coinbaseinternational.js +1 -1
  67. package/js/src/pro/coinex.js +20 -14
  68. package/js/src/pro/deribit.js +1 -1
  69. package/js/src/pro/exmo.js +1 -1
  70. package/js/src/pro/krakenfutures.js +1 -1
  71. package/js/src/pro/phemex.js +1 -1
  72. package/js/src/pro/poloniex.js +1 -1
  73. package/js/src/pro/probit.js +1 -1
  74. package/js/src/pro/woo.d.ts +1 -0
  75. package/js/src/pro/woo.js +61 -6
  76. package/js/src/woo.js +25 -0
  77. package/package.json +1 -1
  78. package/skip-tests.json +1 -2
package/js/src/delta.js CHANGED
@@ -337,7 +337,7 @@ export default class delta extends Exchange {
337
337
  */
338
338
  const response = await this.publicGetSettings(params);
339
339
  // full response sample under `fetchStatus`
340
- const result = this.safeValue(response, 'result', {});
340
+ const result = this.safeDict(response, 'result', {});
341
341
  return this.safeIntegerProduct(result, 'server_time', 0.001);
342
342
  }
343
343
  async fetchStatus(params = {}) {
@@ -402,7 +402,7 @@ export default class delta extends Exchange {
402
402
  // "success": true
403
403
  // }
404
404
  //
405
- const result = this.safeValue(response, 'result', {});
405
+ const result = this.safeDict(response, 'result', {});
406
406
  const underMaintenance = this.safeString(result, 'under_maintenance');
407
407
  const status = (underMaintenance === 'true') ? 'maintenance' : 'ok';
408
408
  const updated = this.safeIntegerProduct(result, 'server_time', 0.001, this.milliseconds());
@@ -454,7 +454,7 @@ export default class delta extends Exchange {
454
454
  // "success":true
455
455
  // }
456
456
  //
457
- const currencies = this.safeValue(response, 'result', []);
457
+ const currencies = this.safeList(response, 'result', []);
458
458
  const result = {};
459
459
  for (let i = 0; i < currencies.length; i++) {
460
460
  const currency = currencies[i];
@@ -491,16 +491,33 @@ export default class delta extends Exchange {
491
491
  }
492
492
  async loadMarkets(reload = false, params = {}) {
493
493
  const markets = await super.loadMarkets(reload, params);
494
- const currenciesByNumericId = this.safeValue(this.options, 'currenciesByNumericId');
494
+ const currenciesByNumericId = this.safeDict(this.options, 'currenciesByNumericId');
495
495
  if ((currenciesByNumericId === undefined) || reload) {
496
- this.options['currenciesByNumericId'] = this.indexBy(this.currencies, 'numericId');
496
+ this.options['currenciesByNumericId'] = this.indexByStringifiedNumericId(this.currencies);
497
497
  }
498
- const marketsByNumericId = this.safeValue(this.options, 'marketsByNumericId');
498
+ const marketsByNumericId = this.safeDict(this.options, 'marketsByNumericId');
499
499
  if ((marketsByNumericId === undefined) || reload) {
500
- this.options['marketsByNumericId'] = this.indexBy(this.markets, 'numericId');
500
+ this.options['marketsByNumericId'] = this.indexByStringifiedNumericId(this.markets);
501
501
  }
502
502
  return markets;
503
503
  }
504
+ indexByStringifiedNumericId(input) {
505
+ const result = {};
506
+ if (input === undefined) {
507
+ return undefined;
508
+ }
509
+ const keys = Object.keys(input);
510
+ for (let i = 0; i < keys.length; i++) {
511
+ const key = keys[i];
512
+ const item = input[key];
513
+ const numericIdString = this.safeString(item, 'numericId');
514
+ if (numericIdString === undefined) {
515
+ continue;
516
+ }
517
+ result[numericIdString] = item;
518
+ }
519
+ return result;
520
+ }
504
521
  async fetchMarkets(params = {}) {
505
522
  /**
506
523
  * @method
@@ -689,7 +706,7 @@ export default class delta extends Exchange {
689
706
  // "success":true
690
707
  // }
691
708
  //
692
- const markets = this.safeValue(response, 'result', []);
709
+ const markets = this.safeList(response, 'result', []);
693
710
  const result = [];
694
711
  for (let i = 0; i < markets.length; i++) {
695
712
  const market = markets[i];
@@ -698,10 +715,10 @@ export default class delta extends Exchange {
698
715
  continue;
699
716
  }
700
717
  // const settlingAsset = this.safeValue (market, 'settling_asset', {});
701
- const quotingAsset = this.safeValue(market, 'quoting_asset', {});
702
- const underlyingAsset = this.safeValue(market, 'underlying_asset', {});
703
- const settlingAsset = this.safeValue(market, 'settling_asset');
704
- const productSpecs = this.safeValue(market, 'product_specs', {});
718
+ const quotingAsset = this.safeDict(market, 'quoting_asset', {});
719
+ const underlyingAsset = this.safeDict(market, 'underlying_asset', {});
720
+ const settlingAsset = this.safeDict(market, 'settling_asset');
721
+ const productSpecs = this.safeDict(market, 'product_specs', {});
705
722
  const baseId = this.safeString(underlyingAsset, 'symbol');
706
723
  const quoteId = this.safeString(quotingAsset, 'symbol');
707
724
  const settleId = this.safeString(settlingAsset, 'symbol');
@@ -934,7 +951,7 @@ export default class delta extends Exchange {
934
951
  const marketId = this.safeString(ticker, 'symbol');
935
952
  const symbol = this.safeSymbol(marketId, market);
936
953
  const last = this.safeString(ticker, 'close');
937
- const quotes = this.safeValue(ticker, 'quotes', {});
954
+ const quotes = this.safeDict(ticker, 'quotes', {});
938
955
  return this.safeTicker({
939
956
  'symbol': symbol,
940
957
  'timestamp': timestamp,
@@ -1098,7 +1115,7 @@ export default class delta extends Exchange {
1098
1115
  // "success": true
1099
1116
  // }
1100
1117
  //
1101
- const result = this.safeValue(response, 'result', {});
1118
+ const result = this.safeDict(response, 'result', {});
1102
1119
  return this.parseTicker(result, market);
1103
1120
  }
1104
1121
  async fetchTickers(symbols = undefined, params = {}) {
@@ -1244,7 +1261,7 @@ export default class delta extends Exchange {
1244
1261
  // "success":true
1245
1262
  // }
1246
1263
  //
1247
- const tickers = this.safeValue(response, 'result', []);
1264
+ const tickers = this.safeList(response, 'result', []);
1248
1265
  const result = {};
1249
1266
  for (let i = 0; i < tickers.length; i++) {
1250
1267
  const ticker = this.parseTicker(tickers[i]);
@@ -1291,7 +1308,7 @@ export default class delta extends Exchange {
1291
1308
  // "success":true
1292
1309
  // }
1293
1310
  //
1294
- const result = this.safeValue(response, 'result', {});
1311
+ const result = this.safeDict(response, 'result', {});
1295
1312
  return this.parseOrderBook(result, market['symbol'], undefined, 'buy', 'sell', 'price', 'size');
1296
1313
  }
1297
1314
  parseTrade(trade, market = undefined) {
@@ -1348,7 +1365,7 @@ export default class delta extends Exchange {
1348
1365
  timestamp = this.safeIntegerProduct(trade, 'timestamp', 0.001, timestamp);
1349
1366
  const priceString = this.safeString(trade, 'price');
1350
1367
  const amountString = this.safeString(trade, 'size');
1351
- const product = this.safeValue(trade, 'product', {});
1368
+ const product = this.safeDict(trade, 'product', {});
1352
1369
  const marketId = this.safeString(product, 'symbol');
1353
1370
  const symbol = this.safeSymbol(marketId, market);
1354
1371
  const sellerRole = this.safeString(trade, 'seller_role');
@@ -1362,7 +1379,7 @@ export default class delta extends Exchange {
1362
1379
  }
1363
1380
  }
1364
1381
  const takerOrMaker = this.safeString(trade, 'role');
1365
- const metaData = this.safeValue(trade, 'meta_data', {});
1382
+ const metaData = this.safeDict(trade, 'meta_data', {});
1366
1383
  let type = this.safeString(metaData, 'order_type');
1367
1384
  if (type !== undefined) {
1368
1385
  type = type.replace('_order', '');
@@ -1370,7 +1387,7 @@ export default class delta extends Exchange {
1370
1387
  const feeCostString = this.safeString(trade, 'commission');
1371
1388
  let fee = undefined;
1372
1389
  if (feeCostString !== undefined) {
1373
- const settlingAsset = this.safeValue(product, 'settling_asset', {});
1390
+ const settlingAsset = this.safeDict(product, 'settling_asset', {});
1374
1391
  const feeCurrencyId = this.safeString(settlingAsset, 'symbol');
1375
1392
  const feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId);
1376
1393
  fee = {
@@ -1427,7 +1444,7 @@ export default class delta extends Exchange {
1427
1444
  // "success":true
1428
1445
  // }
1429
1446
  //
1430
- const result = this.safeValue(response, 'result', []);
1447
+ const result = this.safeList(response, 'result', []);
1431
1448
  return this.parseTrades(result, market, since, limit);
1432
1449
  }
1433
1450
  parseOHLCV(ohlcv, market = undefined) {
@@ -1502,17 +1519,17 @@ export default class delta extends Exchange {
1502
1519
  // ]
1503
1520
  // }
1504
1521
  //
1505
- const result = this.safeValue(response, 'result', []);
1522
+ const result = this.safeList(response, 'result', []);
1506
1523
  return this.parseOHLCVs(result, market, timeframe, since, limit);
1507
1524
  }
1508
1525
  parseBalance(response) {
1509
- const balances = this.safeValue(response, 'result', []);
1526
+ const balances = this.safeList(response, 'result', []);
1510
1527
  const result = { 'info': response };
1511
- const currenciesByNumericId = this.safeValue(this.options, 'currenciesByNumericId', {});
1528
+ const currenciesByNumericId = this.safeDict(this.options, 'currenciesByNumericId', {});
1512
1529
  for (let i = 0; i < balances.length; i++) {
1513
1530
  const balance = balances[i];
1514
1531
  const currencyId = this.safeString(balance, 'asset_id');
1515
- const currency = this.safeValue(currenciesByNumericId, currencyId);
1532
+ const currency = this.safeDict(currenciesByNumericId, currencyId);
1516
1533
  const code = (currency === undefined) ? currencyId : currency['code'];
1517
1534
  const account = this.account();
1518
1535
  account['total'] = this.safeString(balance, 'balance');
@@ -1581,7 +1598,7 @@ export default class delta extends Exchange {
1581
1598
  // "success":true
1582
1599
  // }
1583
1600
  //
1584
- const result = this.safeValue(response, 'result', {});
1601
+ const result = this.safeDict(response, 'result', {});
1585
1602
  return this.parsePosition(result, market);
1586
1603
  }
1587
1604
  async fetchPositions(symbols = undefined, params = {}) {
@@ -1617,7 +1634,7 @@ export default class delta extends Exchange {
1617
1634
  // ]
1618
1635
  // }
1619
1636
  //
1620
- const result = this.safeValue(response, 'result', []);
1637
+ const result = this.safeList(response, 'result', []);
1621
1638
  return this.parsePositions(result, symbols);
1622
1639
  }
1623
1640
  parsePosition(position, market = undefined) {
@@ -1739,7 +1756,7 @@ export default class delta extends Exchange {
1739
1756
  const clientOrderId = this.safeString(order, 'client_order_id');
1740
1757
  const timestamp = this.parse8601(this.safeString(order, 'created_at'));
1741
1758
  const marketId = this.safeString(order, 'product_id');
1742
- const marketsByNumericId = this.safeValue(this.options, 'marketsByNumericId', {});
1759
+ const marketsByNumericId = this.safeDict(this.options, 'marketsByNumericId', {});
1743
1760
  market = this.safeValue(marketsByNumericId, marketId, market);
1744
1761
  const symbol = (market === undefined) ? marketId : market['symbol'];
1745
1762
  const status = this.parseOrderStatus(this.safeString(order, 'state'));
@@ -1755,7 +1772,7 @@ export default class delta extends Exchange {
1755
1772
  if (feeCostString !== undefined) {
1756
1773
  let feeCurrencyCode = undefined;
1757
1774
  if (market !== undefined) {
1758
- const settlingAsset = this.safeValue(market['info'], 'settling_asset', {});
1775
+ const settlingAsset = this.safeDict(market['info'], 'settling_asset', {});
1759
1776
  const feeCurrencyId = this.safeString(settlingAsset, 'symbol');
1760
1777
  feeCurrencyCode = this.safeCurrencyCode(feeCurrencyId);
1761
1778
  }
@@ -1822,7 +1839,7 @@ export default class delta extends Exchange {
1822
1839
  if (clientOrderId !== undefined) {
1823
1840
  request['client_order_id'] = clientOrderId;
1824
1841
  }
1825
- const reduceOnly = this.safeValue(params, 'reduceOnly');
1842
+ const reduceOnly = this.safeBool(params, 'reduceOnly');
1826
1843
  if (reduceOnly) {
1827
1844
  request['reduce_only'] = reduceOnly;
1828
1845
  params = this.omit(params, 'reduceOnly');
@@ -1864,7 +1881,7 @@ export default class delta extends Exchange {
1864
1881
  // "success":true
1865
1882
  // }
1866
1883
  //
1867
- const result = this.safeValue(response, 'result', {});
1884
+ const result = this.safeDict(response, 'result', {});
1868
1885
  return this.parseOrder(result, market);
1869
1886
  }
1870
1887
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
@@ -1914,7 +1931,7 @@ export default class delta extends Exchange {
1914
1931
  // }
1915
1932
  // }
1916
1933
  //
1917
- const result = this.safeValue(response, 'result');
1934
+ const result = this.safeDict(response, 'result');
1918
1935
  return this.parseOrder(result, market);
1919
1936
  }
1920
1937
  async cancelOrder(id, symbol = undefined, params = {}) {
@@ -1974,7 +1991,7 @@ export default class delta extends Exchange {
1974
1991
  // "success":true
1975
1992
  // }
1976
1993
  //
1977
- const result = this.safeValue(response, 'result');
1994
+ const result = this.safeDict(response, 'result');
1978
1995
  return this.parseOrder(result, market);
1979
1996
  }
1980
1997
  async cancelAllOrders(symbol = undefined, params = {}) {
@@ -2087,7 +2104,7 @@ export default class delta extends Exchange {
2087
2104
  // }
2088
2105
  // }
2089
2106
  //
2090
- const result = this.safeValue(response, 'result', []);
2107
+ const result = this.safeList(response, 'result', []);
2091
2108
  return this.parseOrders(result, market, since, limit);
2092
2109
  }
2093
2110
  async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -2169,7 +2186,7 @@ export default class delta extends Exchange {
2169
2186
  // "success":true
2170
2187
  // }
2171
2188
  //
2172
- const result = this.safeValue(response, 'result', []);
2189
+ const result = this.safeList(response, 'result', []);
2173
2190
  return this.parseTrades(result, market, since, limit);
2174
2191
  }
2175
2192
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -2222,7 +2239,7 @@ export default class delta extends Exchange {
2222
2239
  // "success":true
2223
2240
  // }
2224
2241
  //
2225
- const result = this.safeValue(response, 'result', []);
2242
+ const result = this.safeList(response, 'result', []);
2226
2243
  return this.parseLedger(result, currency, since, limit);
2227
2244
  }
2228
2245
  parseLedgerEntryType(type) {
@@ -2259,7 +2276,7 @@ export default class delta extends Exchange {
2259
2276
  const id = this.safeString(item, 'uuid');
2260
2277
  let direction = undefined;
2261
2278
  const account = undefined;
2262
- const metaData = this.safeValue(item, 'meta_data', {});
2279
+ const metaData = this.safeDict(item, 'meta_data', {});
2263
2280
  const referenceId = this.safeString(metaData, 'transaction_id');
2264
2281
  const referenceAccount = undefined;
2265
2282
  let type = this.safeString(item, 'transaction_type');
@@ -2270,8 +2287,8 @@ export default class delta extends Exchange {
2270
2287
  direction = 'out';
2271
2288
  }
2272
2289
  type = this.parseLedgerEntryType(type);
2273
- const currencyId = this.safeInteger(item, 'asset_id');
2274
- const currenciesByNumericId = this.safeValue(this.options, 'currenciesByNumericId');
2290
+ const currencyId = this.safeString(item, 'asset_id');
2291
+ const currenciesByNumericId = this.safeDict(this.options, 'currenciesByNumericId');
2275
2292
  currency = this.safeValue(currenciesByNumericId, currencyId, currency);
2276
2293
  const code = (currency === undefined) ? undefined : currency['code'];
2277
2294
  const amount = this.safeString(item, 'amount');
@@ -2335,7 +2352,7 @@ export default class delta extends Exchange {
2335
2352
  // }
2336
2353
  // }
2337
2354
  //
2338
- const result = this.safeValue(response, 'result', {});
2355
+ const result = this.safeDict(response, 'result', {});
2339
2356
  return this.parseDepositAddress(result, currency);
2340
2357
  }
2341
2358
  parseDepositAddress(depositAddress, currency = undefined) {
@@ -2429,7 +2446,7 @@ export default class delta extends Exchange {
2429
2446
  // "success": true
2430
2447
  // }
2431
2448
  //
2432
- const result = this.safeValue(response, 'result', {});
2449
+ const result = this.safeDict(response, 'result', {});
2433
2450
  return this.parseFundingRate(result, market);
2434
2451
  }
2435
2452
  async fetchFundingRates(symbols = undefined, params = {}) {
@@ -2495,7 +2512,7 @@ export default class delta extends Exchange {
2495
2512
  // "success":true
2496
2513
  // }
2497
2514
  //
2498
- const rates = this.safeValue(response, 'result', []);
2515
+ const rates = this.safeList(response, 'result', []);
2499
2516
  const result = this.parseFundingRates(rates);
2500
2517
  return this.filterByArray(result, 'symbol', symbols);
2501
2518
  }
@@ -2627,7 +2644,7 @@ export default class delta extends Exchange {
2627
2644
  // "success": true
2628
2645
  // }
2629
2646
  //
2630
- const result = this.safeValue(response, 'result', {});
2647
+ const result = this.safeDict(response, 'result', {});
2631
2648
  return this.parseMarginModification(result, market);
2632
2649
  }
2633
2650
  parseMarginModification(data, market = undefined) {
@@ -2734,7 +2751,7 @@ export default class delta extends Exchange {
2734
2751
  // "success": true
2735
2752
  // }
2736
2753
  //
2737
- const result = this.safeValue(response, 'result', {});
2754
+ const result = this.safeDict(response, 'result', {});
2738
2755
  return this.parseOpenInterest(result, market);
2739
2756
  }
2740
2757
  parseOpenInterest(interest, market = undefined) {
@@ -2958,7 +2975,7 @@ export default class delta extends Exchange {
2958
2975
  // "success": true
2959
2976
  // }
2960
2977
  //
2961
- const result = this.safeValue(response, 'result', []);
2978
+ const result = this.safeList(response, 'result', []);
2962
2979
  const settlements = this.parseSettlements(result, market);
2963
2980
  const sorted = this.sortBy(settlements, 'timestamp');
2964
2981
  return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
@@ -3102,7 +3119,7 @@ export default class delta extends Exchange {
3102
3119
  // "success": true
3103
3120
  // }
3104
3121
  //
3105
- const result = this.safeValue(response, 'result', {});
3122
+ const result = this.safeDict(response, 'result', {});
3106
3123
  return this.parseGreeks(result, market);
3107
3124
  }
3108
3125
  parseGreeks(greeks, market = undefined) {
@@ -3158,8 +3175,8 @@ export default class delta extends Exchange {
3158
3175
  const timestamp = this.safeIntegerProduct(greeks, 'timestamp', 0.001);
3159
3176
  const marketId = this.safeString(greeks, 'symbol');
3160
3177
  const symbol = this.safeSymbol(marketId, market);
3161
- const stats = this.safeValue(greeks, 'greeks', {});
3162
- const quotes = this.safeValue(greeks, 'quotes', {});
3178
+ const stats = this.safeDict(greeks, 'greeks', {});
3179
+ const quotes = this.safeDict(greeks, 'quotes', {});
3163
3180
  return {
3164
3181
  'symbol': symbol,
3165
3182
  'timestamp': timestamp,
@@ -3202,7 +3219,7 @@ export default class delta extends Exchange {
3202
3219
  //
3203
3220
  // {"result":{},"success":true}
3204
3221
  //
3205
- const position = this.parsePosition(this.safeValue(response, 'result', {}));
3222
+ const position = this.parsePosition(this.safeDict(response, 'result', {}));
3206
3223
  return [position];
3207
3224
  }
3208
3225
  async fetchMarginMode(symbol, params = {}) {
@@ -3339,7 +3356,7 @@ export default class delta extends Exchange {
3339
3356
  //
3340
3357
  // {"error":{"code":"insufficient_margin","context":{"available_balance":"0.000000000000000000","required_additional_balance":"1.618626000000000000000000000"}},"success":false}
3341
3358
  //
3342
- const error = this.safeValue(response, 'error', {});
3359
+ const error = this.safeDict(response, 'error', {});
3343
3360
  const errorCode = this.safeString(error, 'code');
3344
3361
  if (errorCode !== undefined) {
3345
3362
  const feedback = this.id + ' ' + body;
@@ -10,7 +10,7 @@ export default class deribit extends Exchange {
10
10
  convertMarketIdExpireDate(date: any): string;
11
11
  convertExpireDateToMarketIdDate(date: any): any;
12
12
  createExpiredOptionMarket(symbol: string): MarketInterface;
13
- safeMarket(marketId?: any, market?: any, delimiter?: any, marketType?: any): MarketInterface;
13
+ safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
14
14
  fetchTime(params?: {}): Promise<number>;
15
15
  fetchCurrencies(params?: {}): Promise<{}>;
16
16
  codeFromOptions(methodName: any, params?: {}): any;
package/js/src/gate.d.ts CHANGED
@@ -9,7 +9,7 @@ export default class gate extends Exchange {
9
9
  setSandboxMode(enable: boolean): void;
10
10
  convertExpireDate(date: any): string;
11
11
  createExpiredOptionMarket(symbol: string): MarketInterface;
12
- safeMarket(marketId?: any, market?: any, delimiter?: any, marketType?: any): MarketInterface;
12
+ safeMarket(marketId?: Str, market?: Market, delimiter?: Str, marketType?: Str): MarketInterface;
13
13
  fetchMarkets(params?: {}): Promise<any>;
14
14
  fetchSpotMarkets(params?: {}): Promise<any[]>;
15
15
  fetchContractMarkets(params?: {}): Promise<any[]>;
package/js/src/gate.js CHANGED
@@ -6158,6 +6158,7 @@ export default class gate extends Exchange {
6158
6158
  * @param {int} [since] the time(ms) of the earliest record to retrieve as a unix timestamp
6159
6159
  * @param {int} [limit] default 30
6160
6160
  * @param {object} [params] exchange specific parameters
6161
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
6161
6162
  * @returns {object} an open interest structure{@link https://docs.ccxt.com/#/?id=open-interest-structure}
6162
6163
  */
6163
6164
  await this.loadMarkets();
package/js/src/htx.js CHANGED
@@ -6795,6 +6795,7 @@ export default class htx extends Exchange {
6795
6795
  * @param {int} [since] not used by huobi, but filtered internally by ccxt
6796
6796
  * @param {int} [limit] not used by huobi, but filtered internally by ccxt
6797
6797
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6798
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
6798
6799
  * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
6799
6800
  */
6800
6801
  if (symbol === undefined) {
@@ -558,7 +558,7 @@ export default class hyperliquid extends Exchange {
558
558
  // }
559
559
  //
560
560
  return [
561
- this.safeInteger(ohlcv, 'T'),
561
+ this.safeInteger(ohlcv, 't'),
562
562
  this.safeNumber(ohlcv, 'o'),
563
563
  this.safeNumber(ohlcv, 'h'),
564
564
  this.safeNumber(ohlcv, 'l'),
package/js/src/kraken.js CHANGED
@@ -455,7 +455,7 @@ export default class kraken extends Exchange {
455
455
  * @method
456
456
  * @name kraken#fetchMarkets
457
457
  * @description retrieves data on all markets for kraken
458
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getTradableAssetPairs
458
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTradableAssetPairs
459
459
  * @param {object} [params] extra parameters specific to the exchange API endpoint
460
460
  * @returns {object[]} an array of objects representing market data
461
461
  */
@@ -642,7 +642,7 @@ export default class kraken extends Exchange {
642
642
  * @method
643
643
  * @name kraken#fetchCurrencies
644
644
  * @description fetches all available currencies on an exchange
645
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getAssetInfo
645
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getAssetInfo
646
646
  * @param {object} [params] extra parameters specific to the exchange API endpoint
647
647
  * @returns {object} an associative dictionary of currencies
648
648
  */
@@ -770,7 +770,7 @@ export default class kraken extends Exchange {
770
770
  * @method
771
771
  * @name kraken#fetchOrderBook
772
772
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
773
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getOrderBook
773
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOrderBook
774
774
  * @param {string} symbol unified symbol of the market to fetch the order book for
775
775
  * @param {int} [limit] the maximum amount of order book entries to return
776
776
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -872,7 +872,7 @@ export default class kraken extends Exchange {
872
872
  * @method
873
873
  * @name kraken#fetchTickers
874
874
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
875
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getTickerInformation
875
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
876
876
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
877
877
  * @param {object} [params] extra parameters specific to the exchange API endpoint
878
878
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -909,7 +909,7 @@ export default class kraken extends Exchange {
909
909
  * @method
910
910
  * @name kraken#fetchTicker
911
911
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
912
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getTickerInformation
912
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getTickerInformation
913
913
  * @param {string} symbol unified symbol of the market to fetch the ticker for
914
914
  * @param {object} [params] extra parameters specific to the exchange API endpoint
915
915
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -954,7 +954,7 @@ export default class kraken extends Exchange {
954
954
  * @method
955
955
  * @name kraken#fetchOHLCV
956
956
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
957
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getOHLCData
957
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getOHLCData
958
958
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
959
959
  * @param {string} timeframe the length of time each candle represents
960
960
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -1252,7 +1252,7 @@ export default class kraken extends Exchange {
1252
1252
  * @method
1253
1253
  * @name kraken#fetchTrades
1254
1254
  * @description get the list of most recent trades for a particular symbol
1255
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getRecentTrades
1255
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getRecentTrades
1256
1256
  * @param {string} symbol unified symbol of the market to fetch trades for
1257
1257
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1258
1258
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -2416,7 +2416,7 @@ export default class kraken extends Exchange {
2416
2416
  * @method
2417
2417
  * @name kraken#fetchTime
2418
2418
  * @description fetches the current integer timestamp in milliseconds from the exchange server
2419
- * @see https://docs.kraken.com/rest/#tag/Market-Data/operation/getServerTime
2419
+ * @see https://docs.kraken.com/rest/#tag/Spot-Market-Data/operation/getServerTime
2420
2420
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2421
2421
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
2422
2422
  */
@@ -137,7 +137,7 @@ export default class kucoin extends Exchange {
137
137
  currency: string;
138
138
  rate: number;
139
139
  period: number;
140
- timestamp: string;
140
+ timestamp: number;
141
141
  datetime: string;
142
142
  info: any;
143
143
  };
@@ -153,6 +153,9 @@ export default class kucoin extends Exchange {
153
153
  datetime: string;
154
154
  info: any;
155
155
  };
156
+ fetchBorrowRateHistories(codes?: any, since?: Int, limit?: Int, params?: {}): Promise<{}>;
157
+ fetchBorrowRateHistory(code: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
158
+ parseBorrowRateHistories(response: any, codes: any, since: any, limit: any): {};
156
159
  borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
157
160
  id: string;
158
161
  currency: string;