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
@@ -14674,6 +14674,7 @@ class BaseCache extends Array {
14674
14674
  class ArrayCache extends BaseCache {
14675
14675
  constructor(maxSize = undefined) {
14676
14676
  super(maxSize);
14677
+ this.hashmap = {};
14677
14678
  Object.defineProperty(this, 'nestedNewUpdatesBySymbol', {
14678
14679
  __proto__: null,
14679
14680
  value: false,
@@ -14699,6 +14700,12 @@ class ArrayCache extends BaseCache {
14699
14700
  value: false,
14700
14701
  writable: true,
14701
14702
  });
14703
+ Object.defineProperty(this, 'hashmap', {
14704
+ __proto__: null,
14705
+ value: {},
14706
+ writable: true,
14707
+ enumerable: false,
14708
+ });
14702
14709
  }
14703
14710
  getLimit(symbol, limit) {
14704
14711
  let newUpdatesValue = undefined;
@@ -14778,6 +14785,7 @@ class ArrayCacheByTimestamp extends BaseCache {
14778
14785
  if (item[0] in this.hashmap) {
14779
14786
  const reference = this.hashmap[item[0]];
14780
14787
  if (reference !== item) {
14788
+ // eslint-disable-next-line
14781
14789
  for (const prop in item) {
14782
14790
  reference[prop] = item[prop];
14783
14791
  }
@@ -14803,11 +14811,11 @@ class ArrayCacheBySymbolById extends ArrayCache {
14803
14811
  constructor(maxSize = undefined) {
14804
14812
  super(maxSize);
14805
14813
  this.nestedNewUpdatesBySymbol = true;
14806
- Object.defineProperty(this, 'hashmap', {
14807
- __proto__: null,
14808
- value: {},
14809
- writable: true,
14810
- });
14814
+ // Object.defineProperty (this, 'hashmap', {
14815
+ // __proto__: null, // make it invisible
14816
+ // value: {},
14817
+ // writable: true,
14818
+ // })
14811
14819
  }
14812
14820
  append(item) {
14813
14821
  const byId = this.hashmap[item.symbol] = this.hashmap[item.symbol] || {};
@@ -15270,18 +15278,18 @@ Future.race = (futures) => wrapFuture(Promise.race(futures));
15270
15278
  /* harmony import */ var _base_functions_generic_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(927);
15271
15279
  /* harmony import */ var _OrderBookSide_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416);
15272
15280
  /* eslint-disable max-classes-per-file */
15273
- // @ts-nocheck
15281
+ // @ts-nocheck
15274
15282
 
15275
15283
 
15276
15284
 
15277
- // ----------------------------------------------------------------------------
15278
- // overwrites absolute volumes at price levels
15279
15285
  class OrderBook {
15280
15286
  constructor(snapshot = {}, depth = undefined) {
15287
+ this.cache = []; // make prop visible so we use typed OrderBooks
15281
15288
  Object.defineProperty(this, 'cache', {
15282
15289
  __proto__: null,
15283
15290
  value: [],
15284
15291
  writable: true,
15292
+ enumerable: false,
15285
15293
  });
15286
15294
  depth = depth || Number.MAX_SAFE_INTEGER;
15287
15295
  const defaults = {
@@ -21209,25 +21217,38 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21209
21217
  account['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(debt, interest);
21210
21218
  return account;
21211
21219
  }
21212
- parseBalanceCustom(response, type = undefined, marginMode = undefined) {
21220
+ parseBalanceCustom(response, type = undefined, marginMode = undefined, isPortfolioMargin = false) {
21213
21221
  const result = {
21214
21222
  'info': response,
21215
21223
  };
21216
21224
  let timestamp = undefined;
21217
21225
  const isolated = marginMode === 'isolated';
21218
21226
  const cross = (type === 'margin') || (marginMode === 'cross');
21219
- if (type === 'papi') {
21227
+ if (isPortfolioMargin) {
21220
21228
  for (let i = 0; i < response.length; i++) {
21221
21229
  const entry = response[i];
21222
21230
  const account = this.account();
21223
21231
  const currencyId = this.safeString(entry, 'asset');
21224
21232
  const code = this.safeCurrencyCode(currencyId);
21225
- const borrowed = this.safeString(entry, 'crossMarginBorrowed');
21226
- const interest = this.safeString(entry, 'crossMarginInterest');
21227
- account['free'] = this.safeString(entry, 'crossMarginFree');
21228
- account['used'] = this.safeString(entry, 'crossMarginLocked');
21229
- account['total'] = this.safeString(entry, 'crossMarginAsset');
21230
- account['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(borrowed, interest);
21233
+ if (type === 'linear') {
21234
+ account['free'] = this.safeString(entry, 'umWalletBalance');
21235
+ account['used'] = this.safeString(entry, 'umUnrealizedPNL');
21236
+ }
21237
+ else if (type === 'inverse') {
21238
+ account['free'] = this.safeString(entry, 'cmWalletBalance');
21239
+ account['used'] = this.safeString(entry, 'cmUnrealizedPNL');
21240
+ }
21241
+ else if (cross) {
21242
+ const borrowed = this.safeString(entry, 'crossMarginBorrowed');
21243
+ const interest = this.safeString(entry, 'crossMarginInterest');
21244
+ account['debt'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAdd(borrowed, interest);
21245
+ account['free'] = this.safeString(entry, 'crossMarginFree');
21246
+ account['used'] = this.safeString(entry, 'crossMarginLocked');
21247
+ account['total'] = this.safeString(entry, 'crossMarginAsset');
21248
+ }
21249
+ else {
21250
+ account['total'] = this.safeString(entry, 'totalWalletBalance');
21251
+ }
21231
21252
  result[code] = account;
21232
21253
  }
21233
21254
  }
@@ -21347,7 +21368,13 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21347
21368
  let response = undefined;
21348
21369
  const request = {};
21349
21370
  if (isPortfolioMargin || (type === 'papi')) {
21350
- type = 'papi';
21371
+ if (this.isLinear(type, subType)) {
21372
+ type = 'linear';
21373
+ }
21374
+ else if (this.isInverse(type, subType)) {
21375
+ type = 'inverse';
21376
+ }
21377
+ isPortfolioMargin = true;
21351
21378
  response = await this.papiGetBalance(this.extend(request, query));
21352
21379
  }
21353
21380
  else if (this.isLinear(type, subType)) {
@@ -21595,7 +21622,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21595
21622
  // },
21596
21623
  // ]
21597
21624
  //
21598
- return this.parseBalanceCustom(response, type, marginMode);
21625
+ return this.parseBalanceCustom(response, type, marginMode, isPortfolioMargin);
21599
21626
  }
21600
21627
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
21601
21628
  /**
@@ -27878,12 +27905,12 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
27878
27905
  /**
27879
27906
  * @method
27880
27907
  * @name binance#fetchPositions
27908
+ * @description fetch all open positions
27881
27909
  * @see https://binance-docs.github.io/apidocs/futures/en/#position-information-v2-user_data
27882
27910
  * @see https://binance-docs.github.io/apidocs/delivery/en/#position-information-user_data
27883
27911
  * @see https://binance-docs.github.io/apidocs/futures/en/#account-information-v2-user_data
27884
27912
  * @see https://binance-docs.github.io/apidocs/delivery/en/#account-information-user_data
27885
27913
  * @see https://binance-docs.github.io/apidocs/voptions/en/#option-position-information-user_data
27886
- * @description fetch all open positions
27887
27914
  * @param {string[]} [symbols] list of unified market symbols
27888
27915
  * @param {object} [params] extra parameters specific to the exchange API endpoint
27889
27916
  * @param {string} [method] method name to call, "positionRisk", "account" or "option", default is "positionRisk"
@@ -28107,7 +28134,10 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
28107
28134
  const result = [];
28108
28135
  for (let i = 0; i < response.length; i++) {
28109
28136
  const parsed = this.parsePositionRisk(response[i]);
28110
- result.push(parsed);
28137
+ const entryPrice = this.safeString(parsed, 'entryPrice');
28138
+ if ((entryPrice !== '0') && (entryPrice !== '0.0') && (entryPrice !== '0.00000000')) {
28139
+ result.push(parsed);
28140
+ }
28111
28141
  }
28112
28142
  symbols = this.marketSymbols(symbols);
28113
28143
  return this.filterByArrayPositions(result, 'symbol', symbols, false);
@@ -39898,6 +39928,7 @@ class bitfinex2 extends _abstract_bitfinex2_js__WEBPACK_IMPORTED_MODULE_0__/* ["
39898
39928
  'EDO': 'PNT',
39899
39929
  'EUS': 'EURS',
39900
39930
  'EUT': 'EURT',
39931
+ 'HTX': 'HT',
39901
39932
  'IDX': 'ID',
39902
39933
  'IOT': 'IOTA',
39903
39934
  'IQX': 'IQ',
@@ -53568,6 +53599,11 @@ class bithumb extends _abstract_bithumb_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
53568
53599
  'orderbook/ALL_{quoteId}',
53569
53600
  'orderbook/{baseId}_{quoteId}',
53570
53601
  'transaction_history/{baseId}_{quoteId}',
53602
+ 'network-info',
53603
+ 'assetsstatus/multichain/ALL',
53604
+ 'assetsstatus/multichain/{currency}',
53605
+ 'withdraw/minimum/ALL',
53606
+ 'withdraw/minimum/{currency}',
53571
53607
  'assetsstatus/ALL',
53572
53608
  'assetsstatus/{baseId}',
53573
53609
  'candlestick/{baseId}_{quoteId}/{interval}',
@@ -82095,6 +82131,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82095
82131
  * @method
82096
82132
  * @name btcturk#fetchMarkets
82097
82133
  * @description retrieves data on all markets for btcturk
82134
+ * @see https://docs.btcturk.com/public-endpoints/exchange-info
82098
82135
  * @param {object} [params] extra parameters specific to the exchange API endpoint
82099
82136
  * @returns {object[]} an array of objects representing market data
82100
82137
  */
@@ -82244,6 +82281,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82244
82281
  * @method
82245
82282
  * @name btcturk#fetchBalance
82246
82283
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
82284
+ * @see https://docs.btcturk.com/private-endpoints/account-balance
82247
82285
  * @param {object} [params] extra parameters specific to the exchange API endpoint
82248
82286
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
82249
82287
  */
@@ -82272,6 +82310,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82272
82310
  * @method
82273
82311
  * @name btcturk#fetchOrderBook
82274
82312
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
82313
+ * @see https://docs.btcturk.com/public-endpoints/orderbook
82275
82314
  * @param {string} symbol unified symbol of the market to fetch the order book for
82276
82315
  * @param {int} [limit] the maximum amount of order book entries to return
82277
82316
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -82352,6 +82391,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82352
82391
  * @method
82353
82392
  * @name btcturk#fetchTickers
82354
82393
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
82394
+ * @see https://docs.btcturk.com/public-endpoints/ticker
82355
82395
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
82356
82396
  * @param {object} [params] extra parameters specific to the exchange API endpoint
82357
82397
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -82366,6 +82406,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82366
82406
  * @method
82367
82407
  * @name btcturk#fetchTicker
82368
82408
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
82409
+ * @see https://docs.btcturk.com/public-endpoints/ticker
82369
82410
  * @param {string} symbol unified symbol of the market to fetch the ticker for
82370
82411
  * @param {object} [params] extra parameters specific to the exchange API endpoint
82371
82412
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -82441,6 +82482,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82441
82482
  * @method
82442
82483
  * @name btcturk#fetchTrades
82443
82484
  * @description get the list of most recent trades for a particular symbol
82485
+ * @see https://docs.btcturk.com/public-endpoints/trades
82444
82486
  * @param {string} symbol unified symbol of the market to fetch trades for
82445
82487
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
82446
82488
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -82604,6 +82646,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82604
82646
  * @method
82605
82647
  * @name btcturk#createOrder
82606
82648
  * @description create a trade order
82649
+ * @see https://docs.btcturk.com/private-endpoints/submit-order
82607
82650
  * @param {string} symbol unified symbol of the market to create an order in
82608
82651
  * @param {string} type 'market' or 'limit'
82609
82652
  * @param {string} side 'buy' or 'sell'
@@ -82638,6 +82681,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82638
82681
  * @method
82639
82682
  * @name btcturk#cancelOrder
82640
82683
  * @description cancels an open order
82684
+ * @see https://docs.btcturk.com/private-endpoints/cancel-order
82641
82685
  * @param {string} id order id
82642
82686
  * @param {string} symbol not used by btcturk cancelOrder ()
82643
82687
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -82653,6 +82697,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82653
82697
  * @method
82654
82698
  * @name btcturk#fetchOpenOrders
82655
82699
  * @description fetch all unfilled currently open orders
82700
+ * @see https://docs.btcturk.com/private-endpoints/open-orders
82656
82701
  * @param {string} symbol unified market symbol
82657
82702
  * @param {int} [since] the earliest time in ms to fetch open orders for
82658
82703
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -82677,6 +82722,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82677
82722
  * @method
82678
82723
  * @name btcturk#fetchOrders
82679
82724
  * @description fetches information on multiple orders made by the user
82725
+ * @see https://docs.btcturk.com/private-endpoints/all-orders
82680
82726
  * @param {string} symbol unified market symbol of the market orders were made in
82681
82727
  * @param {int} [since] the earliest time in ms to fetch orders for
82682
82728
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -82799,6 +82845,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82799
82845
  * @method
82800
82846
  * @name btcturk#fetchMyTrades
82801
82847
  * @description fetch all trades made by the user
82848
+ * @see https://docs.btcturk.com/private-endpoints/user-transactions
82802
82849
  * @param {string} symbol unified market symbol
82803
82850
  * @param {int} [since] the earliest time in ms to fetch trades for
82804
82851
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -92394,6 +92441,8 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
92394
92441
  'fetchCrossBorrowRate': false,
92395
92442
  'fetchCrossBorrowRates': false,
92396
92443
  'fetchCurrencies': true,
92444
+ 'fetchDepositAddress': 'emulated',
92445
+ 'fetchDepositAddresses': false,
92397
92446
  'fetchDepositAddressesByNetwork': true,
92398
92447
  'fetchDeposits': true,
92399
92448
  'fetchFundingHistory': false,
@@ -94072,17 +94121,18 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
94072
94121
  * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
94073
94122
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94074
94123
  * @param {boolean} [params.v3] default false, set true to use v3 api endpoint
94124
+ * @param {object} [params.type] "spot" (default) or "swap"
94075
94125
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
94076
94126
  */
94077
94127
  await this.loadMarkets();
94078
- const request = {
94079
- 'limit': 250,
94080
- };
94128
+ const request = {};
94081
94129
  let response = undefined;
94082
94130
  const isV3 = this.safeBool(params, 'v3', false);
94083
- params = this.omit(params, 'v3');
94131
+ const type = this.safeString(params, 'type');
94132
+ params = this.omit(params, ['v3', 'type']);
94084
94133
  const method = this.safeString(this.options, 'fetchBalance', 'v3PrivateGetBrokerageAccounts');
94085
94134
  if ((isV3) || (method === 'v3PrivateGetBrokerageAccounts')) {
94135
+ request['limit'] = 250;
94086
94136
  response = await this.v3PrivateGetBrokerageAccounts(this.extend(request, params));
94087
94137
  }
94088
94138
  else {
@@ -94159,6 +94209,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
94159
94209
  // "size": 9
94160
94210
  // }
94161
94211
  //
94212
+ params['type'] = type;
94162
94213
  return this.parseCustomBalance(response, params);
94163
94214
  }
94164
94215
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -95733,7 +95784,7 @@ class coinbase extends _abstract_coinbase_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
95733
95784
  async fetchDepositAddressesByNetwork(code, params = {}) {
95734
95785
  /**
95735
95786
  * @method
95736
- * @name ascendex#fetchDepositAddress
95787
+ * @name coinbase#fetchDepositAddress
95737
95788
  * @description fetch the deposit address for a currency associated with this account
95738
95789
  * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
95739
95790
  * @param {string} code unified currency code
@@ -98047,6 +98098,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98047
98098
  * @method
98048
98099
  * @name coincheck#fetchBalance
98049
98100
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
98101
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
98050
98102
  * @param {object} [params] extra parameters specific to the exchange API endpoint
98051
98103
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
98052
98104
  */
@@ -98059,6 +98111,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98059
98111
  * @method
98060
98112
  * @name coincheck#fetchOpenOrders
98061
98113
  * @description fetch all unfilled currently open orders
98114
+ * @see https://coincheck.com/documents/exchange/api#order-opens
98062
98115
  * @param {string} symbol unified market symbol
98063
98116
  * @param {int} [since] the earliest time in ms to fetch open orders for
98064
98117
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -98134,6 +98187,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98134
98187
  * @method
98135
98188
  * @name coincheck#fetchOrderBook
98136
98189
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
98190
+ * @see https://coincheck.com/documents/exchange/api#order-book
98137
98191
  * @param {string} symbol unified symbol of the market to fetch the order book for
98138
98192
  * @param {int} [limit] the maximum amount of order book entries to return
98139
98193
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -98190,6 +98244,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98190
98244
  * @method
98191
98245
  * @name coincheck#fetchTicker
98192
98246
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
98247
+ * @see https://coincheck.com/documents/exchange/api#ticker
98193
98248
  * @param {string} symbol unified symbol of the market to fetch the ticker for
98194
98249
  * @param {object} [params] extra parameters specific to the exchange API endpoint
98195
98250
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -98303,6 +98358,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98303
98358
  * @method
98304
98359
  * @name coincheck#fetchMyTrades
98305
98360
  * @description fetch all trades made by the user
98361
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
98306
98362
  * @param {string} symbol unified market symbol
98307
98363
  * @param {int} [since] the earliest time in ms to fetch trades for
98308
98364
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -98346,6 +98402,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98346
98402
  * @method
98347
98403
  * @name coincheck#fetchTrades
98348
98404
  * @description get the list of most recent trades for a particular symbol
98405
+ * @see https://coincheck.com/documents/exchange/api#public-trades
98349
98406
  * @param {string} symbol unified symbol of the market to fetch trades for
98350
98407
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
98351
98408
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -98379,6 +98436,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98379
98436
  * @method
98380
98437
  * @name coincheck#fetchTradingFees
98381
98438
  * @description fetch the trading fees for multiple markets
98439
+ * @see https://coincheck.com/documents/exchange/api#account-info
98382
98440
  * @param {object} [params] extra parameters specific to the exchange API endpoint
98383
98441
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
98384
98442
  */
@@ -98425,6 +98483,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98425
98483
  * @method
98426
98484
  * @name coincheck#createOrder
98427
98485
  * @description create a trade order
98486
+ * @see https://coincheck.com/documents/exchange/api#order-new
98428
98487
  * @param {string} symbol unified symbol of the market to create an order in
98429
98488
  * @param {string} type 'market' or 'limit'
98430
98489
  * @param {string} side 'buy' or 'sell'
@@ -98461,6 +98520,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98461
98520
  * @method
98462
98521
  * @name coincheck#cancelOrder
98463
98522
  * @description cancels an open order
98523
+ * @see https://coincheck.com/documents/exchange/api#order-cancel
98464
98524
  * @param {string} id order id
98465
98525
  * @param {string} symbol not used by coincheck cancelOrder ()
98466
98526
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -98476,6 +98536,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98476
98536
  * @method
98477
98537
  * @name coincheck#fetchDeposits
98478
98538
  * @description fetch all deposits made to an account
98539
+ * @see https://coincheck.com/documents/exchange/api#account-deposits
98479
98540
  * @param {string} code unified currency code
98480
98541
  * @param {int} [since] the earliest time in ms to fetch deposits for
98481
98542
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -98524,6 +98585,7 @@ class coincheck extends _abstract_coincheck_js__WEBPACK_IMPORTED_MODULE_0__/* ["
98524
98585
  * @method
98525
98586
  * @name coincheck#fetchWithdrawals
98526
98587
  * @description fetch all withdrawals made from an account
98588
+ * @see https://coincheck.com/documents/exchange/api#withdraws
98527
98589
  * @param {string} code unified currency code
98528
98590
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
98529
98591
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -106597,6 +106659,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106597
106659
  'fetchPositionsRisk': false,
106598
106660
  'fetchPremiumIndexOHLCV': false,
106599
106661
  'fetchTicker': true,
106662
+ 'fetchTickers': true,
106600
106663
  'fetchTrades': true,
106601
106664
  'fetchTradingFee': true,
106602
106665
  'fetchTradingFees': false,
@@ -106631,6 +106694,8 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106631
106694
  'get': [
106632
106695
  'orderBook',
106633
106696
  'ticker',
106697
+ 'tickerAll',
106698
+ 'products',
106634
106699
  'transactions',
106635
106700
  'tradingPairs',
106636
106701
  ],
@@ -106679,6 +106744,16 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106679
106744
  'unconfirmedEthereumDeposits',
106680
106745
  'unconfirmedLitecoinDeposits',
106681
106746
  'unconfirmedRippleDeposits',
106747
+ 'cancelAllOpenOrders',
106748
+ 'withdrawVirtualCurrency',
106749
+ 'virtualCurrencyDepositAddresses',
106750
+ 'unconfirmedVirtualCurrencyDeposits',
106751
+ 'adaWithdrawal',
106752
+ 'adaDepositAddresses',
106753
+ 'unconfirmedAdaDeposits',
106754
+ 'solWithdrawal',
106755
+ 'solDepositAddresses',
106756
+ 'unconfirmedSolDeposits',
106682
106757
  ],
106683
106758
  },
106684
106759
  },
@@ -106723,6 +106798,8 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106723
106798
  'XRP': 'privatePostRippleWithdrawal',
106724
106799
  'DASH': 'privatePostDashWithdrawal',
106725
106800
  'DAI': 'privatePostDaiWithdrawal',
106801
+ 'ADA': 'privatePostAdaWithdrawal',
106802
+ 'SOL': 'privatePostSolWithdrawal',
106726
106803
  },
106727
106804
  },
106728
106805
  },
@@ -106747,6 +106824,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106747
106824
  * @method
106748
106825
  * @name coinmate#fetchMarkets
106749
106826
  * @description retrieves data on all markets for coinmate
106827
+ * @see https://coinmate.docs.apiary.io/#reference/trading-pairs/get-trading-pairs/get
106750
106828
  * @param {object} [params] extra parameters specific to the exchange API endpoint
106751
106829
  * @returns {object[]} an array of objects representing market data
106752
106830
  */
@@ -106853,6 +106931,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106853
106931
  * @method
106854
106932
  * @name coinmate#fetchBalance
106855
106933
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
106934
+ * @see https://coinmate.docs.apiary.io/#reference/balance/get-balances/post
106856
106935
  * @param {object} [params] extra parameters specific to the exchange API endpoint
106857
106936
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
106858
106937
  */
@@ -106865,6 +106944,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106865
106944
  * @method
106866
106945
  * @name coinmate#fetchOrderBook
106867
106946
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
106947
+ * @see https://coinmate.docs.apiary.io/#reference/order-book/get-order-book/get
106868
106948
  * @param {string} symbol unified symbol of the market to fetch the order book for
106869
106949
  * @param {int} [limit] the maximum amount of order book entries to return
106870
106950
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -106886,6 +106966,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106886
106966
  * @method
106887
106967
  * @name coinmate#fetchTicker
106888
106968
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
106969
+ * @see https://coinmate.docs.apiary.io/#reference/ticker/get-ticker/get
106889
106970
  * @param {string} symbol unified symbol of the market to fetch the ticker for
106890
106971
  * @param {object} [params] extra parameters specific to the exchange API endpoint
106891
106972
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -106896,7 +106977,82 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106896
106977
  'currencyPair': market['id'],
106897
106978
  };
106898
106979
  const response = await this.publicGetTicker(this.extend(request, params));
106899
- const ticker = this.safeValue(response, 'data');
106980
+ //
106981
+ // {
106982
+ // "error": false,
106983
+ // "errorMessage": null,
106984
+ // "data": {
106985
+ // "last": 0.55105,
106986
+ // "high": 0.56439,
106987
+ // "low": 0.54358,
106988
+ // "amount": 37038.993381,
106989
+ // "bid": 0.54595,
106990
+ // "ask": 0.55324,
106991
+ // "change": 3.03659243,
106992
+ // "open": 0.53481,
106993
+ // "timestamp": 1708074779
106994
+ // }
106995
+ // }
106996
+ //
106997
+ const data = this.safeValue(response, 'data');
106998
+ return this.parseTicker(data, market);
106999
+ }
107000
+ async fetchTickers(symbols = undefined, params = {}) {
107001
+ /**
107002
+ * @method
107003
+ * @name coinmate#fetchTickers
107004
+ * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
107005
+ * @see https://coinmate.docs.apiary.io/#reference/ticker/get-ticker-all/get
107006
+ * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
107007
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
107008
+ * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
107009
+ */
107010
+ await this.loadMarkets();
107011
+ symbols = this.marketSymbols(symbols);
107012
+ const response = await this.publicGetTickerAll(params);
107013
+ //
107014
+ // {
107015
+ // "error": false,
107016
+ // "errorMessage": null,
107017
+ // "data": {
107018
+ // "LTC_BTC": {
107019
+ // "last": "0.001337",
107020
+ // "high": "0.001348",
107021
+ // "low": "0.001332",
107022
+ // "amount": "34.75472959",
107023
+ // "bid": "0.001348",
107024
+ // "ask": "0.001356",
107025
+ // "change": "-0.74239050",
107026
+ // "open": "0.001347",
107027
+ // "timestamp": "1708074485"
107028
+ // }
107029
+ // }
107030
+ // }
107031
+ //
107032
+ const data = this.safeValue(response, 'data', {});
107033
+ const keys = Object.keys(data);
107034
+ const result = {};
107035
+ for (let i = 0; i < keys.length; i++) {
107036
+ const market = this.market(keys[i]);
107037
+ const ticker = this.parseTicker(this.safeValue(data, keys[i]), market);
107038
+ result[market['symbol']] = ticker;
107039
+ }
107040
+ return this.filterByArrayTickers(result, 'symbol', symbols);
107041
+ }
107042
+ parseTicker(ticker, market = undefined) {
107043
+ //
107044
+ // {
107045
+ // "last": "0.001337",
107046
+ // "high": "0.001348",
107047
+ // "low": "0.001332",
107048
+ // "amount": "34.75472959",
107049
+ // "bid": "0.001348",
107050
+ // "ask": "0.001356",
107051
+ // "change": "-0.74239050",
107052
+ // "open": "0.001347",
107053
+ // "timestamp": "1708074485"
107054
+ // }
107055
+ //
106900
107056
  const timestamp = this.safeTimestamp(ticker, 'timestamp');
106901
107057
  const last = this.safeNumber(ticker, 'last');
106902
107058
  return this.safeTicker({
@@ -106927,6 +107083,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
106927
107083
  * @method
106928
107084
  * @name coinmate#fetchDepositsWithdrawals
106929
107085
  * @description fetch history of deposits and withdrawals
107086
+ * @see https://coinmate.docs.apiary.io/#reference/transfers/get-transfer-history/post
106930
107087
  * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
106931
107088
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
106932
107089
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
@@ -107039,6 +107196,12 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107039
107196
  * @method
107040
107197
  * @name coinmate#withdraw
107041
107198
  * @description make a withdrawal
107199
+ * @see https://coinmate.docs.apiary.io/#reference/bitcoin-withdrawal-and-deposit/withdraw-bitcoins/post
107200
+ * @see https://coinmate.docs.apiary.io/#reference/litecoin-withdrawal-and-deposit/withdraw-litecoins/post
107201
+ * @see https://coinmate.docs.apiary.io/#reference/ethereum-withdrawal-and-deposit/withdraw-ethereum/post
107202
+ * @see https://coinmate.docs.apiary.io/#reference/ripple-withdrawal-and-deposit/withdraw-ripple/post
107203
+ * @see https://coinmate.docs.apiary.io/#reference/cardano-withdrawal-and-deposit/withdraw-cardano/post
107204
+ * @see https://coinmate.docs.apiary.io/#reference/solana-withdrawal-and-deposit/withdraw-solana/post
107042
107205
  * @param {string} code unified currency code
107043
107206
  * @param {float} amount the amount to withdraw
107044
107207
  * @param {string} address the address to withdraw to
@@ -107092,6 +107255,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107092
107255
  * @method
107093
107256
  * @name coinmate#fetchMyTrades
107094
107257
  * @description fetch all trades made by the user
107258
+ * @see https://coinmate.docs.apiary.io/#reference/trade-history/get-trade-history/post
107095
107259
  * @param {string} symbol unified market symbol
107096
107260
  * @param {int} [since] the earliest time in ms to fetch trades for
107097
107261
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -107184,6 +107348,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107184
107348
  * @method
107185
107349
  * @name coinmate#fetchTrades
107186
107350
  * @description get the list of most recent trades for a particular symbol
107351
+ * @see https://coinmate.docs.apiary.io/#reference/transactions/transactions/get
107187
107352
  * @param {string} symbol unified symbol of the market to fetch trades for
107188
107353
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
107189
107354
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -107221,6 +107386,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107221
107386
  * @method
107222
107387
  * @name coinmate#fetchTradingFee
107223
107388
  * @description fetch the trading fees for a market
107389
+ * @see https://coinmate.docs.apiary.io/#reference/trader-fees/get-trading-fees/post
107224
107390
  * @param {string} symbol unified market symbol
107225
107391
  * @param {object} [params] extra parameters specific to the exchange API endpoint
107226
107392
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -107257,6 +107423,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107257
107423
  * @method
107258
107424
  * @name coinmate#fetchOpenOrders
107259
107425
  * @description fetch all unfilled currently open orders
107426
+ * @see https://coinmate.docs.apiary.io/#reference/order/get-open-orders/post
107260
107427
  * @param {string} symbol unified market symbol
107261
107428
  * @param {int} [since] the earliest time in ms to fetch open orders for
107262
107429
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -107272,6 +107439,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107272
107439
  * @method
107273
107440
  * @name coinmate#fetchOrders
107274
107441
  * @description fetches information on multiple orders made by the user
107442
+ * @see https://coinmate.docs.apiary.io/#reference/order/order-history/post
107275
107443
  * @param {string} symbol unified market symbol of the market orders were made in
107276
107444
  * @param {int} [since] the earliest time in ms to fetch orders for
107277
107445
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -107395,6 +107563,10 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107395
107563
  * @method
107396
107564
  * @name coinmate#createOrder
107397
107565
  * @description create a trade order
107566
+ * @see https://coinmate.docs.apiary.io/#reference/order/buy-limit-order/post
107567
+ * @see https://coinmate.docs.apiary.io/#reference/order/sell-limit-order/post
107568
+ * @see https://coinmate.docs.apiary.io/#reference/order/buy-instant-order/post
107569
+ * @see https://coinmate.docs.apiary.io/#reference/order/sell-instant-order/post
107398
107570
  * @param {string} symbol unified symbol of the market to create an order in
107399
107571
  * @param {string} type 'market' or 'limit'
107400
107572
  * @param {string} side 'buy' or 'sell'
@@ -107435,6 +107607,8 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107435
107607
  * @method
107436
107608
  * @name coinmate#fetchOrder
107437
107609
  * @description fetches information on an order made by the user
107610
+ * @see https://coinmate.docs.apiary.io/#reference/order/get-order-by-orderid/post
107611
+ * @see https://coinmate.docs.apiary.io/#reference/order/get-order-by-clientorderid/post
107438
107612
  * @param {string} symbol unified symbol of the market the order was made in
107439
107613
  * @param {object} [params] extra parameters specific to the exchange API endpoint
107440
107614
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -107456,6 +107630,7 @@ class coinmate extends _abstract_coinmate_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
107456
107630
  * @method
107457
107631
  * @name coinmate#cancelOrder
107458
107632
  * @description cancels an open order
107633
+ * @see https://coinmate.docs.apiary.io/#reference/order/cancel-order/post
107459
107634
  * @param {string} id order id
107460
107635
  * @param {string} symbol not used by coinmate cancelOrder ()
107461
107636
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -112772,6 +112947,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
112772
112947
  * @method
112773
112948
  * @name coinspot#fetchBalance
112774
112949
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
112950
+ * @see https://www.coinspot.com.au/api#listmybalance
112775
112951
  * @param {object} [params] extra parameters specific to the exchange API endpoint
112776
112952
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
112777
112953
  */
@@ -112801,6 +112977,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
112801
112977
  * @method
112802
112978
  * @name coinspot#fetchOrderBook
112803
112979
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
112980
+ * @see https://www.coinspot.com.au/api#listopenorders
112804
112981
  * @param {string} symbol unified symbol of the market to fetch the order book for
112805
112982
  * @param {int} [limit] the maximum amount of order book entries to return
112806
112983
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -112854,6 +113031,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
112854
113031
  * @method
112855
113032
  * @name coinspot#fetchTicker
112856
113033
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
113034
+ * @see https://www.coinspot.com.au/api#latestprices
112857
113035
  * @param {string} symbol unified symbol of the market to fetch the ticker for
112858
113036
  * @param {object} [params] extra parameters specific to the exchange API endpoint
112859
113037
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -112927,6 +113105,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
112927
113105
  * @method
112928
113106
  * @name coinspot#fetchTrades
112929
113107
  * @description get the list of most recent trades for a particular symbol
113108
+ * @see https://www.coinspot.com.au/api#orderhistory
112930
113109
  * @param {string} symbol unified symbol of the market to fetch trades for
112931
113110
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
112932
113111
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -112955,6 +113134,7 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
112955
113134
  * @method
112956
113135
  * @name coinspot#fetchMyTrades
112957
113136
  * @description fetch all trades made by the user
113137
+ * @see https://www.coinspot.com.au/api#rotransaction
112958
113138
  * @param {string} symbol unified market symbol
112959
113139
  * @param {int} [since] the earliest time in ms to fetch trades for
112960
113140
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -113110,6 +113290,8 @@ class coinspot extends _abstract_coinspot_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
113110
113290
  * @method
113111
113291
  * @name coinspot#cancelOrder
113112
113292
  * @description cancels an open order
113293
+ * @see https://www.coinspot.com.au/api#cancelbuyorder
113294
+ * @see https://www.coinspot.com.au/api#cancelsellorder
113113
113295
  * @param {string} id order id
113114
113296
  * @param {string} symbol not used by coinspot cancelOrder ()
113115
113297
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -115471,13 +115653,13 @@ class cryptocom extends _abstract_cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["
115471
115653
  * @method
115472
115654
  * @name cryptocom#fetchDepositWithdrawFees
115473
115655
  * @description fetch deposit and withdraw fees
115474
- * @see https://exchange-docs.crypto.com/spot/index.html#private-get-currency-networks
115656
+ * @see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
115475
115657
  * @param {string[]|undefined} codes list of unified currency codes
115476
115658
  * @param {object} [params] extra parameters specific to the exchange API endpoint
115477
115659
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
115478
115660
  */
115479
115661
  await this.loadMarkets();
115480
- const response = await this.v2PrivatePostPrivateGetCurrencyNetworks(params);
115662
+ const response = await this.v1PrivatePostPrivateGetCurrencyNetworks(params);
115481
115663
  const data = this.safeValue(response, 'result');
115482
115664
  const currencyMap = this.safeValue(data, 'currency_map');
115483
115665
  return this.parseDepositWithdrawFees(currencyMap, codes, 'full_name');
@@ -141004,6 +141186,8 @@ class hitbtc extends _abstract_hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
141004
141186
  'public/orderbook/{symbol}': 10,
141005
141187
  'public/candles': 10,
141006
141188
  'public/candles/{symbol}': 10,
141189
+ 'public/converted/candles': 10,
141190
+ 'public/converted/candles/{symbol}': 10,
141007
141191
  'public/futures/info': 10,
141008
141192
  'public/futures/info/{symbol}': 10,
141009
141193
  'public/futures/history/funding': 10,
@@ -157640,6 +157824,9 @@ class idex extends _abstract_idex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
157640
157824
  'fetchCrossBorrowRates': false,
157641
157825
  'fetchCurrencies': true,
157642
157826
  'fetchDeposit': true,
157827
+ 'fetchDepositAddress': true,
157828
+ 'fetchDepositAddresses': false,
157829
+ 'fetchDepositAddressesByNetwork': false,
157643
157830
  'fetchDeposits': true,
157644
157831
  'fetchFundingHistory': false,
157645
157832
  'fetchFundingRate': false,
@@ -157699,7 +157886,7 @@ class idex extends _abstract_idex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
157699
157886
  },
157700
157887
  'www': 'https://idex.io',
157701
157888
  'doc': [
157702
- 'https://docs.idex.io/',
157889
+ 'https://api-docs-v3.idex.io/',
157703
157890
  ],
157704
157891
  },
157705
157892
  'api': {
@@ -159287,6 +159474,62 @@ class idex extends _abstract_idex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
159287
159474
  const authenticated = hasApiKey && hasSecret && hasWalletAddress && hasPrivateKey;
159288
159475
  return authenticated ? (defaultCost / 2) : defaultCost;
159289
159476
  }
159477
+ async fetchDepositAddress(code = undefined, params = {}) {
159478
+ /**
159479
+ * @method
159480
+ * @name idex#fetchDepositAddress
159481
+ * @description fetch the Polygon address of the wallet
159482
+ * @see https://api-docs-v3.idex.io/#get-wallets
159483
+ * @param {string} code not used by idex
159484
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
159485
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
159486
+ */
159487
+ const request = {};
159488
+ request['nonce'] = this.uuidv1();
159489
+ const response = await this.privateGetWallets(this.extend(request, params));
159490
+ //
159491
+ // [
159492
+ // {
159493
+ // address: "0x37A1827CA64C94A26028bDCb43FBDCB0bf6DAf5B",
159494
+ // totalPortfolioValueUsd: "0.00",
159495
+ // time: "1678342148086"
159496
+ // },
159497
+ // {
159498
+ // address: "0x0Ef3456E616552238B0c562d409507Ed6051A7b3",
159499
+ // totalPortfolioValueUsd: "15.90",
159500
+ // time: "1691697811659"
159501
+ // }
159502
+ // ]
159503
+ //
159504
+ return this.parseDepositAddress(response);
159505
+ }
159506
+ parseDepositAddress(depositAddress, currency = undefined) {
159507
+ //
159508
+ // [
159509
+ // {
159510
+ // address: "0x37A1827CA64C94A26028bDCb43FBDCB0bf6DAf5B",
159511
+ // totalPortfolioValueUsd: "0.00",
159512
+ // time: "1678342148086"
159513
+ // },
159514
+ // {
159515
+ // address: "0x0Ef3456E616552238B0c562d409507Ed6051A7b3",
159516
+ // totalPortfolioValueUsd: "15.90",
159517
+ // time: "1691697811659"
159518
+ // }
159519
+ // ]
159520
+ //
159521
+ const length = depositAddress.length;
159522
+ const entry = this.safeDict(depositAddress, length - 1);
159523
+ const address = this.safeString(entry, 'address');
159524
+ this.checkAddress(address);
159525
+ return {
159526
+ 'info': depositAddress,
159527
+ 'currency': undefined,
159528
+ 'address': address,
159529
+ 'tag': undefined,
159530
+ 'network': 'MATIC',
159531
+ };
159532
+ }
159290
159533
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
159291
159534
  const network = this.safeString(this.options, 'network', 'ETH');
159292
159535
  const version = this.safeString(this.options, 'version', 'v1');
@@ -175770,6 +176013,9 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
175770
176013
  'fetchCrossBorrowRate': false,
175771
176014
  'fetchCrossBorrowRates': false,
175772
176015
  'fetchCurrencies': true,
176016
+ 'fetchDepositAddress': false,
176017
+ 'fetchDepositAddresses': false,
176018
+ 'fetchDepositAddressesByNetwork': false,
175773
176019
  'fetchDepositsWithdrawals': true,
175774
176020
  'fetchDepositWithdrawFees': false,
175775
176021
  'fetchIsolatedBorrowRate': false,
@@ -182819,6 +183065,9 @@ class mercado extends _abstract_mercado_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
182819
183065
  'fetchBorrowRateHistory': false,
182820
183066
  'fetchCrossBorrowRate': false,
182821
183067
  'fetchCrossBorrowRates': false,
183068
+ 'fetchDepositAddress': false,
183069
+ 'fetchDepositAddresses': false,
183070
+ 'fetchDepositAddressesByNetwork': false,
182822
183071
  'fetchFundingHistory': false,
182823
183072
  'fetchFundingRate': false,
182824
183073
  'fetchFundingRateHistory': false,
@@ -193268,6 +193517,9 @@ class oceanex extends _abstract_oceanex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
193268
193517
  'fetchClosedOrders': true,
193269
193518
  'fetchCrossBorrowRate': false,
193270
193519
  'fetchCrossBorrowRates': false,
193520
+ 'fetchDepositAddress': false,
193521
+ 'fetchDepositAddresses': false,
193522
+ 'fetchDepositAddressesByNetwork': false,
193271
193523
  'fetchIsolatedBorrowRate': false,
193272
193524
  'fetchIsolatedBorrowRates': false,
193273
193525
  'fetchMarkets': true,
@@ -197767,6 +198019,7 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
197767
198019
  'account/quick-margin-borrow-repay': 4,
197768
198020
  'account/borrow-repay': 5 / 3,
197769
198021
  'account/simulated_margin': 10,
198022
+ 'account/position-builder': 10,
197770
198023
  'account/set-riskOffset-type': 2,
197771
198024
  'account/activate-option': 4,
197772
198025
  'account/set-auto-loan': 4,
@@ -225730,13 +225983,15 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
225730
225983
  const rawOrderBook = this.safeValue(data, 0);
225731
225984
  const timestamp = this.safeInteger(rawOrderBook, 'ts');
225732
225985
  const incrementalBook = channel === 'books';
225733
- let storedOrderBook = undefined;
225734
225986
  if (incrementalBook) {
225735
- storedOrderBook = this.safeValue(this.orderbooks, symbol);
225736
- if (storedOrderBook === undefined) {
225737
- storedOrderBook = this.countedOrderBook({});
225738
- storedOrderBook['symbol'] = symbol;
225987
+ // storedOrderBook = this.safeValue (this.orderbooks, symbol);
225988
+ if (!(symbol in this.orderbooks)) {
225989
+ // const ob = this.orderBook ({});
225990
+ const ob = this.countedOrderBook({});
225991
+ ob['symbol'] = symbol;
225992
+ this.orderbooks[symbol] = ob;
225739
225993
  }
225994
+ const storedOrderBook = this.orderbooks[symbol];
225740
225995
  const asks = this.safeValue(rawOrderBook, 'asks', []);
225741
225996
  const bids = this.safeValue(rawOrderBook, 'bids', []);
225742
225997
  this.handleDeltas(storedOrderBook['asks'], asks);
@@ -225771,10 +226026,12 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
225771
226026
  }
225772
226027
  }
225773
226028
  else {
225774
- storedOrderBook = this.parseOrderBook(rawOrderBook, symbol, timestamp);
226029
+ const orderbook = this.orderBook({});
226030
+ const parsedOrderbook = this.parseOrderBook(rawOrderBook, symbol, timestamp);
226031
+ orderbook.reset(parsedOrderbook);
226032
+ this.orderbooks[symbol] = orderbook;
225775
226033
  }
225776
- this.orderbooks[symbol] = storedOrderBook;
225777
- client.resolve(storedOrderBook, messageHash);
226034
+ client.resolve(this.orderbooks[symbol], messageHash);
225778
226035
  }
225779
226036
  handleDelta(bookside, delta) {
225780
226037
  const bidAsk = this.parseBidAsk(delta, 0, 1);
@@ -228274,13 +228531,13 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
228274
228531
  const update = datas[i];
228275
228532
  const marketId = this.safeString(update, 'symbol');
228276
228533
  const symbol = this.safeSymbol(marketId);
228277
- let orderbook = this.safeDict(this.orderbooks, symbol);
228278
- if (orderbook === undefined) {
228279
- orderbook = this.orderBook({}, limit);
228280
- orderbook['symbol'] = symbol;
228281
- this.orderbooks[symbol] = orderbook;
228534
+ if (!(symbol in this.orderbooks)) {
228535
+ const ob = this.orderBook({}, limit);
228536
+ ob['symbol'] = symbol;
228537
+ this.orderbooks[symbol] = ob;
228282
228538
  }
228283
- const type = this.safeValue(update, 'type');
228539
+ const orderbook = this.orderbooks[symbol];
228540
+ const type = this.safeString(update, 'type');
228284
228541
  if ((type === 'snapshot') || (!(channelName.indexOf('increase') >= 0))) {
228285
228542
  orderbook.reset({});
228286
228543
  }
@@ -228304,12 +228561,12 @@ class bitmart extends _bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
228304
228561
  const depths = data['depths'];
228305
228562
  const marketId = this.safeString(data, 'symbol');
228306
228563
  const symbol = this.safeSymbol(marketId);
228307
- let orderbook = this.safeDict(this.orderbooks, symbol);
228308
- if (orderbook === undefined) {
228309
- orderbook = this.orderBook({}, limit);
228310
- orderbook['symbol'] = symbol;
228311
- this.orderbooks[symbol] = orderbook;
228564
+ if (!(symbol in this.orderbooks)) {
228565
+ const ob = this.orderBook({}, limit);
228566
+ ob['symbol'] = symbol;
228567
+ this.orderbooks[symbol] = ob;
228312
228568
  }
228569
+ const orderbook = this.orderbooks[symbol];
228313
228570
  const way = this.safeNumber(data, 'way');
228314
228571
  const side = (way === 1) ? 'bids' : 'asks';
228315
228572
  if (way === 1) {
@@ -228888,11 +229145,11 @@ class bitmex extends _bitmex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
228888
229145
  const market = this.safeMarket(marketId);
228889
229146
  const symbol = market['symbol'];
228890
229147
  const messageHash = table + ':' + marketId;
228891
- let ticker = this.safeDict(this.tickers, symbol, {});
229148
+ const ticker = this.safeDict(this.tickers, symbol, {});
228892
229149
  const info = this.safeDict(ticker, 'info', {});
228893
- ticker = this.parseTicker(this.extend(info, update), market);
228894
- tickers[symbol] = ticker;
228895
- this.tickers[symbol] = ticker;
229150
+ const parsedTicker = this.parseTicker(this.extend(info, update), market);
229151
+ tickers[symbol] = parsedTicker;
229152
+ this.tickers[symbol] = parsedTicker;
228896
229153
  client.resolve(ticker, messageHash);
228897
229154
  }
228898
229155
  client.resolve(tickers, 'instrument');
@@ -235888,7 +236145,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
235888
236145
  stored.append(parsed);
235889
236146
  }
235890
236147
  const messageHash = 'trades';
235891
- this.trades = stored;
236148
+ this.trades = stored; // trades don't have symbol
235892
236149
  client.resolve(this.trades, messageHash);
235893
236150
  }
235894
236151
  parseWsOldTrade(trade, market = undefined) {
@@ -235932,7 +236189,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
235932
236189
  // }
235933
236190
  //
235934
236191
  const data = this.safeValue(message, 'data', []);
235935
- const stored = this.trades;
236192
+ const stored = this.trades; // to do fix this, this.trades is not meant to be used like this
235936
236193
  for (let i = 0; i < data.length; i++) {
235937
236194
  const rawTrade = data[i];
235938
236195
  const parsed = this.parseWsOldTrade(rawTrade);
@@ -245472,10 +245729,11 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
245472
245729
  const market = this.safeMarket(marketId.toLowerCase());
245473
245730
  const symbol = market['symbol'];
245474
245731
  const messageHash = 'orderbook:' + symbol;
245475
- let orderbook = this.safeDict(this.orderbooks, symbol);
245476
- if (orderbook === undefined) {
245477
- orderbook = this.orderBook();
245732
+ if (!(symbol in this.orderbooks)) {
245733
+ const ob = this.orderBook();
245734
+ this.orderbooks[symbol] = ob;
245478
245735
  }
245736
+ const orderbook = this.orderbooks[symbol];
245479
245737
  const bids = orderbook['bids'];
245480
245738
  const asks = orderbook['asks'];
245481
245739
  for (let i = 0; i < rawOrderBookChanges.length; i++) {
@@ -282094,6 +282352,9 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
282094
282352
  'fetchCrossBorrowRates': false,
282095
282353
  'fetchCurrencies': true,
282096
282354
  'fetchDeposit': false,
282355
+ 'fetchDepositAddress': true,
282356
+ 'fetchDepositAddresses': false,
282357
+ 'fetchDepositAddressesByNetwork': false,
282097
282358
  'fetchDeposits': true,
282098
282359
  'fetchFundingHistory': false,
282099
282360
  'fetchFundingRate': false,
@@ -283574,7 +283835,69 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283574
283835
  'trades': rawTrades,
283575
283836
  }, market);
283576
283837
  }
283838
+ async fetchDepositAddress(code, params = {}) {
283839
+ /**
283840
+ * @method
283841
+ * @name timex#fetchDepositAddress
283842
+ * @description fetch the deposit address for a currency associated with this account, does not accept params["network"]
283843
+ * @param {string} code unified currency code
283844
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
283845
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
283846
+ */
283847
+ await this.loadMarkets();
283848
+ const currency = this.currency(code);
283849
+ const request = {
283850
+ 'symbol': currency['code'],
283851
+ };
283852
+ const response = await this.currenciesGetSSymbol(this.extend(request, params));
283853
+ //
283854
+ // {
283855
+ // id: '1',
283856
+ // currency: {
283857
+ // symbol: 'BTC',
283858
+ // name: 'Bitcoin',
283859
+ // address: '0x8370fbc6ddec1e18b4e41e72ed943e238458487c',
283860
+ // decimals: '8',
283861
+ // tradeDecimals: '20',
283862
+ // fiatSymbol: 'BTC',
283863
+ // depositEnabled: true,
283864
+ // withdrawalEnabled: true,
283865
+ // transferEnabled: true,
283866
+ // active: true
283867
+ // }
283868
+ // }
283869
+ //
283870
+ const data = this.safeDict(response, 'currency', {});
283871
+ return this.parseDepositAddress(data, currency);
283872
+ }
283873
+ parseDepositAddress(depositAddress, currency = undefined) {
283874
+ //
283875
+ // {
283876
+ // symbol: 'BTC',
283877
+ // name: 'Bitcoin',
283878
+ // address: '0x8370fbc6ddec1e18b4e41e72ed943e238458487c',
283879
+ // decimals: '8',
283880
+ // tradeDecimals: '20',
283881
+ // fiatSymbol: 'BTC',
283882
+ // depositEnabled: true,
283883
+ // withdrawalEnabled: true,
283884
+ // transferEnabled: true,
283885
+ // active: true
283886
+ // }
283887
+ //
283888
+ const currencyId = this.safeString(depositAddress, 'symbol');
283889
+ return {
283890
+ 'info': depositAddress,
283891
+ 'currency': this.safeCurrencyCode(currencyId, currency),
283892
+ 'address': this.safeString(depositAddress, 'address'),
283893
+ 'tag': undefined,
283894
+ 'network': undefined,
283895
+ };
283896
+ }
283577
283897
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
283898
+ const paramsToExtract = this.extractParams(path);
283899
+ path = this.implodeParams(path, params);
283900
+ params = this.omit(params, paramsToExtract);
283578
283901
  let url = this.urls['api']['rest'] + '/' + api + '/' + path;
283579
283902
  if (Object.keys(params).length) {
283580
283903
  url += '?' + this.urlencodeWithArrayRepeat(params);
@@ -306308,7 +306631,7 @@ SOFTWARE.
306308
306631
 
306309
306632
  //-----------------------------------------------------------------------------
306310
306633
  // this is updated by vss.js when building
306311
- const version = '4.2.45';
306634
+ const version = '4.2.46';
306312
306635
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
306313
306636
  //-----------------------------------------------------------------------------
306314
306637