ccxt 4.3.67 → 4.3.69

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 (63) hide show
  1. package/README.md +5 -5
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/base/Exchange.js +364 -356
  5. package/dist/cjs/src/base/functions/type.js +2 -2
  6. package/dist/cjs/src/bingx.js +463 -217
  7. package/dist/cjs/src/bitget.js +4 -2
  8. package/dist/cjs/src/btcbox.js +2 -1
  9. package/dist/cjs/src/coinbaseinternational.js +79 -1
  10. package/dist/cjs/src/hyperliquid.js +0 -3
  11. package/dist/cjs/src/kucoin.js +12 -5
  12. package/dist/cjs/src/oxfun.js +2 -2
  13. package/dist/cjs/src/poloniex.js +33 -33
  14. package/dist/cjs/src/poloniexfutures.js +26 -26
  15. package/dist/cjs/src/pro/krakenfutures.js +7 -6
  16. package/dist/cjs/src/pro/poloniex.js +13 -13
  17. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  18. package/js/ccxt.d.ts +3 -3
  19. package/js/ccxt.js +1 -1
  20. package/js/src/base/Exchange.d.ts +107 -82
  21. package/js/src/base/Exchange.js +364 -356
  22. package/js/src/base/functions/type.js +2 -2
  23. package/js/src/base/types.d.ts +0 -2
  24. package/js/src/binance.d.ts +2 -2
  25. package/js/src/bingx.d.ts +4 -2
  26. package/js/src/bingx.js +463 -217
  27. package/js/src/bitget.d.ts +2 -2
  28. package/js/src/bitget.js +4 -2
  29. package/js/src/bitmart.d.ts +2 -2
  30. package/js/src/bitrue.d.ts +2 -2
  31. package/js/src/btcbox.js +2 -1
  32. package/js/src/bybit.d.ts +2 -2
  33. package/js/src/coinbaseinternational.d.ts +11 -0
  34. package/js/src/coinbaseinternational.js +79 -1
  35. package/js/src/coinex.d.ts +2 -2
  36. package/js/src/coinlist.d.ts +2 -2
  37. package/js/src/deribit.d.ts +2 -2
  38. package/js/src/digifinex.d.ts +2 -2
  39. package/js/src/hyperliquid.js +0 -3
  40. package/js/src/kucoin.js +12 -5
  41. package/js/src/latoken.d.ts +2 -2
  42. package/js/src/mexc.d.ts +2 -2
  43. package/js/src/okx.d.ts +2 -2
  44. package/js/src/oxfun.d.ts +1 -1
  45. package/js/src/oxfun.js +2 -2
  46. package/js/src/phemex.d.ts +2 -2
  47. package/js/src/poloniex.js +33 -33
  48. package/js/src/poloniexfutures.js +26 -26
  49. package/js/src/pro/krakenfutures.js +7 -6
  50. package/js/src/pro/poloniex.js +13 -13
  51. package/js/src/pro/poloniexfutures.js +5 -5
  52. package/js/src/woo.d.ts +2 -2
  53. package/package.json +1 -1
  54. package/js/src/coinbaseprime.d.ts +0 -4
  55. package/js/src/coinbaseprime.js +0 -32
  56. package/js/src/pro/coinbaseprime.d.ts +0 -4
  57. package/js/src/pro/coinbaseprime.js +0 -33
  58. package/js/src/pro/huobipro.d.ts +0 -4
  59. package/js/src/pro/huobipro.js +0 -17
  60. package/js/src/pro/mexc3.d.ts +0 -4
  61. package/js/src/pro/mexc3.js +0 -17
  62. package/js/src/pro/okex.d.ts +0 -4
  63. package/js/src/pro/okex.js +0 -17
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitget.js';
2
- import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, TransferEntries, LeverageTier, int } from './base/types.js';
2
+ import type { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderRequest, FundingHistory, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position, Liquidation, TransferEntry, Leverage, MarginMode, Num, MarginModification, TradingFeeInterface, Currencies, TradingFees, Conversion, CrossBorrowRate, IsolatedBorrowRate, Dict, LeverageTier, int } from './base/types.js';
3
3
  /**
4
4
  * @class bitget
5
5
  * @augments Exchange
@@ -154,7 +154,7 @@ export default class bitget extends Exchange {
154
154
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
155
155
  fetchOpenInterest(symbol: string, params?: {}): Promise<import("./base/types.js").OpenInterest>;
156
156
  parseOpenInterest(interest: any, market?: Market): import("./base/types.js").OpenInterest;
157
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
157
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
158
158
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
159
159
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
160
160
  parseTransferStatus(status: Str): Str;
package/js/src/bitget.js CHANGED
@@ -5208,8 +5208,10 @@ export default class bitget extends Exchange {
5208
5208
  response = JSON.parse(response);
5209
5209
  }
5210
5210
  const data = this.safeDict(response, 'data');
5211
- if ((data !== undefined) && !Array.isArray(data)) {
5212
- return this.parseOrder(data, market);
5211
+ if ((data !== undefined)) {
5212
+ if (!Array.isArray(data)) {
5213
+ return this.parseOrder(data, market);
5214
+ }
5213
5215
  }
5214
5216
  const dataList = this.safeList(response, 'data', []);
5215
5217
  const first = this.safeDict(dataList, 0, {});
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitmart.js';
2
- import type { Int, OrderSide, Balances, OrderType, OHLCV, Order, Str, Trade, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, TransferEntry, Num, TradingFeeInterface, Currencies, IsolatedBorrowRates, IsolatedBorrowRate, Dict, TransferEntries, OrderRequest, int } from './base/types.js';
2
+ import type { Int, OrderSide, Balances, OrderType, OHLCV, Order, Str, Trade, Transaction, Ticker, OrderBook, Tickers, Strings, Currency, Market, TransferEntry, Num, TradingFeeInterface, Currencies, IsolatedBorrowRates, IsolatedBorrowRate, Dict, OrderRequest, int } from './base/types.js';
3
3
  /**
4
4
  * @class bitmart
5
5
  * @augments Exchange
@@ -109,7 +109,7 @@ export default class bitmart extends Exchange {
109
109
  parseTransferToAccount(type: any): string;
110
110
  parseTransferFromAccount(type: any): string;
111
111
  parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
112
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
112
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
113
113
  fetchBorrowInterest(code?: Str, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
114
114
  parseBorrowInterest(info: Dict, market?: Market): {
115
115
  symbol: string;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitrue.js';
2
- import type { Balances, Currencies, Currency, Dict, Int, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntries, TransferEntry, int } from './base/types.js';
2
+ import type { Balances, Currencies, Currency, Dict, Int, MarginModification, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry, int } from './base/types.js';
3
3
  /**
4
4
  * @class bitrue
5
5
  * @augments Exchange
@@ -59,7 +59,7 @@ export default class bitrue extends Exchange {
59
59
  toAccount: any;
60
60
  status: string;
61
61
  };
62
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
62
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
63
63
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
64
64
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
65
65
  parseMarginModification(data: any, market?: any): MarginModification;
package/js/src/btcbox.js CHANGED
@@ -10,6 +10,7 @@ import { ExchangeError, InsufficientFunds, InvalidOrder, AuthenticationError, Pe
10
10
  import { Precise } from './base/Precise.js';
11
11
  import { TICK_SIZE } from './base/functions/number.js';
12
12
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
+ import { md5 } from './static_dependencies/noble-hashes/md5.js';
13
14
  // ---------------------------------------------------------------------------
14
15
  /**
15
16
  * @class btcbox
@@ -679,7 +680,7 @@ export default class btcbox extends Exchange {
679
680
  'nonce': nonce,
680
681
  }, params);
681
682
  const request = this.urlencode(query);
682
- const secret = this.hash(this.encode(this.secret), sha256);
683
+ const secret = this.hash(this.encode(this.secret), md5);
683
684
  query['signature'] = this.hmac(this.encode(request), this.encode(secret), sha256);
684
685
  body = this.urlencode(query);
685
686
  headers = {
package/js/src/bybit.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bybit.js';
2
- import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees, CancellationRequest, Position, CrossBorrowRate, Dict, TransferEntries, LeverageTier, LeverageTiers, int } from './base/types.js';
2
+ import type { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Str, Transaction, Ticker, OrderBook, Tickers, Greeks, Strings, Market, Currency, MarketInterface, TransferEntry, Liquidation, Leverage, Num, FundingHistory, Option, OptionChain, TradingFeeInterface, Currencies, TradingFees, CancellationRequest, Position, CrossBorrowRate, Dict, LeverageTier, LeverageTiers, int } from './base/types.js';
3
3
  /**
4
4
  * @class bybit
5
5
  * @augments Exchange
@@ -161,7 +161,7 @@ export default class bybit extends Exchange {
161
161
  info: Dict;
162
162
  };
163
163
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
164
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
164
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
165
165
  borrowCrossMargin(code: string, amount: number, params?: {}): Promise<any>;
166
166
  repayCrossMargin(code: string, amount: any, params?: {}): Promise<any>;
167
167
  parseMarginLoan(info: any, currency?: Currency): {
@@ -36,6 +36,17 @@ export default class coinbaseinternational extends Exchange {
36
36
  previousFundingTimestamp: any;
37
37
  previousFundingDatetime: any;
38
38
  };
39
+ fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
40
+ parseIncome(income: any, market?: Market): {
41
+ info: any;
42
+ symbol: string;
43
+ code: string;
44
+ timestamp: number;
45
+ datetime: string;
46
+ id: string;
47
+ amount: number;
48
+ rate: any;
49
+ };
39
50
  createDepositAddress(code: string, params?: {}): Promise<{
40
51
  currency: string;
41
52
  tag: string;
@@ -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,
@@ -442,6 +442,84 @@ export default class coinbaseinternational extends Exchange {
442
442
  'previousFundingDatetime': undefined,
443
443
  };
444
444
  }
445
+ async fetchFundingHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
446
+ /**
447
+ * @method
448
+ * @name coinbaseinternational#fetchFundingHistory
449
+ * @description fetch the history of funding payments paid and received on this account
450
+ * @see https://docs.cdp.coinbase.com/intx/reference/gettransfers
451
+ * @param {string} [symbol] unified market symbol
452
+ * @param {int} [since] the earliest time in ms to fetch funding history for
453
+ * @param {int} [limit] the maximum number of funding history structures to retrieve
454
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
455
+ * @returns {object} a [funding history structure]{@link https://docs.ccxt.com/#/?id=funding-history-structure}
456
+ */
457
+ await this.loadMarkets();
458
+ const request = {
459
+ 'type': 'FUNDING',
460
+ };
461
+ let market = undefined;
462
+ if (symbol !== undefined) {
463
+ market = this.market(symbol);
464
+ }
465
+ let portfolios = undefined;
466
+ [portfolios, params] = this.handleOptionAndParams(params, 'fetchFundingHistory', 'portfolios');
467
+ if (portfolios !== undefined) {
468
+ request['portfolios'] = portfolios;
469
+ }
470
+ if (since !== undefined) {
471
+ request['time_from'] = this.iso8601(since);
472
+ }
473
+ if (limit !== undefined) {
474
+ request['result_limit'] = limit;
475
+ }
476
+ else {
477
+ request['result_limit'] = 100;
478
+ }
479
+ const response = await this.v1PrivateGetTransfers(this.extend(request, params));
480
+ const fundings = this.safeList(response, 'results', []);
481
+ return this.parseIncomes(fundings, market, since, limit);
482
+ }
483
+ parseIncome(income, market = undefined) {
484
+ //
485
+ // {
486
+ // "amount":"0.0008",
487
+ // "asset":"USDC",
488
+ // "created_at":"2024-02-22T16:00:00Z",
489
+ // "from_portfolio":{
490
+ // "id":"13yuk1fs-1-0",
491
+ // "name":"Eng Test Portfolio - 2",
492
+ // "uuid":"018712f2-5ff9-7de3-9010-xxxxxxxxx"
493
+ // },
494
+ // "instrument_id":"149264164756389888",
495
+ // "instrument_symbol":"ETH-PERP",
496
+ // "position_id":"1xy4v51m-1-2",
497
+ // "status":"PROCESSED",
498
+ // "to_portfolio":{
499
+ // "name":"CB_FUND"
500
+ // },
501
+ // "transfer_type":"FUNDING",
502
+ // "transfer_uuid":"a6b708df-2c44-32c5-bb98-xxxxxxxxxx",
503
+ // "updated_at":"2024-02-22T16:00:00Z"
504
+ // }
505
+ //
506
+ const marketId = this.safeString(income, 'symbol');
507
+ market = this.safeMarket(marketId, market, undefined, 'contract');
508
+ const datetime = this.safeInteger(income, 'created_at');
509
+ const timestamp = this.parse8601(datetime);
510
+ const currencyId = this.safeString(income, 'asset');
511
+ const code = this.safeCurrencyCode(currencyId);
512
+ return {
513
+ 'info': income,
514
+ 'symbol': market['symbol'],
515
+ 'code': code,
516
+ 'timestamp': timestamp,
517
+ 'datetime': this.iso8601(timestamp),
518
+ 'id': this.safeString(income, 'transfer_uuid'),
519
+ 'amount': this.safeNumber(income, 'amount'),
520
+ 'rate': undefined,
521
+ };
522
+ }
445
523
  async createDepositAddress(code, params = {}) {
446
524
  /**
447
525
  * @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[]>;
@@ -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[];
@@ -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[]>;