ccxt 4.3.68 → 4.3.70

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 (76) hide show
  1. package/README.md +6 -6
  2. package/dist/ccxt.browser.min.js +5 -5
  3. package/dist/cjs/ccxt.js +3 -1
  4. package/dist/cjs/src/ascendex.js +1 -1
  5. package/dist/cjs/src/base/Exchange.js +365 -353
  6. package/dist/cjs/src/binance.js +1 -1
  7. package/dist/cjs/src/bingx.js +134 -75
  8. package/dist/cjs/src/blofin.js +63 -6
  9. package/dist/cjs/src/btcbox.js +2 -1
  10. package/dist/cjs/src/bybit.js +1 -1
  11. package/dist/cjs/src/coinbaseinternational.js +247 -3
  12. package/dist/cjs/src/cryptocom.js +9 -1
  13. package/dist/cjs/src/hitbtc.js +1 -1
  14. package/dist/cjs/src/hyperliquid.js +0 -3
  15. package/dist/cjs/src/kucoin.js +12 -5
  16. package/dist/cjs/src/oxfun.js +2 -2
  17. package/dist/cjs/src/poloniex.js +34 -33
  18. package/dist/cjs/src/poloniexfutures.js +26 -26
  19. package/dist/cjs/src/pro/blofin.js +665 -0
  20. package/dist/cjs/src/pro/coinbaseinternational.js +154 -9
  21. package/dist/cjs/src/pro/cryptocom.js +3 -1
  22. package/dist/cjs/src/pro/hitbtc.js +26 -8
  23. package/dist/cjs/src/pro/okx.js +7 -0
  24. package/dist/cjs/src/pro/poloniex.js +50 -25
  25. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  26. package/dist/cjs/src/pro/woo.js +5 -4
  27. package/js/ccxt.d.ts +6 -3
  28. package/js/ccxt.js +3 -1
  29. package/js/src/abstract/coinbaseinternational.d.ts +1 -1
  30. package/js/src/ascendex.js +1 -1
  31. package/js/src/base/Exchange.d.ts +108 -82
  32. package/js/src/base/Exchange.js +365 -353
  33. package/js/src/base/types.d.ts +0 -2
  34. package/js/src/binance.d.ts +2 -2
  35. package/js/src/binance.js +1 -1
  36. package/js/src/bingx.d.ts +2 -2
  37. package/js/src/bingx.js +134 -75
  38. package/js/src/bitget.d.ts +2 -2
  39. package/js/src/bitmart.d.ts +2 -2
  40. package/js/src/bitrue.d.ts +2 -2
  41. package/js/src/blofin.d.ts +1 -1
  42. package/js/src/blofin.js +63 -6
  43. package/js/src/btcbox.js +2 -1
  44. package/js/src/bybit.d.ts +2 -2
  45. package/js/src/bybit.js +1 -1
  46. package/js/src/coinbaseinternational.d.ts +17 -1
  47. package/js/src/coinbaseinternational.js +247 -3
  48. package/js/src/coinex.d.ts +2 -2
  49. package/js/src/coinlist.d.ts +2 -2
  50. package/js/src/cryptocom.js +10 -2
  51. package/js/src/deribit.d.ts +2 -2
  52. package/js/src/digifinex.d.ts +2 -2
  53. package/js/src/hitbtc.js +1 -1
  54. package/js/src/hyperliquid.js +0 -3
  55. package/js/src/kucoin.js +12 -5
  56. package/js/src/latoken.d.ts +2 -2
  57. package/js/src/mexc.d.ts +2 -2
  58. package/js/src/okx.d.ts +2 -2
  59. package/js/src/oxfun.d.ts +1 -1
  60. package/js/src/oxfun.js +2 -2
  61. package/js/src/phemex.d.ts +2 -2
  62. package/js/src/poloniex.js +34 -33
  63. package/js/src/poloniexfutures.js +26 -26
  64. package/js/src/pro/blofin.d.ts +39 -0
  65. package/js/src/pro/blofin.js +668 -0
  66. package/js/src/pro/coinbaseinternational.d.ts +5 -1
  67. package/js/src/pro/coinbaseinternational.js +155 -10
  68. package/js/src/pro/cryptocom.js +4 -2
  69. package/js/src/pro/hitbtc.d.ts +1 -1
  70. package/js/src/pro/hitbtc.js +26 -8
  71. package/js/src/pro/okx.js +7 -0
  72. package/js/src/pro/poloniex.js +50 -25
  73. package/js/src/pro/poloniexfutures.js +5 -5
  74. package/js/src/pro/woo.js +5 -4
  75. package/js/src/woo.d.ts +2 -2
  76. package/package.json +1 -1
@@ -68,7 +68,7 @@ export default class coinbaseinternational extends Exchange {
68
68
  'fetchCrossBorrowRates': false,
69
69
  'fetchCurrencies': true,
70
70
  'fetchDeposits': true,
71
- 'fetchFundingHistory': false,
71
+ 'fetchFundingHistory': true,
72
72
  'fetchFundingRate': false,
73
73
  'fetchFundingRateHistory': true,
74
74
  'fetchFundingRates': false,
@@ -86,7 +86,7 @@ export default class coinbaseinternational extends Exchange {
86
86
  'fetchMyBuys': true,
87
87
  'fetchMySells': true,
88
88
  'fetchMyTrades': true,
89
- 'fetchOHLCV': false,
89
+ 'fetchOHLCV': true,
90
90
  'fetchOpenInterestHistory': false,
91
91
  'fetchOpenOrders': true,
92
92
  'fetchOrder': true,
@@ -105,6 +105,7 @@ export default class coinbaseinternational extends Exchange {
105
105
  'fetchTrades': false,
106
106
  'fetchTradingFee': false,
107
107
  'fetchTradingFees': false,
108
+ 'fetchTransfers': true,
108
109
  'fetchWithdrawals': true,
109
110
  'reduceMargin': false,
110
111
  'sandbox': true,
@@ -147,7 +148,7 @@ export default class coinbaseinternational extends Exchange {
147
148
  'instruments/{instrument}',
148
149
  'instruments/{instrument}/quote',
149
150
  'instruments/{instrument}/funding',
150
- '',
151
+ 'instruments/{instrument}/candles',
151
152
  ],
152
153
  },
153
154
  'private': {
@@ -355,6 +356,81 @@ export default class coinbaseinternational extends Exchange {
355
356
  'info': account,
356
357
  };
357
358
  }
359
+ async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = 100, params = {}) {
360
+ /**
361
+ * @method
362
+ * @name coinbaseinternational#fetchOHLCV
363
+ * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
364
+ * @see https://docs.cdp.coinbase.com/intx/reference/getinstrumentcandles
365
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
366
+ * @param {string} timeframe the length of time each candle represents
367
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
368
+ * @param {int} [limit] the maximum amount of candles to fetch, default 100 max 10000
369
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
370
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
371
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
372
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
373
+ */
374
+ await this.loadMarkets();
375
+ let paginate = false;
376
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate');
377
+ if (paginate) {
378
+ return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 10000);
379
+ }
380
+ const market = this.market(symbol);
381
+ const request = {
382
+ 'instrument': market['id'],
383
+ 'granularity': this.safeString(this.timeframes, timeframe, timeframe),
384
+ };
385
+ if (since !== undefined) {
386
+ request['start'] = this.iso8601(since);
387
+ }
388
+ else {
389
+ throw new ArgumentsRequired(this.id + ' fetchOHLCV() requires a since argument');
390
+ }
391
+ const unitl = this.safeInteger(params, 'until');
392
+ if (unitl !== undefined) {
393
+ params = this.omit(params, 'until');
394
+ request['end'] = this.iso8601(unitl);
395
+ }
396
+ const response = await this.v1PublicGetInstrumentsInstrumentCandles(this.extend(request, params));
397
+ //
398
+ // {
399
+ // "aggregations": [
400
+ // {
401
+ // "start": "2024-04-23T00:00:00Z",
402
+ // "open": "62884.4",
403
+ // "high": "64710.6",
404
+ // "low": "62884.4",
405
+ // "close": "63508.4",
406
+ // "volume": "3253.9983"
407
+ // }
408
+ // ]
409
+ // }
410
+ //
411
+ const candles = this.safeList(response, 'aggregations', []);
412
+ return this.parseOHLCVs(candles, market, timeframe, since, limit);
413
+ }
414
+ parseOHLCV(ohlcv, market = undefined) {
415
+ //
416
+ // {
417
+ // "start": "2024-04-23T00:00:00Z",
418
+ // "open": "62884.4",
419
+ // "high": "64710.6",
420
+ // "low": "62884.4",
421
+ // "close": "63508.4",
422
+ // "volume": "3253.9983"
423
+ // }
424
+ //
425
+ return [
426
+ this.parse8601(this.safeString2(ohlcv, 'start', 'time')),
427
+ this.safeNumber(ohlcv, 'open'),
428
+ this.safeNumber(ohlcv, 'high'),
429
+ this.safeNumber(ohlcv, 'low'),
430
+ this.safeNumber(ohlcv, 'close'),
431
+ this.safeNumber(ohlcv, 'volume'),
432
+ ];
433
+ }
358
434
  async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
359
435
  /**
360
436
  * @method
@@ -442,6 +518,174 @@ export default class coinbaseinternational extends Exchange {
442
518
  'previousFundingDatetime': undefined,
443
519
  };
444
520
  }
521
+ async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
522
+ /**
523
+ * @method
524
+ * @name coinbaseinternational#fetchFundingHistory
525
+ * @description fetch the history of funding payments paid and received on this account
526
+ * @see https://docs.cdp.coinbase.com/intx/reference/gettransfers
527
+ * @param {string} [symbol] unified market symbol
528
+ * @param {int} [since] the earliest time in ms to fetch funding history for
529
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
530
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
531
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
532
+ */
533
+ await this.loadMarkets();
534
+ const request = {
535
+ 'type': 'FUNDING',
536
+ };
537
+ let market = undefined;
538
+ if (symbol !== undefined) {
539
+ market = this.market(symbol);
540
+ }
541
+ let portfolios = undefined;
542
+ [portfolios, params] = this.handleOptionAndParams(params, 'fetchFundingHistory', 'portfolios');
543
+ if (portfolios !== undefined) {
544
+ request['portfolios'] = portfolios;
545
+ }
546
+ if (since !== undefined) {
547
+ request['time_from'] = this.iso8601(since);
548
+ }
549
+ if (limit !== undefined) {
550
+ request['result_limit'] = limit;
551
+ }
552
+ else {
553
+ request['result_limit'] = 100;
554
+ }
555
+ const response = await this.v1PrivateGetTransfers(this.extend(request, params));
556
+ const fundings = this.safeList(response, 'results', []);
557
+ return this.parseIncomes(fundings, market, since, limit);
558
+ }
559
+ parseIncome(income, market = undefined) {
560
+ //
561
+ // {
562
+ // "amount":"0.0008",
563
+ // "asset":"USDC",
564
+ // "created_at":"2024-02-22T16:00:00Z",
565
+ // "from_portfolio":{
566
+ // "id":"13yuk1fs-1-0",
567
+ // "name":"Eng Test Portfolio - 2",
568
+ // "uuid":"018712f2-5ff9-7de3-9010-xxxxxxxxx"
569
+ // },
570
+ // "instrument_id":"149264164756389888",
571
+ // "instrument_symbol":"ETH-PERP",
572
+ // "position_id":"1xy4v51m-1-2",
573
+ // "status":"PROCESSED",
574
+ // "to_portfolio":{
575
+ // "name":"CB_FUND"
576
+ // },
577
+ // "transfer_type":"FUNDING",
578
+ // "transfer_uuid":"a6b708df-2c44-32c5-bb98-xxxxxxxxxx",
579
+ // "updated_at":"2024-02-22T16:00:00Z"
580
+ // }
581
+ //
582
+ const marketId = this.safeString(income, 'symbol');
583
+ market = this.safeMarket(marketId, market, undefined, 'contract');
584
+ const datetime = this.safeInteger(income, 'created_at');
585
+ const timestamp = this.parse8601(datetime);
586
+ const currencyId = this.safeString(income, 'asset');
587
+ const code = this.safeCurrencyCode(currencyId);
588
+ return {
589
+ 'info': income,
590
+ 'symbol': market['symbol'],
591
+ 'code': code,
592
+ 'timestamp': timestamp,
593
+ 'datetime': this.iso8601(timestamp),
594
+ 'id': this.safeString(income, 'transfer_uuid'),
595
+ 'amount': this.safeNumber(income, 'amount'),
596
+ 'rate': undefined,
597
+ };
598
+ }
599
+ async fetchTransfers(code = undefined, since = undefined, limit = undefined, params = {}) {
600
+ /**
601
+ * @method
602
+ * @name coinbaseinternational#fetchTransfers
603
+ * @description fetch a history of internal transfers made on an account
604
+ * @see https://docs.cdp.coinbase.com/intx/reference/gettransfers
605
+ * @param {string} code unified currency code of the currency transferred
606
+ * @param {int} [since] the earliest time in ms to fetch transfers for
607
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
608
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
609
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
610
+ */
611
+ await this.loadMarkets();
612
+ const request = {
613
+ 'type': 'INTERNAL',
614
+ };
615
+ let currency = undefined;
616
+ if (code !== undefined) {
617
+ currency = this.currency(code);
618
+ }
619
+ let portfolios = undefined;
620
+ [portfolios, params] = this.handleOptionAndParams(params, 'fetchTransfers', 'portfolios');
621
+ if (portfolios !== undefined) {
622
+ request['portfolios'] = portfolios;
623
+ }
624
+ if (since !== undefined) {
625
+ request['time_from'] = this.iso8601(since);
626
+ }
627
+ if (limit !== undefined) {
628
+ request['result_limit'] = limit;
629
+ }
630
+ else {
631
+ request['result_limit'] = 100;
632
+ }
633
+ const response = await this.v1PrivateGetTransfers(this.extend(request, params));
634
+ const transfers = this.safeList(response, 'results', []);
635
+ return this.parseTransfers(transfers, currency, since, limit);
636
+ }
637
+ parseTransfer(transfer, currency = undefined) {
638
+ //
639
+ // {
640
+ // "amount":"0.0008",
641
+ // "asset":"USDC",
642
+ // "created_at":"2024-02-22T16:00:00Z",
643
+ // "from_portfolio":{
644
+ // "id":"13yuk1fs-1-0",
645
+ // "name":"Eng Test Portfolio - 2",
646
+ // "uuid":"018712f2-5ff9-7de3-9010-xxxxxxxxx"
647
+ // },
648
+ // "instrument_id":"149264164756389888",
649
+ // "instrument_symbol":"ETH-PERP",
650
+ // "position_id":"1xy4v51m-1-2",
651
+ // "status":"PROCESSED",
652
+ // "to_portfolio":{
653
+ // "name":"CB_FUND"
654
+ // },
655
+ // "transfer_type":"FUNDING",
656
+ // "transfer_uuid":"a6b708df-2c44-32c5-bb98-xxxxxxxxxx",
657
+ // "updated_at":"2024-02-22T16:00:00Z"
658
+ // }
659
+ //
660
+ const datetime = this.safeInteger(transfer, 'created_at');
661
+ const timestamp = this.parse8601(datetime);
662
+ const currencyId = this.safeString(transfer, 'asset');
663
+ const code = this.safeCurrencyCode(currencyId);
664
+ const fromPorfolio = this.safeDict(transfer, 'from_portfolio', {});
665
+ const fromId = this.safeString(fromPorfolio, 'id');
666
+ const toPorfolio = this.safeDict(transfer, 'to_portfolio', {});
667
+ const toId = this.safeString(toPorfolio, 'id');
668
+ return {
669
+ 'info': transfer,
670
+ 'id': this.safeString(transfer, 'transfer_uuid'),
671
+ 'timestamp': timestamp,
672
+ 'datetime': this.iso8601(timestamp),
673
+ 'currency': code,
674
+ 'amount': this.safeNumber(transfer, 'amount'),
675
+ 'fromAccount': fromId,
676
+ 'toAccount': toId,
677
+ 'status': this.parseTransferStatus(this.safeString(transfer, 'status')),
678
+ };
679
+ }
680
+ parseTransferStatus(status) {
681
+ const statuses = {
682
+ 'FAILED': 'failed',
683
+ 'PROCESSED': 'ok',
684
+ 'NEW': 'pending',
685
+ 'STARTED': 'pending',
686
+ };
687
+ return this.safeString(statuses, status, status);
688
+ }
445
689
  async createDepositAddress(code, params = {}) {
446
690
  /**
447
691
  * @method
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinex.js';
2
- import type { Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, OHLCV, Order, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, OrderRequest, TransferEntry, Leverage, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Position, IsolatedBorrowRate, Dict, TransferEntries, LeverageTiers, LeverageTier, int } from './base/types.js';
2
+ import type { Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, OHLCV, Order, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, OrderRequest, TransferEntry, Leverage, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Position, IsolatedBorrowRate, Dict, LeverageTiers, LeverageTier, int } from './base/types.js';
3
3
  /**
4
4
  * @class coinex
5
5
  * @augments Exchange
@@ -123,7 +123,7 @@ export default class coinex extends Exchange {
123
123
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
124
124
  parseTransferStatus(status: any): string;
125
125
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
126
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
126
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
127
127
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
128
128
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
129
129
  parseIsolatedBorrowRate(info: Dict, market?: Market): IsolatedBorrowRate;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinlist.js';
2
- import type { Account, Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntries, TransferEntry, int } from './base/types.js';
2
+ import type { Account, Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry, int } from './base/types.js';
3
3
  /**
4
4
  * @class coinlist
5
5
  * @augments Exchange
@@ -49,7 +49,7 @@ export default class coinlist extends Exchange {
49
49
  parseOrderStatus(status: Str): string;
50
50
  parseOrderType(status: any): string;
51
51
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
52
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
52
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
53
53
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
54
54
  parseTransferStatus(status: Str): Str;
55
55
  fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -7,7 +7,7 @@
7
7
  // ---------------------------------------------------------------------------
8
8
  import Exchange from './abstract/cryptocom.js';
9
9
  import { Precise } from './base/Precise.js';
10
- import { AuthenticationError, ArgumentsRequired, ExchangeError, InsufficientFunds, DDoSProtection, InvalidNonce, PermissionDenied, BadRequest, BadSymbol, NotSupported, AccountNotEnabled, OnMaintenance, InvalidOrder } from './base/errors.js';
10
+ import { AuthenticationError, ArgumentsRequired, ExchangeError, InsufficientFunds, DDoSProtection, InvalidNonce, PermissionDenied, BadRequest, BadSymbol, NotSupported, AccountNotEnabled, OnMaintenance, InvalidOrder, RequestTimeout, OrderNotFound, RateLimitExceeded } from './base/errors.js';
11
11
  import { TICK_SIZE } from './base/functions/number.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
13
  /**
@@ -389,7 +389,15 @@ export default class cryptocom extends Exchange {
389
389
  '40006': BadRequest,
390
390
  '40007': BadRequest,
391
391
  '40101': AuthenticationError,
392
- '50001': BadRequest,
392
+ '40102': InvalidNonce,
393
+ '40103': AuthenticationError,
394
+ '40104': AuthenticationError,
395
+ '40107': BadRequest,
396
+ '40401': OrderNotFound,
397
+ '40801': RequestTimeout,
398
+ '42901': RateLimitExceeded,
399
+ '43005': InvalidOrder,
400
+ '50001': ExchangeError,
393
401
  '9010001': OnMaintenance, // {"code":9010001,"message":"SYSTEM_MAINTENANCE","details":"Crypto.com Exchange is currently under maintenance. Please refer to https://status.crypto.com for more details."}
394
402
  },
395
403
  'broad': {},
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/deribit.js';
2
- import type { Balances, Currency, FundingRateHistory, Greeks, Int, Liquidation, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry, MarketInterface, Num, Account, Option, OptionChain, Currencies, TradingFees, Dict, TransferEntries, int } from './base/types.js';
2
+ import type { Balances, Currency, FundingRateHistory, Greeks, Int, Liquidation, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry, MarketInterface, Num, Account, Option, OptionChain, Currencies, TradingFees, Dict, int } from './base/types.js';
3
3
  /**
4
4
  * @class deribit
5
5
  * @augments Exchange
@@ -71,7 +71,7 @@ export default class deribit extends Exchange {
71
71
  fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
72
72
  fetchVolatilityHistory(code: string, params?: {}): Promise<any[]>;
73
73
  parseVolatilityHistory(volatility: any): any[];
74
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
74
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
75
75
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
76
76
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
77
77
  parseTransferStatus(status: Str): Str;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/digifinex.js';
2
- import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, TransferEntry, Num, MarginModification, TradingFeeInterface, Currencies, CrossBorrowRate, CrossBorrowRates, Dict, TransferEntries, LeverageTier, LeverageTiers, int } from './base/types.js';
2
+ import type { FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, OrderRequest, Trade, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Strings, Market, Currency, TransferEntry, Num, MarginModification, TradingFeeInterface, Currencies, CrossBorrowRate, CrossBorrowRates, Dict, LeverageTier, LeverageTiers, int } from './base/types.js';
3
3
  /**
4
4
  * @class digifinex
5
5
  * @augments Exchange
@@ -127,7 +127,7 @@ export default class digifinex extends Exchange {
127
127
  fetchPosition(symbol: string, params?: {}): Promise<import("./base/types.js").Position>;
128
128
  parsePosition(position: Dict, market?: Market): import("./base/types.js").Position;
129
129
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
130
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
130
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
131
131
  fetchLeverageTiers(symbols?: Strings, params?: {}): Promise<LeverageTiers>;
132
132
  fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<LeverageTier[]>;
133
133
  parseMarketLeverageTiers(info: any, market?: Market): LeverageTier[];
package/js/src/hitbtc.js CHANGED
@@ -2526,7 +2526,7 @@ export default class hitbtc extends Exchange {
2526
2526
  async fetchMarginModes(symbols = undefined, params = {}) {
2527
2527
  /**
2528
2528
  * @method
2529
- * @name hitbtc#fetchMarginMode
2529
+ * @name hitbtc#fetchMarginModes
2530
2530
  * @description fetches margin mode of the user
2531
2531
  * @see https://api.hitbtc.com/#get-margin-position-parameters
2532
2532
  * @see https://api.hitbtc.com/#get-futures-position-parameters
@@ -832,9 +832,6 @@ export default class hyperliquid extends Exchange {
832
832
  if (since === undefined) {
833
833
  since = 0;
834
834
  }
835
- if (limit === undefined) {
836
- limit = 500;
837
- }
838
835
  params = this.omit(params, ['until']);
839
836
  const request = {
840
837
  'type': 'candleSnapshot',
package/js/src/kucoin.js CHANGED
@@ -1524,21 +1524,28 @@ export default class kucoin extends Exchange {
1524
1524
  },
1525
1525
  'networks': {},
1526
1526
  };
1527
- const isWithdrawEnabled = this.safeBool(fee, 'isWithdrawEnabled');
1527
+ const isWithdrawEnabled = this.safeBool(fee, 'isWithdrawEnabled', true);
1528
+ let minFee = undefined;
1528
1529
  if (isWithdrawEnabled) {
1529
- result['withdraw']['fee'] = this.safeNumber2(fee, 'withdrawalMinFee', 'withdrawMinFee');
1530
1530
  result['withdraw']['percentage'] = false;
1531
- const networkId = this.safeString(fee, 'chain');
1532
- if (networkId) {
1531
+ const chains = this.safeList(fee, 'chains', []);
1532
+ for (let i = 0; i < chains.length; i++) {
1533
+ const chain = chains[i];
1534
+ const networkId = this.safeString(chain, 'chainId');
1533
1535
  const networkCode = this.networkIdToCode(networkId, this.safeString(currency, 'code'));
1536
+ const withdrawFee = this.safeString(chain, 'withdrawalMinFee');
1537
+ if (minFee === undefined || (Precise.stringLt(withdrawFee, minFee))) {
1538
+ minFee = withdrawFee;
1539
+ }
1534
1540
  result['networks'][networkCode] = {
1535
- 'withdraw': result['withdraw'],
1541
+ 'withdraw': this.parseNumber(withdrawFee),
1536
1542
  'deposit': {
1537
1543
  'fee': undefined,
1538
1544
  'percentage': undefined,
1539
1545
  },
1540
1546
  };
1541
1547
  }
1548
+ result['withdraw']['fee'] = this.parseNumber(minFee);
1542
1549
  }
1543
1550
  return result;
1544
1551
  }
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/latoken.js';
2
- import type { TransferEntry, Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, TradingFeeInterface, Currencies, Dict, TransferEntries, int } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, TradingFeeInterface, Currencies, Dict, int } from './base/types.js';
3
3
  /**
4
4
  * @class latoken
5
5
  * @augments Exchange
@@ -50,7 +50,7 @@ export default class latoken extends Exchange {
50
50
  parseTransaction(transaction: Dict, currency?: Currency): Transaction;
51
51
  parseTransactionStatus(status: Str): string;
52
52
  parseTransactionType(type: any): string;
53
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
53
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
54
54
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
55
55
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
56
56
  parseTransferStatus(status: Str): Str;
package/js/src/mexc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/mexc.js';
2
- import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num, Account, MarginModification, Currencies, TradingFees, Dict, TransferEntries, LeverageTier, LeverageTiers, int } from './base/types.js';
2
+ import type { TransferEntry, IndexType, Int, OrderSide, Balances, OrderType, OHLCV, FundingRateHistory, Position, OrderBook, OrderRequest, FundingHistory, Order, Str, Trade, Transaction, Ticker, Tickers, Strings, Market, Currency, Leverage, Num, Account, MarginModification, Currencies, TradingFees, Dict, LeverageTier, LeverageTiers, int } from './base/types.js';
3
3
  /**
4
4
  * @class mexc
5
5
  * @augments Exchange
@@ -128,7 +128,7 @@ export default class mexc extends Exchange {
128
128
  fetchPositions(symbols?: Strings, params?: {}): Promise<Position[]>;
129
129
  parsePosition(position: Dict, market?: Market): Position;
130
130
  fetchTransfer(id: string, code?: Str, params?: {}): Promise<TransferEntry>;
131
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
131
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
132
132
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
133
133
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
134
134
  parseAccountId(status: any): string;
package/js/src/okx.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/okx.js';
2
- import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest, Dict, Position, CrossBorrowRate, CrossBorrowRates, TransferEntries, LeverageTier, int } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Str, Transaction, Ticker, OrderBook, Balances, Tickers, Market, Greeks, Strings, MarketInterface, Currency, Leverage, Num, Account, OptionChain, Option, MarginModification, TradingFeeInterface, Currencies, Conversion, CancellationRequest, Dict, Position, CrossBorrowRate, CrossBorrowRates, LeverageTier, int } from './base/types.js';
3
3
  /**
4
4
  * @class okx
5
5
  * @augments Exchange
@@ -98,7 +98,7 @@ export default class okx extends Exchange {
98
98
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
99
99
  parseTransferStatus(status: Str): Str;
100
100
  fetchTransfer(id: string, code?: Str, params?: {}): Promise<TransferEntry>;
101
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
101
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
102
102
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
103
103
  url: string;
104
104
  method: string;
package/js/src/oxfun.d.ts CHANGED
@@ -70,7 +70,7 @@ export default class oxfun extends Exchange {
70
70
  info: any;
71
71
  };
72
72
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
73
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").TransferEntries>;
73
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
74
74
  parseTransfer(transfer: any, currency?: Currency): {
75
75
  id: string;
76
76
  timestamp: number;
package/js/src/oxfun.js CHANGED
@@ -2047,9 +2047,9 @@ export default class oxfun extends Exchange {
2047
2047
  async withdraw(code, amount, address, tag = undefined, params = {}) {
2048
2048
  /**
2049
2049
  * @method
2050
- * @name bitflex#withdraw
2050
+ * @name oxfun#withdraw
2051
2051
  * @description make a withdrawal
2052
- * @see https://docs.bitflex.com/spot#withdraw
2052
+ * @see https://docs.ox.fun/?json#post-v3-withdrawal
2053
2053
  * @param {string} code unified currency code
2054
2054
  * @param {float} amount the amount to withdraw
2055
2055
  * @param {string} address the address to withdraw to
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/phemex.js';
2
- import type { TransferEntry, Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, MarginModification, Currencies, Dict, TransferEntries, LeverageTier, LeverageTiers, int } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, FundingHistory, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, MarginModification, Currencies, Dict, LeverageTier, LeverageTiers, int } from './base/types.js';
3
3
  /**
4
4
  * @class phemex
5
5
  * @augments Exchange
@@ -115,7 +115,7 @@ export default class phemex extends Exchange {
115
115
  };
116
116
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
117
117
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
118
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
118
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
119
119
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
120
120
  parseTransferStatus(status: Str): Str;
121
121
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;