ccxt 4.5.5 → 4.5.6

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 (90) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +15 -15
  3. package/dist/cjs/ccxt.js +6 -6
  4. package/dist/cjs/src/abstract/toobit.js +11 -0
  5. package/dist/cjs/src/abstract/tradeogre.js +1 -1
  6. package/dist/cjs/src/backpack.js +1 -1
  7. package/dist/cjs/src/base/Exchange.js +129 -2
  8. package/dist/cjs/src/bigone.js +4 -4
  9. package/dist/cjs/src/binance.js +79 -20
  10. package/dist/cjs/src/bingx.js +5 -2
  11. package/dist/cjs/src/bitget.js +16 -9
  12. package/dist/cjs/src/bybit.js +186 -127
  13. package/dist/cjs/src/coinsph.js +4 -1
  14. package/dist/cjs/src/cryptocom.js +6 -3
  15. package/dist/cjs/src/gate.js +1 -1
  16. package/dist/cjs/src/gemini.js +2 -2
  17. package/dist/cjs/src/hyperliquid.js +3 -0
  18. package/dist/cjs/src/kraken.js +6 -2
  19. package/dist/cjs/src/kucoin.js +1 -2
  20. package/dist/cjs/src/luno.js +4 -1
  21. package/dist/cjs/src/mexc.js +4 -1
  22. package/dist/cjs/src/okcoin.js +4 -1
  23. package/dist/cjs/src/okx.js +34 -3
  24. package/dist/cjs/src/phemex.js +1 -1
  25. package/dist/cjs/src/pro/apex.js +1 -0
  26. package/dist/cjs/src/pro/backpack.js +1 -1
  27. package/dist/cjs/src/pro/binance.js +150 -19
  28. package/dist/cjs/src/pro/bitget.js +332 -76
  29. package/dist/cjs/src/pro/cex.js +1 -0
  30. package/dist/cjs/src/pro/independentreserve.js +1 -0
  31. package/dist/cjs/src/pro/mexc.js +23 -23
  32. package/dist/cjs/src/pro/okx.js +46 -10
  33. package/dist/cjs/src/pro/toobit.js +1163 -0
  34. package/dist/cjs/src/pro/tradeogre.js +1 -1
  35. package/dist/cjs/src/toobit.js +2999 -0
  36. package/dist/cjs/src/tradeogre.js +1 -1
  37. package/js/ccxt.d.ts +8 -8
  38. package/js/ccxt.js +6 -6
  39. package/js/src/abstract/myokx.d.ts +1 -0
  40. package/js/src/abstract/okx.d.ts +1 -0
  41. package/js/src/abstract/okxus.d.ts +1 -0
  42. package/js/src/abstract/toobit.d.ts +66 -0
  43. package/js/src/backpack.js +1 -1
  44. package/js/src/base/Exchange.d.ts +9 -0
  45. package/js/src/base/Exchange.js +129 -2
  46. package/js/src/bigone.js +4 -4
  47. package/js/src/binance.d.ts +9 -0
  48. package/js/src/binance.js +79 -20
  49. package/js/src/bingx.js +5 -2
  50. package/js/src/bitget.js +16 -9
  51. package/js/src/bybit.d.ts +8 -0
  52. package/js/src/bybit.js +186 -127
  53. package/js/src/coinsph.js +4 -1
  54. package/js/src/cryptocom.js +6 -3
  55. package/js/src/gate.js +1 -1
  56. package/js/src/gemini.js +2 -2
  57. package/js/src/hyperliquid.js +3 -0
  58. package/js/src/kraken.d.ts +1 -1
  59. package/js/src/kraken.js +6 -2
  60. package/js/src/kucoin.js +1 -2
  61. package/js/src/luno.js +4 -1
  62. package/js/src/mexc.js +4 -1
  63. package/js/src/okcoin.js +4 -1
  64. package/js/src/okx.js +34 -3
  65. package/js/src/phemex.js +1 -1
  66. package/js/src/pro/apex.js +1 -0
  67. package/js/src/pro/backpack.d.ts +1 -1
  68. package/js/src/pro/backpack.js +1 -1
  69. package/js/src/pro/binance.d.ts +24 -0
  70. package/js/src/pro/binance.js +150 -19
  71. package/js/src/pro/bitget.d.ts +6 -0
  72. package/js/src/pro/bitget.js +332 -76
  73. package/js/src/pro/cex.js +1 -0
  74. package/js/src/pro/independentreserve.js +1 -0
  75. package/js/src/pro/mexc.js +23 -23
  76. package/js/src/pro/okx.d.ts +7 -1
  77. package/js/src/pro/okx.js +46 -10
  78. package/js/src/pro/toobit.d.ts +174 -0
  79. package/js/src/pro/toobit.js +1162 -0
  80. package/js/src/toobit.d.ts +456 -0
  81. package/js/src/toobit.js +2992 -0
  82. package/package.json +1 -1
  83. package/dist/373.ccxt.browser.js +0 -7630
  84. package/dist/373.ccxt.browser.min.js +0 -1
  85. package/js/src/abstract/tradeogre.d.ts +0 -21
  86. package/js/src/pro/tradeogre.d.ts +0 -49
  87. package/js/src/pro/tradeogre.js +0 -278
  88. package/js/src/tradeogre.d.ts +0 -149
  89. package/js/src/tradeogre.js +0 -872
  90. /package/js/src/abstract/{tradeogre.js → toobit.js} +0 -0
@@ -1241,6 +1241,9 @@ class bybit extends bybit$1["default"] {
1241
1241
  },
1242
1242
  'spot': {
1243
1243
  'extends': 'default',
1244
+ 'fetchCurrencies': {
1245
+ 'private': true,
1246
+ },
1244
1247
  'createOrder': {
1245
1248
  'triggerPriceType': undefined,
1246
1249
  'triggerDirection': false,
@@ -1285,14 +1288,14 @@ class bybit extends bybit$1["default"] {
1285
1288
  },
1286
1289
  });
1287
1290
  }
1291
+ /**
1292
+ * @method
1293
+ * @name bybit#enableDemoTrading
1294
+ * @description enables or disables demo trading mode
1295
+ * @see https://bybit-exchange.github.io/docs/v5/demo
1296
+ * @param {boolean} [enable] true if demo trading should be enabled, false otherwise
1297
+ */
1288
1298
  enableDemoTrading(enable) {
1289
- /**
1290
- * @method
1291
- * @name bybit#enableDemoTrading
1292
- * @description enables or disables demo trading mode
1293
- * @see https://bybit-exchange.github.io/docs/v5/demo
1294
- * @param {boolean} [enable] true if demo trading should be enabled, false otherwise
1295
- */
1296
1299
  if (this.isSandboxModeEnabled) {
1297
1300
  throw new errors.NotSupported(this.id + ' demo trading does not support in sandbox environment');
1298
1301
  }
@@ -1600,10 +1603,10 @@ class bybit extends bybit$1["default"] {
1600
1603
  */
1601
1604
  async fetchCurrencies(params = {}) {
1602
1605
  if (!this.checkRequiredCredentials(false)) {
1603
- return undefined;
1606
+ return {};
1604
1607
  }
1605
1608
  if (this.options['enableDemoTrading']) {
1606
- return undefined;
1609
+ return {};
1607
1610
  }
1608
1611
  const response = await this.privateGetV5AssetCoinQueryInfo(params);
1609
1612
  //
@@ -3012,6 +3015,44 @@ class bybit extends bybit$1["default"] {
3012
3015
  // "seq": 34771365464
3013
3016
  // }
3014
3017
  //
3018
+ // watchMyTrades execution
3019
+ //
3020
+ // {
3021
+ // "category": "linear",
3022
+ // "symbol": "BTCUSDT",
3023
+ // "closedSize": "0",
3024
+ // "execFee": "0.0679239",
3025
+ // "execId": "135dbae5-cbed-5275-9290-3956bb2ed907",
3026
+ // "execPrice": "123498",
3027
+ // "execQty": "0.001",
3028
+ // "execType": "Trade",
3029
+ // "execValue": "123.498",
3030
+ // "feeRate": "0.00055",
3031
+ // "tradeIv": "",
3032
+ // "markIv": "",
3033
+ // "blockTradeId": "",
3034
+ // "markPrice": "122392",
3035
+ // "indexPrice": "",
3036
+ // "underlyingPrice": "",
3037
+ // "leavesQty": "0",
3038
+ // "orderId": "aee7453a-a100-465f-857a-3db780e9329a",
3039
+ // "orderLinkId": "",
3040
+ // "orderPrice": "123615.9",
3041
+ // "orderQty": "0.001",
3042
+ // "orderType": "Market",
3043
+ // "stopOrderType": "UNKNOWN",
3044
+ // "side": "Buy",
3045
+ // "execTime": "1757837580469",
3046
+ // "isLeverage": "0",
3047
+ // "isMaker": false,
3048
+ // "seq": 9517074055,
3049
+ // "marketUnit": "",
3050
+ // "execPnl": "0",
3051
+ // "createType": "CreateByUser",
3052
+ // "extraFees": [],
3053
+ // "feeCoin": "USDT"
3054
+ // }
3055
+ //
3015
3056
  const id = this.safeStringN(trade, ['execId', 'id', 'tradeId']);
3016
3057
  const marketId = this.safeString(trade, 'symbol');
3017
3058
  let marketType = ('createType' in trade) ? 'contract' : 'spot';
@@ -3086,7 +3127,7 @@ class bybit extends bybit$1["default"] {
3086
3127
  }
3087
3128
  fee = {
3088
3129
  'cost': feeCostString,
3089
- 'currency': feeCurrencyCode,
3130
+ 'currency': this.safeString(trade, 'feeCoin', feeCurrencyCode),
3090
3131
  'rate': feeRateString,
3091
3132
  };
3092
3133
  }
@@ -3654,48 +3695,56 @@ class bybit extends bybit$1["default"] {
3654
3695
  //
3655
3696
  // v5
3656
3697
  // {
3657
- // "orderId": "14bad3a1-6454-43d8-bcf2-5345896cf74d",
3658
- // "orderLinkId": "YLxaWKMiHU",
3659
- // "blockTradeId": "",
3660
3698
  // "symbol": "BTCUSDT",
3661
- // "price": "26864.40",
3662
- // "qty": "0.003",
3663
- // "side": "Buy",
3664
- // "isLeverage": "",
3665
- // "positionIdx": 1,
3666
- // "orderStatus": "Cancelled",
3699
+ // "orderType": "Market",
3700
+ // "orderLinkId": "",
3701
+ // "slLimitPrice": "0",
3702
+ // "orderId": "f5f2d355-9a11-4af3-9b83-aa1d6ab6ddfe",
3667
3703
  // "cancelType": "UNKNOWN",
3668
- // "rejectReason": "EC_PostOnlyWillTakeLiquidity",
3669
- // "avgPrice": "0",
3670
- // "leavesQty": "0.000",
3671
- // "leavesValue": "0",
3672
- // "cumExecQty": "0.000",
3673
- // "cumExecValue": "0",
3674
- // "cumExecFee": "0",
3675
- // "timeInForce": "PostOnly",
3676
- // "orderType": "Limit",
3677
- // "stopOrderType": "UNKNOWN",
3678
- // "orderIv": "",
3679
- // "triggerPrice": "0.00",
3680
- // "takeProfit": "0.00",
3681
- // "stopLoss": "0.00",
3682
- // "tpTriggerBy": "UNKNOWN",
3683
- // "slTriggerBy": "UNKNOWN",
3684
- // "triggerDirection": 0,
3685
- // "triggerBy": "UNKNOWN",
3686
- // "lastPriceOnCreated": "0.00",
3687
- // "reduceOnly": false,
3688
- // "closeOnTrigger": false,
3704
+ // "avgPrice": "122529.9",
3705
+ // "stopOrderType": "",
3706
+ // "lastPriceOnCreated": "123747.9",
3707
+ // "orderStatus": "Filled",
3708
+ // "createType": "CreateByUser",
3709
+ // "takeProfit": "",
3710
+ // "cumExecValue": "122.5299",
3711
+ // "tpslMode": "",
3689
3712
  // "smpType": "None",
3713
+ // "triggerDirection": 0,
3714
+ // "blockTradeId": "",
3715
+ // "cumFeeDetail": {
3716
+ // "USDT": "0.06739145"
3717
+ // },
3718
+ // "rejectReason": "EC_NoError",
3719
+ // "isLeverage": "",
3720
+ // "price": "120518",
3721
+ // "orderIv": "",
3722
+ // "createdTime": "1757837618905",
3723
+ // "tpTriggerBy": "",
3724
+ // "positionIdx": 0,
3725
+ // "timeInForce": "IOC",
3726
+ // "leavesValue": "0",
3727
+ // "updatedTime": "1757837618909",
3728
+ // "side": "Sell",
3690
3729
  // "smpGroup": 0,
3691
- // "smpOrderId": "",
3692
- // "tpslMode": "",
3693
- // "tpLimitPrice": "",
3694
- // "slLimitPrice": "",
3730
+ // "triggerPrice": "",
3731
+ // "tpLimitPrice": "0",
3732
+ // "cumExecFee": "0.06739145",
3733
+ // "slTriggerBy": "",
3734
+ // "leavesQty": "0",
3735
+ // "closeOnTrigger": false,
3736
+ // "slippageToleranceType": "UNKNOWN",
3695
3737
  // "placeType": "",
3696
- // "createdTime": "1684476068369",
3697
- // "updatedTime": "1684476068372"
3738
+ // "cumExecQty": "0.001",
3739
+ // "reduceOnly": true,
3740
+ // "qty": "0.001",
3741
+ // "stopLoss": "",
3742
+ // "smpOrderId": "",
3743
+ // "slippageTolerance": "0",
3744
+ // "triggerBy": "",
3745
+ // "extraFees": ""
3698
3746
  // }
3747
+ //
3699
3748
  // createOrders failed order
3700
3749
  // {
3701
3750
  // "category": "linear",
@@ -3753,33 +3802,13 @@ class bybit extends bybit$1["default"] {
3753
3802
  const status = this.parseOrderStatus(rawStatus);
3754
3803
  const side = this.safeStringLower(order, 'side');
3755
3804
  let fee = undefined;
3756
- const feeCostString = this.safeString(order, 'cumExecFee');
3757
- if (feeCostString !== undefined) {
3758
- let feeCurrencyCode = undefined;
3759
- if (market['spot']) {
3760
- if (Precise["default"].stringGt(feeCostString, '0')) {
3761
- if (side === 'buy') {
3762
- feeCurrencyCode = market['base'];
3763
- }
3764
- else {
3765
- feeCurrencyCode = market['quote'];
3766
- }
3767
- }
3768
- else {
3769
- if (side === 'buy') {
3770
- feeCurrencyCode = market['quote'];
3771
- }
3772
- else {
3773
- feeCurrencyCode = market['base'];
3774
- }
3775
- }
3776
- }
3777
- else {
3778
- feeCurrencyCode = market['inverse'] ? market['base'] : market['settle'];
3779
- }
3805
+ const cumFeeDetail = this.safeDict(order, 'cumFeeDetail', {});
3806
+ const feeCoins = Object.keys(cumFeeDetail);
3807
+ const feeCoinId = this.safeString(feeCoins, 0);
3808
+ if (feeCoinId !== undefined) {
3780
3809
  fee = {
3781
- 'cost': this.parseNumber(feeCostString),
3782
- 'currency': feeCurrencyCode,
3810
+ 'cost': this.safeNumber(cumFeeDetail, feeCoinId),
3811
+ 'currency': feeCoinId,
3783
3812
  };
3784
3813
  }
3785
3814
  let clientOrderId = this.safeString(order, 'orderLinkId');
@@ -5245,49 +5274,63 @@ class bybit extends bybit$1["default"] {
5245
5274
  // "retCode": 0,
5246
5275
  // "retMsg": "OK",
5247
5276
  // "result": {
5248
- // "nextPageCursor": "03234de9-1332-41eb-b805-4a9f42c136a3%3A1672220109387%2C03234de9-1332-41eb-b805-4a9f42c136a3%3A1672220109387",
5277
+ // "nextPageCursor": "f5f2d355-9a11-4af3-9b83-aa1d6ab6ddfe%3A1757837618905%2Caee7453a-a100-465f-857a-3db780e9329a%3A1757837580469",
5249
5278
  // "category": "linear",
5250
5279
  // "list": [
5251
5280
  // {
5252
5281
  // "symbol": "BTCUSDT",
5253
- // "orderType": "Limit",
5254
- // "orderLinkId": "test-001",
5255
- // "orderId": "03234de9-1332-41eb-b805-4a9f42c136a3",
5256
- // "cancelType": "CancelByUser",
5257
- // "avgPrice": "0",
5258
- // "stopOrderType": "UNKNOWN",
5259
- // "lastPriceOnCreated": "16656.5",
5260
- // "orderStatus": "Cancelled",
5282
+ // "orderType": "Market",
5283
+ // "orderLinkId": "",
5284
+ // "slLimitPrice": "0",
5285
+ // "orderId": "f5f2d355-9a11-4af3-9b83-aa1d6ab6ddfe",
5286
+ // "cancelType": "UNKNOWN",
5287
+ // "avgPrice": "122529.9",
5288
+ // "stopOrderType": "",
5289
+ // "lastPriceOnCreated": "123747.9",
5290
+ // "orderStatus": "Filled",
5291
+ // "createType": "CreateByUser",
5261
5292
  // "takeProfit": "",
5262
- // "cumExecValue": "0",
5293
+ // "cumExecValue": "122.5299",
5294
+ // "tpslMode": "",
5295
+ // "smpType": "None",
5263
5296
  // "triggerDirection": 0,
5264
5297
  // "blockTradeId": "",
5265
- // "rejectReason": "EC_PerCancelRequest",
5298
+ // "cumFeeDetail": {
5299
+ // "USDT": "0.06739145"
5300
+ // },
5301
+ // "rejectReason": "EC_NoError",
5266
5302
  // "isLeverage": "",
5267
- // "price": "18000",
5303
+ // "price": "120518",
5268
5304
  // "orderIv": "",
5269
- // "createdTime": "1672220109387",
5270
- // "tpTriggerBy": "UNKNOWN",
5305
+ // "createdTime": "1757837618905",
5306
+ // "tpTriggerBy": "",
5271
5307
  // "positionIdx": 0,
5272
- // "timeInForce": "GoodTillCancel",
5308
+ // "timeInForce": "IOC",
5273
5309
  // "leavesValue": "0",
5274
- // "updatedTime": "1672220114123",
5310
+ // "updatedTime": "1757837618909",
5275
5311
  // "side": "Sell",
5312
+ // "smpGroup": 0,
5276
5313
  // "triggerPrice": "",
5277
- // "cumExecFee": "0",
5278
- // "slTriggerBy": "UNKNOWN",
5314
+ // "tpLimitPrice": "0",
5315
+ // "cumExecFee": "0.06739145",
5316
+ // "slTriggerBy": "",
5279
5317
  // "leavesQty": "0",
5280
5318
  // "closeOnTrigger": false,
5281
- // "cumExecQty": "0",
5282
- // "reduceOnly": false,
5283
- // "qty": "0.1",
5319
+ // "slippageToleranceType": "UNKNOWN",
5320
+ // "placeType": "",
5321
+ // "cumExecQty": "0.001",
5322
+ // "reduceOnly": true,
5323
+ // "qty": "0.001",
5284
5324
  // "stopLoss": "",
5285
- // "triggerBy": "UNKNOWN"
5286
- // }
5325
+ // "smpOrderId": "",
5326
+ // "slippageTolerance": "0",
5327
+ // "triggerBy": "",
5328
+ // "extraFees": ""
5329
+ // },
5287
5330
  // ]
5288
5331
  // },
5289
5332
  // "retExtInfo": {},
5290
- // "time": 1672221263862
5333
+ // "time": 1758187806376
5291
5334
  // }
5292
5335
  //
5293
5336
  const data = this.addPaginationCursorToResult(response);
@@ -5400,48 +5443,63 @@ class bybit extends bybit$1["default"] {
5400
5443
  // "retCode": 0,
5401
5444
  // "retMsg": "OK",
5402
5445
  // "result": {
5403
- // "nextPageCursor": "1321052653536515584%3A1672217748287%2C1321052653536515584%3A1672217748287",
5404
- // "category": "spot",
5446
+ // "nextPageCursor": "f5f2d355-9a11-4af3-9b83-aa1d6ab6ddfe%3A1757837618905%2Caee7453a-a100-465f-857a-3db780e9329a%3A1757837580469",
5447
+ // "category": "linear",
5405
5448
  // "list": [
5406
5449
  // {
5407
- // "symbol": "ETHUSDT",
5408
- // "orderType": "Limit",
5409
- // "orderLinkId": "1672217748277652",
5410
- // "orderId": "1321052653536515584",
5450
+ // "symbol": "BTCUSDT",
5451
+ // "orderType": "Market",
5452
+ // "orderLinkId": "",
5453
+ // "slLimitPrice": "0",
5454
+ // "orderId": "f5f2d355-9a11-4af3-9b83-aa1d6ab6ddfe",
5411
5455
  // "cancelType": "UNKNOWN",
5412
- // "avgPrice": "",
5413
- // "stopOrderType": "tpslOrder",
5414
- // "lastPriceOnCreated": "",
5415
- // "orderStatus": "Cancelled",
5456
+ // "avgPrice": "122529.9",
5457
+ // "stopOrderType": "",
5458
+ // "lastPriceOnCreated": "123747.9",
5459
+ // "orderStatus": "Filled",
5460
+ // "createType": "CreateByUser",
5416
5461
  // "takeProfit": "",
5417
- // "cumExecValue": "0",
5462
+ // "cumExecValue": "122.5299",
5463
+ // "tpslMode": "",
5464
+ // "smpType": "None",
5418
5465
  // "triggerDirection": 0,
5419
- // "isLeverage": "0",
5420
- // "rejectReason": "",
5421
- // "price": "1000",
5466
+ // "blockTradeId": "",
5467
+ // "cumFeeDetail": {
5468
+ // "USDT": "0.06739145"
5469
+ // },
5470
+ // "rejectReason": "EC_NoError",
5471
+ // "isLeverage": "",
5472
+ // "price": "120518",
5422
5473
  // "orderIv": "",
5423
- // "createdTime": "1672217748287",
5474
+ // "createdTime": "1757837618905",
5424
5475
  // "tpTriggerBy": "",
5425
5476
  // "positionIdx": 0,
5426
- // "timeInForce": "GTC",
5427
- // "leavesValue": "500",
5428
- // "updatedTime": "1672217748287",
5429
- // "side": "Buy",
5430
- // "triggerPrice": "1500",
5431
- // "cumExecFee": "0",
5432
- // "leavesQty": "0",
5477
+ // "timeInForce": "IOC",
5478
+ // "leavesValue": "0",
5479
+ // "updatedTime": "1757837618909",
5480
+ // "side": "Sell",
5481
+ // "smpGroup": 0,
5482
+ // "triggerPrice": "",
5483
+ // "tpLimitPrice": "0",
5484
+ // "cumExecFee": "0.06739145",
5433
5485
  // "slTriggerBy": "",
5486
+ // "leavesQty": "0",
5434
5487
  // "closeOnTrigger": false,
5435
- // "cumExecQty": "0",
5436
- // "reduceOnly": false,
5437
- // "qty": "0.5",
5488
+ // "slippageToleranceType": "UNKNOWN",
5489
+ // "placeType": "",
5490
+ // "cumExecQty": "0.001",
5491
+ // "reduceOnly": true,
5492
+ // "qty": "0.001",
5438
5493
  // "stopLoss": "",
5439
- // "triggerBy": "1192.5"
5440
- // }
5494
+ // "smpOrderId": "",
5495
+ // "slippageTolerance": "0",
5496
+ // "triggerBy": "",
5497
+ // "extraFees": ""
5498
+ // },
5441
5499
  // ]
5442
5500
  // },
5443
5501
  // "retExtInfo": {},
5444
- // "time": 1672219526294
5502
+ // "time": 1758187806376
5445
5503
  // }
5446
5504
  //
5447
5505
  const data = this.addPaginationCursorToResult(response);
@@ -6185,6 +6243,7 @@ class bybit extends bybit$1["default"] {
6185
6243
  * @param {string} address the address to withdraw to
6186
6244
  * @param {string} tag
6187
6245
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6246
+ * @param {string} [params.accountType] 'UTA', 'FUND', 'FUND,UTA', and 'SPOT (for classic accounts only)
6188
6247
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
6189
6248
  */
6190
6249
  async withdraw(code, amount, address, tag = undefined, params = {}) {
@@ -6192,9 +6251,9 @@ class bybit extends bybit$1["default"] {
6192
6251
  let accountType = undefined;
6193
6252
  const accounts = await this.isUnifiedEnabled();
6194
6253
  const isUta = accounts[1];
6195
- [accountType, params] = this.handleOptionAndParams(params, 'withdraw', 'accountType', 'SPOT');
6196
- if (isUta) {
6197
- accountType = 'UTA';
6254
+ [accountType, params] = this.handleOptionAndParams(params, 'withdraw', 'accountType');
6255
+ if (accountType === undefined) {
6256
+ accountType = isUta ? 'UTA' : 'SPOT';
6198
6257
  }
6199
6258
  await this.loadMarkets();
6200
6259
  this.checkAddress(address);
@@ -328,6 +328,9 @@ class coinsph extends coinsph$1["default"] {
328
328
  'features': {
329
329
  'spot': {
330
330
  'sandbox': false,
331
+ 'fetchCurrencies': {
332
+ 'private': true,
333
+ },
331
334
  'createOrder': {
332
335
  'marginMode': false,
333
336
  'triggerPrice': true,
@@ -523,7 +526,7 @@ class coinsph extends coinsph$1["default"] {
523
526
  */
524
527
  async fetchCurrencies(params = {}) {
525
528
  if (!this.checkRequiredCredentials(false)) {
526
- return undefined;
529
+ return {};
527
530
  }
528
531
  const response = await this.privateGetOpenapiWalletV1ConfigGetall(params);
529
532
  //
@@ -438,6 +438,9 @@ class cryptocom extends cryptocom$1["default"] {
438
438
  },
439
439
  'spot': {
440
440
  'extends': 'default',
441
+ 'fetchCurrencies': {
442
+ 'private': true,
443
+ },
441
444
  },
442
445
  'swap': {
443
446
  'linear': {
@@ -532,13 +535,13 @@ class cryptocom extends cryptocom$1["default"] {
532
535
  async fetchCurrencies(params = {}) {
533
536
  // this endpoint requires authentication
534
537
  if (!this.checkRequiredCredentials(false)) {
535
- return undefined;
538
+ return {};
536
539
  }
537
540
  let skipFetchCurrencies = false;
538
541
  [skipFetchCurrencies, params] = this.handleOptionAndParams(params, 'fetchCurrencies', 'skipFetchCurrencies', false);
539
542
  if (skipFetchCurrencies) {
540
543
  // sub-accounts can't access this endpoint
541
- return undefined;
544
+ return {};
542
545
  }
543
546
  let response = {};
544
547
  try {
@@ -548,7 +551,7 @@ class cryptocom extends cryptocom$1["default"] {
548
551
  if (e instanceof errors.ExchangeError) {
549
552
  // sub-accounts can't access this endpoint
550
553
  // {"code":"10001","msg":"SYS_ERROR"}
551
- return undefined;
554
+ return {};
552
555
  }
553
556
  throw e;
554
557
  // do nothing
@@ -1874,7 +1874,7 @@ class gate extends gate$1["default"] {
1874
1874
  // sandbox/testnet only supports future markets
1875
1875
  const apiBackup = this.safeValue(this.urls, 'apiBackup');
1876
1876
  if (apiBackup !== undefined) {
1877
- return undefined;
1877
+ return {};
1878
1878
  }
1879
1879
  const response = await this.publicSpotGetCurrencies(params);
1880
1880
  //
@@ -388,7 +388,7 @@ class gemini extends gemini$1["default"] {
388
388
  async fetchCurrenciesFromWeb(params = {}) {
389
389
  const data = await this.fetchWebEndpoint('fetchCurrencies', 'webExchangeGet', true, '="currencyData">', '</script>');
390
390
  if (data === undefined) {
391
- return undefined;
391
+ return {};
392
392
  }
393
393
  //
394
394
  // {
@@ -1457,7 +1457,7 @@ class gemini extends gemini$1["default"] {
1457
1457
  // "is_hidden":false,
1458
1458
  // "was_forced":false,
1459
1459
  // "executed_amount":"0",
1460
- // "client_order_id":"1650398445709",
1460
+ // "client_order_id":"1650398445701",
1461
1461
  // "options":[],
1462
1462
  // "price":"2000.00",
1463
1463
  // "original_amount":"0.01",
@@ -3567,6 +3567,9 @@ class hyperliquid extends hyperliquid$1["default"] {
3567
3567
  }
3568
3568
  const until = this.safeInteger(params, 'until');
3569
3569
  if (until !== undefined) {
3570
+ if (since === undefined) {
3571
+ throw new errors.ArgumentsRequired(this.id + ' fetchDeposits requires since while until is set');
3572
+ }
3570
3573
  request['endTime'] = until;
3571
3574
  params = this.omit(params, ['until']);
3572
3575
  }
@@ -429,6 +429,7 @@ class kraken extends kraken$1["default"] {
429
429
  'OriginTrail': 'OTP',
430
430
  'Celestia': 'TIA',
431
431
  },
432
+ 'marketHelperProps': ['marketsByAltname', 'delistedMarketsById'], // used by setMarketsFromExchange
432
433
  },
433
434
  'features': {
434
435
  'spot': {
@@ -3193,7 +3194,7 @@ class kraken extends kraken$1["default"] {
3193
3194
  * @see https://docs.kraken.com/rest/#tag/Funding/operation/withdrawFunds
3194
3195
  * @param {string} code unified currency code
3195
3196
  * @param {float} amount the amount to withdraw
3196
- * @param {string} address the address to withdraw to
3197
+ * @param {string} address the address to withdraw to, not required can be '' or undefined/none/null
3197
3198
  * @param {string} tag
3198
3199
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3199
3200
  * @returns {object} a [transaction structure]{@link https://docs.ccxt.com/#/?id=transaction-structure}
@@ -3207,8 +3208,11 @@ class kraken extends kraken$1["default"] {
3207
3208
  const request = {
3208
3209
  'asset': currency['id'],
3209
3210
  'amount': amount,
3210
- 'address': address,
3211
+ // 'address': address,
3211
3212
  };
3213
+ if (address !== undefined && address !== '') {
3214
+ request['address'] = address;
3215
+ }
3212
3216
  const response = await this.privatePostWithdraw(this.extend(request, params));
3213
3217
  //
3214
3218
  // {
@@ -1390,7 +1390,6 @@ class kucoin extends kucoin$1["default"] {
1390
1390
  //
1391
1391
  const currenciesData = this.safeList(response, 'data', []);
1392
1392
  const brokenCurrencies = this.safeList(this.options, 'brokenCurrencies', ['00', 'OPEN_ERROR', 'HUF', 'BDT']);
1393
- const otherFiats = this.safeList(this.options, 'fiats', ['KWD', 'IRR', 'PKR']);
1394
1393
  const result = {};
1395
1394
  for (let i = 0; i < currenciesData.length; i++) {
1396
1395
  const entry = currenciesData[i];
@@ -1431,7 +1430,7 @@ class kucoin extends kucoin$1["default"] {
1431
1430
  // kucoin has determined 'fiat' currencies with below logic
1432
1431
  const rawPrecision = this.safeString(entry, 'precision');
1433
1432
  const precision = this.parseNumber(this.parsePrecision(rawPrecision));
1434
- const isFiat = this.inArray(id, otherFiats) || ((rawPrecision === '2') && (chainsLength === 0));
1433
+ const isFiat = chainsLength === 0;
1435
1434
  result[code] = this.safeCurrencyStructure({
1436
1435
  'id': id,
1437
1436
  'name': this.safeString(entry, 'fullName'),
@@ -225,6 +225,9 @@ class luno extends luno$1["default"] {
225
225
  'features': {
226
226
  'spot': {
227
227
  'sandbox': false,
228
+ 'fetchCurrencies': {
229
+ 'private': true,
230
+ },
228
231
  'createOrder': {
229
232
  'marginMode': false,
230
233
  'triggerPrice': true,
@@ -311,7 +314,7 @@ class luno extends luno$1["default"] {
311
314
  */
312
315
  async fetchCurrencies(params = {}) {
313
316
  if (!this.checkRequiredCredentials(false)) {
314
- return undefined;
317
+ return {};
315
318
  }
316
319
  const response = await this.privateGetSendNetworks(params);
317
320
  //
@@ -763,6 +763,9 @@ class mexc extends mexc$1["default"] {
763
763
  },
764
764
  'spot': {
765
765
  'extends': 'default',
766
+ 'fetchCurrencies': {
767
+ 'private': true,
768
+ },
766
769
  },
767
770
  'forDerivs': {
768
771
  'extends': 'default',
@@ -1053,7 +1056,7 @@ class mexc extends mexc$1["default"] {
1053
1056
  // therefore we check the keys here
1054
1057
  // and fallback to generating the currencies from the markets
1055
1058
  if (!this.checkRequiredCredentials(false)) {
1056
- return undefined;
1059
+ return {};
1057
1060
  }
1058
1061
  const response = await this.spotPrivateGetCapitalConfigGetall(params);
1059
1062
  //
@@ -210,6 +210,9 @@ class okcoin extends okcoin$1["default"] {
210
210
  'features': {
211
211
  'spot': {
212
212
  'sandbox': false,
213
+ 'fetchCurrencies': {
214
+ 'private': true,
215
+ },
213
216
  'createOrder': {
214
217
  'marginMode': true,
215
218
  'triggerPrice': true,
@@ -824,7 +827,7 @@ class okcoin extends okcoin$1["default"] {
824
827
  if (this.options['warnOnFetchCurrenciesWithoutAuthorization']) {
825
828
  throw new errors.ExchangeError(this.id + ' fetchCurrencies() is a private API endpoint that requires authentication with API keys. Set the API keys on the exchange instance or exchange.options["warnOnFetchCurrenciesWithoutAuthorization"] = false to suppress this warning message.');
826
829
  }
827
- return undefined;
830
+ return {};
828
831
  }
829
832
  else {
830
833
  const response = await this.privateGetAssetCurrencies(params);