ccxt 4.3.7 → 4.3.8

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.
@@ -1,27 +1,28 @@
1
+ import { Dictionary, IndexType } from '../types.js';
1
2
  declare const keys: {
2
3
  (o: object): string[];
3
4
  (o: {}): string[];
4
5
  };
5
- declare const values: (x: any) => any[];
6
- declare const index: (x: any) => Set<any>;
6
+ declare const values: (x: any[] | Dictionary<any>) => any[];
7
+ declare const index: (x: any[]) => Set<any>;
7
8
  declare const extend: (...args: any[]) => any;
8
9
  declare const clone: (x: any) => any;
9
- declare const ordered: (x: any) => any;
10
- declare const unique: (x: any) => any[];
11
- declare const arrayConcat: (a: any, b: any) => any;
12
- declare const inArray: (needle: any, haystack: any) => any;
13
- declare const toArray: (object: any) => unknown[];
14
- declare const isEmpty: (object: any) => boolean;
15
- declare const keysort: (x: any, out?: {}) => {};
16
- declare const groupBy: (x: any, k: any, out?: {}) => {};
17
- declare const indexBy: (x: any, k: any, out?: {}) => {};
18
- declare const filterBy: (x: any, k: any, value?: any, out?: any[]) => any[];
19
- declare const sortBy: (array: any, key: any, descending?: boolean, defaultValue?: any, direction?: number) => any;
20
- declare const sortBy2: (array: any, key1: any, key2: any, descending?: boolean, direction?: number) => any;
21
- declare const flatten: (x: any, out?: any[]) => any[];
22
- declare const pluck: (x: any, k: any) => any[];
23
- declare const omit: (x: any, ...args: any[]) => any;
10
+ declare const ordered: (x: any[] | Dictionary<any>) => any[] | Dictionary<any>;
11
+ declare const unique: (x: any[]) => any[];
12
+ declare const arrayConcat: (a: any[], b: any[]) => any[];
13
+ declare const inArray: (needle: any, haystack: any[]) => boolean;
14
+ declare const toArray: (object: Dictionary<any> | any[]) => any[];
15
+ declare const isEmpty: (object: any[] | Dictionary<any>) => boolean;
16
+ declare const keysort: (x: Dictionary<any>, out?: Dictionary<any>) => Dictionary<any>;
17
+ declare const groupBy: (x: Dictionary<any>, k: string, out?: Dictionary<any>) => Dictionary<any>;
18
+ declare const indexBy: (x: Dictionary<any>, k: IndexType, out?: Dictionary<any>) => Dictionary<any>;
19
+ declare const filterBy: (x: Dictionary<any>, k: string, value?: any, out?: Dictionary<any>[]) => Dictionary<any>[];
20
+ declare const sortBy: (array: any[], key: IndexType, descending?: boolean, defaultValue?: any, direction?: number) => any[];
21
+ declare const sortBy2: (array: any[], key1: IndexType, key2: IndexType, descending?: boolean, direction?: number) => any[];
22
+ declare const flatten: (x: any[], out?: any[]) => any[];
23
+ declare const pluck: (x: Dictionary<any>, k: any) => any[];
24
+ declare const omit: (x: Dictionary<any>, ...args: any[]) => any;
24
25
  declare const sum: (...xs: any[]) => any;
25
- declare const deepExtend: (...xs: any[]) => any;
26
- declare const merge: (target: any, ...args: any[]) => any;
26
+ declare const deepExtend: (...xs: any) => any;
27
+ declare const merge: (target: Dictionary<any>, ...args: any) => Dictionary<any>;
27
28
  export { keys, values, extend, clone, index, ordered, unique, arrayConcat, inArray, toArray, isEmpty, keysort, indexBy, groupBy, filterBy, sortBy, sortBy2, flatten, pluck, omit, sum, deepExtend, merge, };
package/js/src/binance.js CHANGED
@@ -12922,7 +12922,7 @@ export default class binance extends Exchange {
12922
12922
  //
12923
12923
  }
12924
12924
  const rows = this.safeList(response, responseQuery, []);
12925
- return this.parseConversions(rows, fromCurrencyKey, toCurrencyKey, since, limit);
12925
+ return this.parseConversions(rows, code, fromCurrencyKey, toCurrencyKey, since, limit);
12926
12926
  }
12927
12927
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
12928
12928
  //
package/js/src/bingx.d.ts CHANGED
@@ -97,7 +97,7 @@ export default class bingx extends Exchange {
97
97
  toAccount: string;
98
98
  status: string;
99
99
  };
100
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
100
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
101
101
  fetchDepositAddress(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
102
102
  parseDepositAddress(depositAddress: any, currency?: Currency): {
103
103
  currency: string;
@@ -133,7 +133,7 @@ export default class bingx extends Exchange {
133
133
  };
134
134
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
135
135
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
136
- parseParams(params: any): {};
136
+ parseParams(params: any): import("./base/types.js").Dictionary<any>;
137
137
  fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Liquidation[]>;
138
138
  parseLiquidation(liquidation: any, market?: Market): import("./base/types.js").Liquidation;
139
139
  closePosition(symbol: string, side?: OrderSide, params?: {}): Promise<Order>;
package/js/src/bingx.js CHANGED
@@ -2466,7 +2466,7 @@ export default class bingx extends Exchange {
2466
2466
  return this.safeOrder({
2467
2467
  'info': info,
2468
2468
  'id': this.safeString2(order, 'orderId', 'i'),
2469
- 'clientOrderId': this.safeStringN(order, ['clientOrderID', 'origClientOrderId', 'c']),
2469
+ 'clientOrderId': this.safeStringN(order, ['clientOrderID', 'clientOrderId', 'origClientOrderId', 'c']),
2470
2470
  'symbol': this.safeSymbol(marketId, market, '-', marketType),
2471
2471
  'timestamp': timestamp,
2472
2472
  'datetime': this.iso8601(timestamp),
package/js/src/bitget.js CHANGED
@@ -8675,7 +8675,7 @@ export default class bitget extends Exchange {
8675
8675
  //
8676
8676
  const data = this.safeDict(response, 'data', {});
8677
8677
  const dataList = this.safeList(data, 'dataList', []);
8678
- return this.parseConversions(dataList, 'fromCoin', 'toCoin', since, limit);
8678
+ return this.parseConversions(dataList, code, 'fromCoin', 'toCoin', since, limit);
8679
8679
  }
8680
8680
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
8681
8681
  //
package/js/src/bybit.d.ts CHANGED
@@ -91,7 +91,7 @@ export default class bybit extends Exchange {
91
91
  network: string;
92
92
  info: any;
93
93
  };
94
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
94
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
95
95
  fetchDepositAddress(code: string, params?: {}): Promise<{
96
96
  currency: string;
97
97
  address: string;
@@ -94,7 +94,7 @@ export default class coinbase extends Exchange {
94
94
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
95
95
  fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
96
96
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
97
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
97
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
98
98
  parseDepositAddress(depositAddress: any, currency?: Currency): {
99
99
  info: any;
100
100
  currency: string;
@@ -42,7 +42,7 @@ export default class coinbaseinternational extends Exchange {
42
42
  address: string;
43
43
  info: any;
44
44
  }>;
45
- findDefaultNetwork(networks: any): unknown;
45
+ findDefaultNetwork(networks: any): any;
46
46
  loadCurrencyNetworks(code: any, params?: {}): Promise<void>;
47
47
  parseNetworks(networks: any, params?: {}): {};
48
48
  parseNetwork(network: any, params?: {}): {
package/js/src/coinex.js CHANGED
@@ -1532,190 +1532,144 @@ export default class coinex extends Exchange {
1532
1532
  }
1533
1533
  async fetchMarginBalance(params = {}) {
1534
1534
  await this.loadMarkets();
1535
- const symbol = this.safeString(params, 'symbol');
1536
- let marketId = this.safeString(params, 'market');
1537
- let market = undefined;
1538
- if (symbol !== undefined) {
1539
- market = this.market(symbol);
1540
- marketId = market['id'];
1541
- }
1542
- else if (marketId === undefined) {
1543
- throw new ArgumentsRequired(this.id + ' fetchMarginBalance() fetching a margin account requires a market parameter or a symbol parameter');
1544
- }
1545
- params = this.omit(params, ['symbol', 'market']);
1546
- const request = {
1547
- 'market': marketId,
1548
- };
1549
- const response = await this.v1PrivateGetMarginAccount(this.extend(request, params));
1535
+ const response = await this.v2PrivateGetAssetsMarginBalance(params);
1550
1536
  //
1551
- // {
1552
- // "code": 0,
1553
- // "data": {
1554
- // "account_id": 126,
1555
- // "leverage": 3,
1556
- // "market_type": "AAVEUSDT",
1557
- // "sell_asset_type": "AAVE",
1558
- // "buy_asset_type": "USDT",
1559
- // "balance": {
1560
- // "sell_type": "0.3", // borrowed
1561
- // "buy_type": "30"
1562
- // },
1563
- // "frozen": {
1564
- // "sell_type": "0",
1565
- // "buy_type": "0"
1566
- // },
1567
- // "loan": {
1568
- // "sell_type": "0.3", // loan
1569
- // "buy_type": "0"
1570
- // },
1571
- // "interest": {
1572
- // "sell_type": "0.0000125",
1573
- // "buy_type": "0"
1574
- // },
1575
- // "can_transfer": {
1576
- // "sell_type": "0.02500646",
1577
- // "buy_type": "4.28635738"
1578
- // },
1579
- // "warn_rate": "",
1580
- // "liquidation_price": ""
1581
- // },
1582
- // "message": "Success"
1583
- // }
1537
+ // {
1538
+ // "data": [
1539
+ // {
1540
+ // "margin_account": "BTCUSDT",
1541
+ // "base_ccy": "BTC",
1542
+ // "quote_ccy": "USDT",
1543
+ // "available": {
1544
+ // "base_ccy": "0.00000026",
1545
+ // "quote_ccy": "0"
1546
+ // },
1547
+ // "frozen": {
1548
+ // "base_ccy": "0",
1549
+ // "quote_ccy": "0"
1550
+ // },
1551
+ // "repaid": {
1552
+ // "base_ccy": "0",
1553
+ // "quote_ccy": "0"
1554
+ // },
1555
+ // "interest": {
1556
+ // "base_ccy": "0",
1557
+ // "quote_ccy": "0"
1558
+ // },
1559
+ // "rik_rate": "",
1560
+ // "liq_price": ""
1561
+ // },
1562
+ // ],
1563
+ // "code": 0,
1564
+ // "message": "OK"
1565
+ // }
1584
1566
  //
1585
1567
  const result = { 'info': response };
1586
- const data = this.safeValue(response, 'data', {});
1587
- const free = this.safeValue(data, 'can_transfer', {});
1588
- const total = this.safeValue(data, 'balance', {});
1589
- const loan = this.safeValue(data, 'loan', {});
1590
- const interest = this.safeValue(data, 'interest', {});
1591
- //
1592
- const sellAccount = this.account();
1593
- const sellCurrencyId = this.safeString(data, 'sell_asset_type');
1594
- const sellCurrencyCode = this.safeCurrencyCode(sellCurrencyId);
1595
- sellAccount['free'] = this.safeString(free, 'sell_type');
1596
- sellAccount['total'] = this.safeString(total, 'sell_type');
1597
- const sellDebt = this.safeString(loan, 'sell_type');
1598
- const sellInterest = this.safeString(interest, 'sell_type');
1599
- sellAccount['debt'] = Precise.stringAdd(sellDebt, sellInterest);
1600
- result[sellCurrencyCode] = sellAccount;
1601
- //
1602
- const buyAccount = this.account();
1603
- const buyCurrencyId = this.safeString(data, 'buy_asset_type');
1604
- const buyCurrencyCode = this.safeCurrencyCode(buyCurrencyId);
1605
- buyAccount['free'] = this.safeString(free, 'buy_type');
1606
- buyAccount['total'] = this.safeString(total, 'buy_type');
1607
- const buyDebt = this.safeString(loan, 'buy_type');
1608
- const buyInterest = this.safeString(interest, 'buy_type');
1609
- buyAccount['debt'] = Precise.stringAdd(buyDebt, buyInterest);
1610
- result[buyCurrencyCode] = buyAccount;
1611
- //
1568
+ const balances = this.safeList(response, 'data', []);
1569
+ for (let i = 0; i < balances.length; i++) {
1570
+ const entry = balances[i];
1571
+ const free = this.safeDict(entry, 'available', {});
1572
+ const used = this.safeDict(entry, 'frozen', {});
1573
+ const loan = this.safeDict(entry, 'repaid', {});
1574
+ const interest = this.safeDict(entry, 'interest', {});
1575
+ const baseAccount = this.account();
1576
+ const baseCurrencyId = this.safeString(entry, 'base_ccy');
1577
+ const baseCurrencyCode = this.safeCurrencyCode(baseCurrencyId);
1578
+ baseAccount['free'] = this.safeString(free, 'base_ccy');
1579
+ baseAccount['used'] = this.safeString(used, 'base_ccy');
1580
+ const baseDebt = this.safeString(loan, 'base_ccy');
1581
+ const baseInterest = this.safeString(interest, 'base_ccy');
1582
+ baseAccount['debt'] = Precise.stringAdd(baseDebt, baseInterest);
1583
+ result[baseCurrencyCode] = baseAccount;
1584
+ }
1612
1585
  return this.safeBalance(result);
1613
1586
  }
1614
1587
  async fetchSpotBalance(params = {}) {
1615
1588
  await this.loadMarkets();
1616
- const response = await this.v1PrivateGetBalanceInfo(params);
1589
+ const response = await this.v2PrivateGetAssetsSpotBalance(params);
1617
1590
  //
1618
1591
  // {
1619
- // "code": 0,
1620
- // "data": {
1621
- // "BCH": { # BCH account
1622
- // "available": "13.60109", # Available BCH
1623
- // "frozen": "0.00000" # Frozen BCH
1624
- // },
1625
- // "BTC": { # BTC account
1626
- // "available": "32590.16", # Available BTC
1627
- // "frozen": "7000.00" # Frozen BTC
1628
- // },
1629
- // "ETH": { # ETH account
1630
- // "available": "5.06000", # Available ETH
1631
- // "frozen": "0.00000" # Frozen ETH
1632
- // }
1633
- // },
1634
- // "message": "Ok"
1592
+ // "code": 0,
1593
+ // "data": [
1594
+ // {
1595
+ // "available": "0.00000046",
1596
+ // "ccy": "USDT",
1597
+ // "frozen": "0"
1598
+ // }
1599
+ // ],
1600
+ // "message": "OK"
1635
1601
  // }
1636
1602
  //
1637
1603
  const result = { 'info': response };
1638
- const balances = this.safeValue(response, 'data', {});
1639
- const currencyIds = Object.keys(balances);
1640
- for (let i = 0; i < currencyIds.length; i++) {
1641
- const currencyId = currencyIds[i];
1604
+ const balances = this.safeList(response, 'data', []);
1605
+ for (let i = 0; i < balances.length; i++) {
1606
+ const entry = balances[i];
1607
+ const currencyId = this.safeString(entry, 'ccy');
1642
1608
  const code = this.safeCurrencyCode(currencyId);
1643
- const balance = this.safeValue(balances, currencyId, {});
1644
1609
  const account = this.account();
1645
- account['free'] = this.safeString(balance, 'available');
1646
- account['used'] = this.safeString(balance, 'frozen');
1610
+ account['free'] = this.safeString(entry, 'available');
1611
+ account['used'] = this.safeString(entry, 'frozen');
1647
1612
  result[code] = account;
1648
1613
  }
1649
1614
  return this.safeBalance(result);
1650
1615
  }
1651
1616
  async fetchSwapBalance(params = {}) {
1652
1617
  await this.loadMarkets();
1653
- const response = await this.v1PerpetualPrivateGetAssetQuery(params);
1618
+ const response = await this.v2PrivateGetAssetsFuturesBalance(params);
1654
1619
  //
1655
1620
  // {
1656
1621
  // "code": 0,
1657
- // "data": {
1658
- // "USDT": {
1659
- // "available": "37.24817690383456000000",
1660
- // "balance_total": "37.24817690383456000000",
1661
- // "frozen": "0.00000000000000000000",
1662
- // "margin": "0.00000000000000000000",
1663
- // "profit_unreal": "0.00000000000000000000",
1664
- // "transfer": "37.24817690383456000000"
1622
+ // "data": [
1623
+ // {
1624
+ // "available": "0.00000046",
1625
+ // "ccy": "USDT",
1626
+ // "frozen": "0",
1627
+ // "margin": "0",
1628
+ // "transferrable": "0.00000046",
1629
+ // "unrealized_pnl": "0"
1665
1630
  // }
1666
- // },
1631
+ // ],
1667
1632
  // "message": "OK"
1668
1633
  // }
1669
1634
  //
1670
1635
  const result = { 'info': response };
1671
- const balances = this.safeValue(response, 'data', {});
1672
- const currencyIds = Object.keys(balances);
1673
- for (let i = 0; i < currencyIds.length; i++) {
1674
- const currencyId = currencyIds[i];
1636
+ const balances = this.safeList(response, 'data', []);
1637
+ for (let i = 0; i < balances.length; i++) {
1638
+ const entry = balances[i];
1639
+ const currencyId = this.safeString(entry, 'ccy');
1675
1640
  const code = this.safeCurrencyCode(currencyId);
1676
- const balance = this.safeValue(balances, currencyId, {});
1677
1641
  const account = this.account();
1678
- account['free'] = this.safeString(balance, 'available');
1679
- account['used'] = this.safeString(balance, 'frozen');
1680
- account['total'] = this.safeString(balance, 'balance_total');
1642
+ account['free'] = this.safeString(entry, 'available');
1643
+ account['used'] = this.safeString(entry, 'frozen');
1681
1644
  result[code] = account;
1682
1645
  }
1683
1646
  return this.safeBalance(result);
1684
1647
  }
1685
1648
  async fetchFinancialBalance(params = {}) {
1686
1649
  await this.loadMarkets();
1687
- const response = await this.v1PrivateGetAccountInvestmentBalance(params);
1650
+ const response = await this.v2PrivateGetAssetsFinancialBalance(params);
1688
1651
  //
1689
1652
  // {
1690
- // "code": 0,
1691
- // "data": [
1692
- // {
1693
- // "asset": "CET",
1694
- // "available": "0",
1695
- // "frozen": "0",
1696
- // "lock": "0",
1697
- // },
1698
- // {
1699
- // "asset": "USDT",
1700
- // "available": "999900",
1701
- // "frozen": "0",
1702
- // "lock": "0"
1703
- // }
1704
- // ],
1705
- // "message": "Success"
1706
- // }
1653
+ // "code": 0,
1654
+ // "data": [
1655
+ // {
1656
+ // "available": "0.00000046",
1657
+ // "ccy": "USDT",
1658
+ // "frozen": "0"
1659
+ // }
1660
+ // ],
1661
+ // "message": "OK"
1662
+ // }
1707
1663
  //
1708
1664
  const result = { 'info': response };
1709
- const balances = this.safeValue(response, 'data', {});
1665
+ const balances = this.safeList(response, 'data', []);
1710
1666
  for (let i = 0; i < balances.length; i++) {
1711
- const balance = balances[i];
1712
- const currencyId = this.safeString(balance, 'asset');
1667
+ const entry = balances[i];
1668
+ const currencyId = this.safeString(entry, 'ccy');
1713
1669
  const code = this.safeCurrencyCode(currencyId);
1714
1670
  const account = this.account();
1715
- account['free'] = this.safeString(balance, 'available');
1716
- const frozen = this.safeString(balance, 'frozen');
1717
- const locked = this.safeString(balance, 'lock');
1718
- account['used'] = Precise.stringAdd(frozen, locked);
1671
+ account['free'] = this.safeString(entry, 'available');
1672
+ account['used'] = this.safeString(entry, 'frozen');
1719
1673
  result[code] = account;
1720
1674
  }
1721
1675
  return this.safeBalance(result);
@@ -1725,10 +1679,10 @@ export default class coinex extends Exchange {
1725
1679
  * @method
1726
1680
  * @name coinex#fetchBalance
1727
1681
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1728
- * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account001_account_info // spot
1729
- * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account004_investment_balance // financial
1730
- * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account006_margin_account // margin
1731
- * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http016_asset_query // swap
1682
+ * @see https://docs.coinex.com/api/v2/assets/balance/http/get-spot-balance // spot
1683
+ * @see https://docs.coinex.com/api/v2/assets/balance/http/get-futures-balance // swap
1684
+ * @see https://docs.coinex.com/api/v2/assets/balance/http/get-marigin-balance // margin
1685
+ * @see https://docs.coinex.com/api/v2/assets/balance/http/get-financial-balance // financial
1732
1686
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1733
1687
  * @param {string} [params.type] 'margin', 'swap', 'financial', or 'spot'
1734
1688
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
@@ -5824,7 +5778,11 @@ export default class coinex extends Exchange {
5824
5778
  this.checkRequiredCredentials();
5825
5779
  query = this.keysort(query);
5826
5780
  const urlencoded = this.rawencode(query);
5827
- const preparedString = method + '/' + version + '/' + path + '?' + urlencoded + nonce + this.secret;
5781
+ let preparedString = method + '/' + version + '/' + path;
5782
+ if (urlencoded) {
5783
+ preparedString += '?' + urlencoded;
5784
+ }
5785
+ preparedString += nonce + this.secret;
5828
5786
  const signature = this.hash(this.encode(preparedString), sha256);
5829
5787
  headers = {
5830
5788
  'X-COINEX-KEY': this.apiKey,
@@ -5832,7 +5790,9 @@ export default class coinex extends Exchange {
5832
5790
  'X-COINEX-TIMESTAMP': nonce,
5833
5791
  };
5834
5792
  if ((method === 'GET') || (method === 'DELETE') || (method === 'PUT')) {
5835
- url += '?' + urlencoded;
5793
+ if (urlencoded) {
5794
+ url += '?' + urlencoded;
5795
+ }
5836
5796
  }
5837
5797
  else {
5838
5798
  body = this.json(query);
@@ -45,7 +45,7 @@ export default class gemini extends Exchange {
45
45
  info: any;
46
46
  };
47
47
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
48
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
48
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
49
49
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
50
50
  url: string;
51
51
  method: string;
@@ -39,7 +39,7 @@ export default class hollaex extends Exchange {
39
39
  network: string;
40
40
  info: any;
41
41
  };
42
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
42
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<Dictionary<any>>;
43
43
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
44
44
  fetchWithdrawal(id: string, code?: Str, params?: {}): Promise<Transaction>;
45
45
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
package/js/src/htx.d.ts CHANGED
@@ -101,7 +101,7 @@ export default class htx extends Exchange {
101
101
  note: string;
102
102
  info: any;
103
103
  };
104
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
104
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
105
105
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
106
106
  fetchWithdrawAddresses(code: string, note?: any, networkCode?: any, params?: {}): Promise<any[]>;
107
107
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
@@ -245,7 +245,7 @@ export default class htx extends Exchange {
245
245
  datetime: string;
246
246
  info: any;
247
247
  };
248
- fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
248
+ fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any[]>;
249
249
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
250
250
  parseDepositWithdrawFee(fee: any, currency?: Currency): any;
251
251
  parseSettlements(settlements: any, market: any): any[];
package/js/src/idex.d.ts CHANGED
@@ -17,7 +17,7 @@ export default class idex extends Exchange {
17
17
  parseTrade(trade: any, market?: Market): Trade;
18
18
  fetchTradingFees(params?: {}): Promise<TradingFees>;
19
19
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
20
- parseSide(book: any, side: any): any;
20
+ parseSide(book: any, side: any): any[];
21
21
  fetchCurrencies(params?: {}): Promise<Currencies>;
22
22
  parseBalance(response: any): Balances;
23
23
  fetchBalance(params?: {}): Promise<Balances>;
@@ -63,7 +63,7 @@ export default class kucoin extends Exchange {
63
63
  tag: string;
64
64
  network: string;
65
65
  };
66
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
66
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
67
67
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
68
68
  handleTriggerPrices(params: any): any[];
69
69
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
package/js/src/mexc.d.ts CHANGED
@@ -111,7 +111,7 @@ export default class mexc extends Exchange {
111
111
  network: string;
112
112
  info: any;
113
113
  };
114
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
114
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
115
115
  createDepositAddress(code: string, params?: {}): Promise<{
116
116
  currency: string;
117
117
  address: string;
@@ -42,7 +42,7 @@ export default class okcoin extends Exchange {
42
42
  info: any;
43
43
  };
44
44
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
45
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
45
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
46
46
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
47
47
  parseTransfer(transfer: any, currency?: Currency): {
48
48
  info: any;
package/js/src/okx.d.ts CHANGED
@@ -85,7 +85,7 @@ export default class okx extends Exchange {
85
85
  network: string;
86
86
  info: any;
87
87
  };
88
- fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<{}>;
88
+ fetchDepositAddressesByNetwork(code: string, params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
89
89
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
90
90
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
91
91
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
package/js/src/okx.js CHANGED
@@ -7928,7 +7928,7 @@ export default class okx extends Exchange {
7928
7928
  // }
7929
7929
  //
7930
7930
  const rows = this.safeList(response, 'data', []);
7931
- return this.parseConversions(rows, 'baseCcy', 'quoteCcy', since, limit);
7931
+ return this.parseConversions(rows, code, 'baseCcy', 'quoteCcy', since, limit);
7932
7932
  }
7933
7933
  parseConversion(conversion, fromCurrency = undefined, toCurrency = undefined) {
7934
7934
  //
@@ -27,7 +27,7 @@ export default class paymium extends Exchange {
27
27
  tag: any;
28
28
  network: any;
29
29
  }>;
30
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
30
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
31
31
  parseDepositAddress(depositAddress: any, currency?: Currency): {
32
32
  info: any;
33
33
  currency: string;
@@ -10,8 +10,8 @@ export default class luno extends lunoRest {
10
10
  handleOrderBook(client: Client, message: any, subscription: any): void;
11
11
  customParseOrderBook(orderbook: any, symbol: any, timestamp?: any, bidsKey?: string, asksKey?: IndexType, priceKey?: IndexType, amountKey?: IndexType, countOrIdKey?: IndexType): {
12
12
  symbol: any;
13
- bids: any;
14
- asks: any;
13
+ bids: any[];
14
+ asks: any[];
15
15
  timestamp: any;
16
16
  datetime: string;
17
17
  nonce: any;
@@ -44,7 +44,7 @@ export default class probit extends Exchange {
44
44
  network: string;
45
45
  info: any;
46
46
  }>;
47
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
47
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<any>>;
48
48
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
49
49
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
50
50
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
package/js/src/upbit.d.ts CHANGED
@@ -67,7 +67,7 @@ export default class upbit extends Exchange {
67
67
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
68
68
  fetchCanceledOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
69
69
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
70
- fetchDepositAddresses(codes?: string[], params?: {}): Promise<{}>;
70
+ fetchDepositAddresses(codes?: string[], params?: {}): Promise<Dictionary<any>>;
71
71
  parseDepositAddress(depositAddress: any, currency?: Currency): {
72
72
  currency: string;
73
73
  address: string;
@@ -103,7 +103,7 @@ export default class whitebit extends Exchange {
103
103
  previousFundingTimestamp: any;
104
104
  previousFundingDatetime: any;
105
105
  };
106
- isFiat(currency: any): any;
106
+ isFiat(currency: any): boolean;
107
107
  nonce(): number;
108
108
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
109
109
  url: string;