ccxt 4.2.45 → 4.2.46

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 (71) hide show
  1. package/CHANGELOG.md +3099 -8415
  2. package/README.md +4 -4
  3. package/change.sh +4 -2
  4. package/dist/ccxt.browser.js +381 -58
  5. package/dist/ccxt.browser.min.js +7 -7
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/base/ws/Cache.js +13 -5
  8. package/dist/cjs/src/base/ws/OrderBook.js +2 -2
  9. package/dist/cjs/src/binance.js +34 -12
  10. package/dist/cjs/src/bitfinex2.js +1 -0
  11. package/dist/cjs/src/bithumb.js +5 -0
  12. package/dist/cjs/src/btcturk.js +11 -0
  13. package/dist/cjs/src/coinbase.js +9 -5
  14. package/dist/cjs/src/coincheck.js +11 -0
  15. package/dist/cjs/src/coinmate.js +114 -1
  16. package/dist/cjs/src/coinspot.js +7 -0
  17. package/dist/cjs/src/cryptocom.js +2 -2
  18. package/dist/cjs/src/hitbtc.js +2 -0
  19. package/dist/cjs/src/idex.js +60 -1
  20. package/dist/cjs/src/latoken.js +3 -0
  21. package/dist/cjs/src/mercado.js +3 -0
  22. package/dist/cjs/src/oceanex.js +3 -0
  23. package/dist/cjs/src/okx.js +1 -0
  24. package/dist/cjs/src/pro/bitget.js +12 -8
  25. package/dist/cjs/src/pro/bitmart.js +11 -11
  26. package/dist/cjs/src/pro/bitmex.js +4 -4
  27. package/dist/cjs/src/pro/cex.js +2 -2
  28. package/dist/cjs/src/pro/gemini.js +4 -3
  29. package/dist/cjs/src/timex.js +65 -0
  30. package/js/ccxt.d.ts +1 -1
  31. package/js/ccxt.js +1 -1
  32. package/js/src/abstract/bequant.d.ts +2 -0
  33. package/js/src/abstract/bitcoincom.d.ts +2 -0
  34. package/js/src/abstract/bithumb.d.ts +5 -0
  35. package/js/src/abstract/coinmate.d.ts +12 -0
  36. package/js/src/abstract/fmfwio.d.ts +2 -0
  37. package/js/src/abstract/hitbtc.d.ts +2 -0
  38. package/js/src/abstract/hitbtc3.d.ts +2 -0
  39. package/js/src/abstract/okx.d.ts +1 -0
  40. package/js/src/base/Exchange.d.ts +9 -7
  41. package/js/src/base/ws/Cache.d.ts +5 -1
  42. package/js/src/base/ws/Cache.js +13 -5
  43. package/js/src/base/ws/OrderBook.d.ts +5 -1
  44. package/js/src/base/ws/OrderBook.js +3 -3
  45. package/js/src/binance.d.ts +1 -1
  46. package/js/src/binance.js +34 -12
  47. package/js/src/bitfinex2.js +1 -0
  48. package/js/src/bithumb.js +5 -0
  49. package/js/src/btcturk.js +11 -0
  50. package/js/src/coinbase.js +9 -5
  51. package/js/src/coincheck.js +11 -0
  52. package/js/src/coinmate.d.ts +3 -1
  53. package/js/src/coinmate.js +114 -1
  54. package/js/src/coinspot.js +7 -0
  55. package/js/src/cryptocom.js +2 -2
  56. package/js/src/hitbtc.js +2 -0
  57. package/js/src/idex.d.ts +14 -0
  58. package/js/src/idex.js +60 -1
  59. package/js/src/latoken.js +3 -0
  60. package/js/src/mercado.js +3 -0
  61. package/js/src/oceanex.js +3 -0
  62. package/js/src/okx.js +1 -0
  63. package/js/src/pro/bitget.js +12 -8
  64. package/js/src/pro/bitmart.js +11 -11
  65. package/js/src/pro/bitmex.js +4 -4
  66. package/js/src/pro/cex.js +2 -2
  67. package/js/src/pro/gemini.js +4 -3
  68. package/js/src/timex.d.ts +14 -0
  69. package/js/src/timex.js +65 -0
  70. package/package.json +1 -1
  71. package/skip-tests.json +4 -0
@@ -178,6 +178,7 @@ export default class coinspot extends Exchange {
178
178
  * @method
179
179
  * @name coinspot#fetchBalance
180
180
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
181
+ * @see https://www.coinspot.com.au/api#listmybalance
181
182
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182
183
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
183
184
  */
@@ -207,6 +208,7 @@ export default class coinspot extends Exchange {
207
208
  * @method
208
209
  * @name coinspot#fetchOrderBook
209
210
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
211
+ * @see https://www.coinspot.com.au/api#listopenorders
210
212
  * @param {string} symbol unified symbol of the market to fetch the order book for
211
213
  * @param {int} [limit] the maximum amount of order book entries to return
212
214
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -260,6 +262,7 @@ export default class coinspot extends Exchange {
260
262
  * @method
261
263
  * @name coinspot#fetchTicker
262
264
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
265
+ * @see https://www.coinspot.com.au/api#latestprices
263
266
  * @param {string} symbol unified symbol of the market to fetch the ticker for
264
267
  * @param {object} [params] extra parameters specific to the exchange API endpoint
265
268
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -333,6 +336,7 @@ export default class coinspot extends Exchange {
333
336
  * @method
334
337
  * @name coinspot#fetchTrades
335
338
  * @description get the list of most recent trades for a particular symbol
339
+ * @see https://www.coinspot.com.au/api#orderhistory
336
340
  * @param {string} symbol unified symbol of the market to fetch trades for
337
341
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
338
342
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -361,6 +365,7 @@ export default class coinspot extends Exchange {
361
365
  * @method
362
366
  * @name coinspot#fetchMyTrades
363
367
  * @description fetch all trades made by the user
368
+ * @see https://www.coinspot.com.au/api#rotransaction
364
369
  * @param {string} symbol unified market symbol
365
370
  * @param {int} [since] the earliest time in ms to fetch trades for
366
371
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -516,6 +521,8 @@ export default class coinspot extends Exchange {
516
521
  * @method
517
522
  * @name coinspot#cancelOrder
518
523
  * @description cancels an open order
524
+ * @see https://www.coinspot.com.au/api#cancelbuyorder
525
+ * @see https://www.coinspot.com.au/api#cancelsellorder
519
526
  * @param {string} id order id
520
527
  * @param {string} symbol not used by coinspot cancelOrder ()
521
528
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -2319,13 +2319,13 @@ export default class cryptocom extends Exchange {
2319
2319
  * @method
2320
2320
  * @name cryptocom#fetchDepositWithdrawFees
2321
2321
  * @description fetch deposit and withdraw fees
2322
- * @see https://exchange-docs.crypto.com/spot/index.html#private-get-currency-networks
2322
+ * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
2323
2323
  * @param {string[]|undefined} codes list of unified currency codes
2324
2324
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2325
2325
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
2326
2326
  */
2327
2327
  await this.loadMarkets();
2328
- const response = await this.v2PrivatePostPrivateGetCurrencyNetworks(params);
2328
+ const response = await this.v1PrivatePostPrivateGetCurrencyNetworks(params);
2329
2329
  const data = this.safeValue(response, 'result');
2330
2330
  const currencyMap = this.safeValue(data, 'currency_map');
2331
2331
  return this.parseDepositWithdrawFees(currencyMap, codes, 'full_name');
package/js/src/hitbtc.js CHANGED
@@ -141,6 +141,8 @@ export default class hitbtc extends Exchange {
141
141
  'public/orderbook/{symbol}': 10,
142
142
  'public/candles': 10,
143
143
  'public/candles/{symbol}': 10,
144
+ 'public/converted/candles': 10,
145
+ 'public/converted/candles/{symbol}': 10,
144
146
  'public/futures/info': 10,
145
147
  'public/futures/info/{symbol}': 10,
146
148
  'public/futures/history/funding': 10,
package/js/src/idex.d.ts CHANGED
@@ -43,6 +43,20 @@ export default class idex extends Exchange {
43
43
  parseTransactionStatus(status: any): string;
44
44
  parseTransaction(transaction: any, currency?: Currency): Transaction;
45
45
  calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
46
+ fetchDepositAddress(code?: string, params?: {}): Promise<{
47
+ info: any;
48
+ currency: any;
49
+ address: string;
50
+ tag: any;
51
+ network: string;
52
+ }>;
53
+ parseDepositAddress(depositAddress: any, currency?: Currency): {
54
+ info: any;
55
+ currency: any;
56
+ address: string;
57
+ tag: any;
58
+ network: string;
59
+ };
46
60
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
47
61
  url: string;
48
62
  method: string;
package/js/src/idex.js CHANGED
@@ -56,6 +56,9 @@ export default class idex extends Exchange {
56
56
  'fetchCrossBorrowRates': false,
57
57
  'fetchCurrencies': true,
58
58
  'fetchDeposit': true,
59
+ 'fetchDepositAddress': true,
60
+ 'fetchDepositAddresses': false,
61
+ 'fetchDepositAddressesByNetwork': false,
59
62
  'fetchDeposits': true,
60
63
  'fetchFundingHistory': false,
61
64
  'fetchFundingRate': false,
@@ -115,7 +118,7 @@ export default class idex extends Exchange {
115
118
  },
116
119
  'www': 'https://idex.io',
117
120
  'doc': [
118
- 'https://docs.idex.io/',
121
+ 'https://api-docs-v3.idex.io/',
119
122
  ],
120
123
  },
121
124
  'api': {
@@ -1703,6 +1706,62 @@ export default class idex extends Exchange {
1703
1706
  const authenticated = hasApiKey && hasSecret && hasWalletAddress && hasPrivateKey;
1704
1707
  return authenticated ? (defaultCost / 2) : defaultCost;
1705
1708
  }
1709
+ async fetchDepositAddress(code = undefined, params = {}) {
1710
+ /**
1711
+ * @method
1712
+ * @name idex#fetchDepositAddress
1713
+ * @description fetch the Polygon address of the wallet
1714
+ * @see https://api-docs-v3.idex.io/#get-wallets
1715
+ * @param {string} code not used by idex
1716
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1717
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1718
+ */
1719
+ const request = {};
1720
+ request['nonce'] = this.uuidv1();
1721
+ const response = await this.privateGetWallets(this.extend(request, params));
1722
+ //
1723
+ // [
1724
+ // {
1725
+ // address: "0x37A1827CA64C94A26028bDCb43FBDCB0bf6DAf5B",
1726
+ // totalPortfolioValueUsd: "0.00",
1727
+ // time: "1678342148086"
1728
+ // },
1729
+ // {
1730
+ // address: "0x0Ef3456E616552238B0c562d409507Ed6051A7b3",
1731
+ // totalPortfolioValueUsd: "15.90",
1732
+ // time: "1691697811659"
1733
+ // }
1734
+ // ]
1735
+ //
1736
+ return this.parseDepositAddress(response);
1737
+ }
1738
+ parseDepositAddress(depositAddress, currency = undefined) {
1739
+ //
1740
+ // [
1741
+ // {
1742
+ // address: "0x37A1827CA64C94A26028bDCb43FBDCB0bf6DAf5B",
1743
+ // totalPortfolioValueUsd: "0.00",
1744
+ // time: "1678342148086"
1745
+ // },
1746
+ // {
1747
+ // address: "0x0Ef3456E616552238B0c562d409507Ed6051A7b3",
1748
+ // totalPortfolioValueUsd: "15.90",
1749
+ // time: "1691697811659"
1750
+ // }
1751
+ // ]
1752
+ //
1753
+ const length = depositAddress.length;
1754
+ const entry = this.safeDict(depositAddress, length - 1);
1755
+ const address = this.safeString(entry, 'address');
1756
+ this.checkAddress(address);
1757
+ return {
1758
+ 'info': depositAddress,
1759
+ 'currency': undefined,
1760
+ 'address': address,
1761
+ 'tag': undefined,
1762
+ 'network': 'MATIC',
1763
+ };
1764
+ }
1706
1765
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
1707
1766
  const network = this.safeString(this.options, 'network', 'ETH');
1708
1767
  const version = this.safeString(this.options, 'version', 'v1');
package/js/src/latoken.js CHANGED
@@ -44,6 +44,9 @@ export default class latoken extends Exchange {
44
44
  'fetchCrossBorrowRate': false,
45
45
  'fetchCrossBorrowRates': false,
46
46
  'fetchCurrencies': true,
47
+ 'fetchDepositAddress': false,
48
+ 'fetchDepositAddresses': false,
49
+ 'fetchDepositAddressesByNetwork': false,
47
50
  'fetchDepositsWithdrawals': true,
48
51
  'fetchDepositWithdrawFees': false,
49
52
  'fetchIsolatedBorrowRate': false,
package/js/src/mercado.js CHANGED
@@ -43,6 +43,9 @@ export default class mercado extends Exchange {
43
43
  'fetchBorrowRateHistory': false,
44
44
  'fetchCrossBorrowRate': false,
45
45
  'fetchCrossBorrowRates': false,
46
+ 'fetchDepositAddress': false,
47
+ 'fetchDepositAddresses': false,
48
+ 'fetchDepositAddressesByNetwork': false,
46
49
  'fetchFundingHistory': false,
47
50
  'fetchFundingRate': false,
48
51
  'fetchFundingRateHistory': false,
package/js/src/oceanex.js CHANGED
@@ -50,6 +50,9 @@ export default class oceanex extends Exchange {
50
50
  'fetchClosedOrders': true,
51
51
  'fetchCrossBorrowRate': false,
52
52
  'fetchCrossBorrowRates': false,
53
+ 'fetchDepositAddress': false,
54
+ 'fetchDepositAddresses': false,
55
+ 'fetchDepositAddressesByNetwork': false,
53
56
  'fetchIsolatedBorrowRate': false,
54
57
  'fetchIsolatedBorrowRates': false,
55
58
  'fetchMarkets': true,
package/js/src/okx.js CHANGED
@@ -447,6 +447,7 @@ export default class okx extends Exchange {
447
447
  'account/quick-margin-borrow-repay': 4,
448
448
  'account/borrow-repay': 5 / 3,
449
449
  'account/simulated_margin': 10,
450
+ 'account/position-builder': 10,
450
451
  'account/set-riskOffset-type': 2,
451
452
  'account/activate-option': 4,
452
453
  'account/set-auto-loan': 4,
@@ -521,13 +521,15 @@ export default class bitget extends bitgetRest {
521
521
  const rawOrderBook = this.safeValue(data, 0);
522
522
  const timestamp = this.safeInteger(rawOrderBook, 'ts');
523
523
  const incrementalBook = channel === 'books';
524
- let storedOrderBook = undefined;
525
524
  if (incrementalBook) {
526
- storedOrderBook = this.safeValue(this.orderbooks, symbol);
527
- if (storedOrderBook === undefined) {
528
- storedOrderBook = this.countedOrderBook({});
529
- storedOrderBook['symbol'] = symbol;
525
+ // storedOrderBook = this.safeValue (this.orderbooks, symbol);
526
+ if (!(symbol in this.orderbooks)) {
527
+ // const ob = this.orderBook ({});
528
+ const ob = this.countedOrderBook({});
529
+ ob['symbol'] = symbol;
530
+ this.orderbooks[symbol] = ob;
530
531
  }
532
+ const storedOrderBook = this.orderbooks[symbol];
531
533
  const asks = this.safeValue(rawOrderBook, 'asks', []);
532
534
  const bids = this.safeValue(rawOrderBook, 'bids', []);
533
535
  this.handleDeltas(storedOrderBook['asks'], asks);
@@ -562,10 +564,12 @@ export default class bitget extends bitgetRest {
562
564
  }
563
565
  }
564
566
  else {
565
- storedOrderBook = this.parseOrderBook(rawOrderBook, symbol, timestamp);
567
+ const orderbook = this.orderBook({});
568
+ const parsedOrderbook = this.parseOrderBook(rawOrderBook, symbol, timestamp);
569
+ orderbook.reset(parsedOrderbook);
570
+ this.orderbooks[symbol] = orderbook;
566
571
  }
567
- this.orderbooks[symbol] = storedOrderBook;
568
- client.resolve(storedOrderBook, messageHash);
572
+ client.resolve(this.orderbooks[symbol], messageHash);
569
573
  }
570
574
  handleDelta(bookside, delta) {
571
575
  const bidAsk = this.parseBidAsk(delta, 0, 1);
@@ -1320,13 +1320,13 @@ export default class bitmart extends bitmartRest {
1320
1320
  const update = datas[i];
1321
1321
  const marketId = this.safeString(update, 'symbol');
1322
1322
  const symbol = this.safeSymbol(marketId);
1323
- let orderbook = this.safeDict(this.orderbooks, symbol);
1324
- if (orderbook === undefined) {
1325
- orderbook = this.orderBook({}, limit);
1326
- orderbook['symbol'] = symbol;
1327
- this.orderbooks[symbol] = orderbook;
1323
+ if (!(symbol in this.orderbooks)) {
1324
+ const ob = this.orderBook({}, limit);
1325
+ ob['symbol'] = symbol;
1326
+ this.orderbooks[symbol] = ob;
1328
1327
  }
1329
- const type = this.safeValue(update, 'type');
1328
+ const orderbook = this.orderbooks[symbol];
1329
+ const type = this.safeString(update, 'type');
1330
1330
  if ((type === 'snapshot') || (!(channelName.indexOf('increase') >= 0))) {
1331
1331
  orderbook.reset({});
1332
1332
  }
@@ -1350,12 +1350,12 @@ export default class bitmart extends bitmartRest {
1350
1350
  const depths = data['depths'];
1351
1351
  const marketId = this.safeString(data, 'symbol');
1352
1352
  const symbol = this.safeSymbol(marketId);
1353
- let orderbook = this.safeDict(this.orderbooks, symbol);
1354
- if (orderbook === undefined) {
1355
- orderbook = this.orderBook({}, limit);
1356
- orderbook['symbol'] = symbol;
1357
- this.orderbooks[symbol] = orderbook;
1353
+ if (!(symbol in this.orderbooks)) {
1354
+ const ob = this.orderBook({}, limit);
1355
+ ob['symbol'] = symbol;
1356
+ this.orderbooks[symbol] = ob;
1358
1357
  }
1358
+ const orderbook = this.orderbooks[symbol];
1359
1359
  const way = this.safeNumber(data, 'way');
1360
1360
  const side = (way === 1) ? 'bids' : 'asks';
1361
1361
  if (way === 1) {
@@ -351,11 +351,11 @@ export default class bitmex extends bitmexRest {
351
351
  const market = this.safeMarket(marketId);
352
352
  const symbol = market['symbol'];
353
353
  const messageHash = table + ':' + marketId;
354
- let ticker = this.safeDict(this.tickers, symbol, {});
354
+ const ticker = this.safeDict(this.tickers, symbol, {});
355
355
  const info = this.safeDict(ticker, 'info', {});
356
- ticker = this.parseTicker(this.extend(info, update), market);
357
- tickers[symbol] = ticker;
358
- this.tickers[symbol] = ticker;
356
+ const parsedTicker = this.parseTicker(this.extend(info, update), market);
357
+ tickers[symbol] = parsedTicker;
358
+ this.tickers[symbol] = parsedTicker;
359
359
  client.resolve(ticker, messageHash);
360
360
  }
361
361
  client.resolve(tickers, 'instrument');
package/js/src/pro/cex.js CHANGED
@@ -174,7 +174,7 @@ export default class cex extends cexRest {
174
174
  stored.append(parsed);
175
175
  }
176
176
  const messageHash = 'trades';
177
- this.trades = stored;
177
+ this.trades = stored; // trades don't have symbol
178
178
  client.resolve(this.trades, messageHash);
179
179
  }
180
180
  parseWsOldTrade(trade, market = undefined) {
@@ -218,7 +218,7 @@ export default class cex extends cexRest {
218
218
  // }
219
219
  //
220
220
  const data = this.safeValue(message, 'data', []);
221
- const stored = this.trades;
221
+ const stored = this.trades; // to do fix this, this.trades is not meant to be used like this
222
222
  for (let i = 0; i < data.length; i++) {
223
223
  const rawTrade = data[i];
224
224
  const parsed = this.parseWsOldTrade(rawTrade);
@@ -463,10 +463,11 @@ export default class gemini extends geminiRest {
463
463
  const market = this.safeMarket(marketId.toLowerCase());
464
464
  const symbol = market['symbol'];
465
465
  const messageHash = 'orderbook:' + symbol;
466
- let orderbook = this.safeDict(this.orderbooks, symbol);
467
- if (orderbook === undefined) {
468
- orderbook = this.orderBook();
466
+ if (!(symbol in this.orderbooks)) {
467
+ const ob = this.orderBook();
468
+ this.orderbooks[symbol] = ob;
469
469
  }
470
+ const orderbook = this.orderbooks[symbol];
470
471
  const bids = orderbook['bids'];
471
472
  const asks = orderbook['asks'];
472
473
  for (let i = 0; i < rawOrderBookChanges.length; i++) {
package/js/src/timex.d.ts CHANGED
@@ -67,6 +67,20 @@ export default class timex extends Exchange {
67
67
  parseTrade(trade: any, market?: Market): Trade;
68
68
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
69
69
  parseOrder(order: any, market?: Market): Order;
70
+ fetchDepositAddress(code: string, params?: {}): Promise<{
71
+ info: any;
72
+ currency: string;
73
+ address: string;
74
+ tag: any;
75
+ network: any;
76
+ }>;
77
+ parseDepositAddress(depositAddress: any, currency?: Currency): {
78
+ info: any;
79
+ currency: string;
80
+ address: string;
81
+ tag: any;
82
+ network: any;
83
+ };
70
84
  sign(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any): {
71
85
  url: string;
72
86
  method: string;
package/js/src/timex.js CHANGED
@@ -44,6 +44,9 @@ export default class timex extends Exchange {
44
44
  'fetchCrossBorrowRates': false,
45
45
  'fetchCurrencies': true,
46
46
  'fetchDeposit': false,
47
+ 'fetchDepositAddress': true,
48
+ 'fetchDepositAddresses': false,
49
+ 'fetchDepositAddressesByNetwork': false,
47
50
  'fetchDeposits': true,
48
51
  'fetchFundingHistory': false,
49
52
  'fetchFundingRate': false,
@@ -1524,7 +1527,69 @@ export default class timex extends Exchange {
1524
1527
  'trades': rawTrades,
1525
1528
  }, market);
1526
1529
  }
1530
+ async fetchDepositAddress(code, params = {}) {
1531
+ /**
1532
+ * @method
1533
+ * @name timex#fetchDepositAddress
1534
+ * @description fetch the deposit address for a currency associated with this account, does not accept params["network"]
1535
+ * @param {string} code unified currency code
1536
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
1537
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
1538
+ */
1539
+ await this.loadMarkets();
1540
+ const currency = this.currency(code);
1541
+ const request = {
1542
+ 'symbol': currency['code'],
1543
+ };
1544
+ const response = await this.currenciesGetSSymbol(this.extend(request, params));
1545
+ //
1546
+ // {
1547
+ // id: '1',
1548
+ // currency: {
1549
+ // symbol: 'BTC',
1550
+ // name: 'Bitcoin',
1551
+ // address: '0x8370fbc6ddec1e18b4e41e72ed943e238458487c',
1552
+ // decimals: '8',
1553
+ // tradeDecimals: '20',
1554
+ // fiatSymbol: 'BTC',
1555
+ // depositEnabled: true,
1556
+ // withdrawalEnabled: true,
1557
+ // transferEnabled: true,
1558
+ // active: true
1559
+ // }
1560
+ // }
1561
+ //
1562
+ const data = this.safeDict(response, 'currency', {});
1563
+ return this.parseDepositAddress(data, currency);
1564
+ }
1565
+ parseDepositAddress(depositAddress, currency = undefined) {
1566
+ //
1567
+ // {
1568
+ // symbol: 'BTC',
1569
+ // name: 'Bitcoin',
1570
+ // address: '0x8370fbc6ddec1e18b4e41e72ed943e238458487c',
1571
+ // decimals: '8',
1572
+ // tradeDecimals: '20',
1573
+ // fiatSymbol: 'BTC',
1574
+ // depositEnabled: true,
1575
+ // withdrawalEnabled: true,
1576
+ // transferEnabled: true,
1577
+ // active: true
1578
+ // }
1579
+ //
1580
+ const currencyId = this.safeString(depositAddress, 'symbol');
1581
+ return {
1582
+ 'info': depositAddress,
1583
+ 'currency': this.safeCurrencyCode(currencyId, currency),
1584
+ 'address': this.safeString(depositAddress, 'address'),
1585
+ 'tag': undefined,
1586
+ 'network': undefined,
1587
+ };
1588
+ }
1527
1589
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
1590
+ const paramsToExtract = this.extractParams(path);
1591
+ path = this.implodeParams(path, params);
1592
+ params = this.omit(params, paramsToExtract);
1528
1593
  let url = this.urls['api']['rest'] + '/' + api + '/' + path;
1529
1594
  if (Object.keys(params).length) {
1530
1595
  url += '?' + this.urlencodeWithArrayRepeat(params);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.2.45",
3
+ "version": "4.2.46",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",
package/skip-tests.json CHANGED
@@ -356,6 +356,8 @@
356
356
  }
357
357
  },
358
358
  "onetrading": {
359
+ "skip": true,
360
+ "until": "2024-02-18",
359
361
  "skipWs": true,
360
362
  "skipMethods": {
361
363
  "fetchOrderBook": "some bid might be lower than next bid",
@@ -707,6 +709,8 @@
707
709
  }
708
710
  },
709
711
  "coinsph": {
712
+ "skip": true,
713
+ "until": "2024-02-20",
710
714
  "skipMethods": {
711
715
  "loadMarkets": {
712
716
  "taker":"messed",