ccxt 4.2.48 → 4.2.50

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 (67) hide show
  1. package/README.md +3 -3
  2. package/build.sh +7 -0
  3. package/dist/ccxt.browser.js +598 -48
  4. package/dist/ccxt.browser.min.js +3 -3
  5. package/dist/cjs/ccxt.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +5 -0
  7. package/dist/cjs/src/binance.js +9 -4
  8. package/dist/cjs/src/bitmart.js +30 -4
  9. package/dist/cjs/src/bitstamp.js +8 -0
  10. package/dist/cjs/src/bl3p.js +47 -0
  11. package/dist/cjs/src/btcalpha.js +4 -0
  12. package/dist/cjs/src/btcmarkets.js +4 -0
  13. package/dist/cjs/src/btcturk.js +4 -0
  14. package/dist/cjs/src/bybit.js +138 -6
  15. package/dist/cjs/src/independentreserve.js +48 -0
  16. package/dist/cjs/src/latoken.js +16 -0
  17. package/dist/cjs/src/luno.js +18 -0
  18. package/dist/cjs/src/lykke.js +19 -0
  19. package/dist/cjs/src/ndax.js +18 -0
  20. package/dist/cjs/src/pro/ascendex.js +22 -7
  21. package/dist/cjs/src/pro/bequant.js +3 -4
  22. package/dist/cjs/src/pro/binance.js +29 -2
  23. package/dist/cjs/src/pro/bitget.js +28 -7
  24. package/dist/cjs/src/pro/bitstamp.js +1 -1
  25. package/dist/cjs/src/pro/gemini.js +89 -1
  26. package/dist/cjs/src/pro/mexc.js +2 -1
  27. package/dist/cjs/src/pro/whitebit.js +9 -8
  28. package/dist/cjs/src/timex.js +35 -1
  29. package/dist/cjs/src/upbit.js +11 -2
  30. package/js/ccxt.d.ts +1 -1
  31. package/js/ccxt.js +1 -1
  32. package/js/src/abstract/bitstamp.d.ts +8 -0
  33. package/js/src/base/Exchange.d.ts +1 -0
  34. package/js/src/base/Exchange.js +5 -0
  35. package/js/src/binance.js +9 -4
  36. package/js/src/bitmart.js +30 -4
  37. package/js/src/bitstamp.js +8 -0
  38. package/js/src/bl3p.d.ts +15 -1
  39. package/js/src/bl3p.js +47 -0
  40. package/js/src/btcalpha.js +4 -0
  41. package/js/src/btcmarkets.js +4 -0
  42. package/js/src/btcturk.js +4 -0
  43. package/js/src/bybit.d.ts +3 -1
  44. package/js/src/bybit.js +138 -6
  45. package/js/src/independentreserve.d.ts +15 -1
  46. package/js/src/independentreserve.js +48 -0
  47. package/js/src/latoken.js +16 -0
  48. package/js/src/luno.js +18 -0
  49. package/js/src/lykke.js +19 -0
  50. package/js/src/ndax.js +18 -0
  51. package/js/src/pro/ascendex.d.ts +1 -0
  52. package/js/src/pro/ascendex.js +22 -7
  53. package/js/src/pro/bequant.js +3 -4
  54. package/js/src/pro/binance.d.ts +1 -0
  55. package/js/src/pro/binance.js +29 -2
  56. package/js/src/pro/bitget.js +28 -7
  57. package/js/src/pro/bitstamp.js +1 -1
  58. package/js/src/pro/gemini.d.ts +3 -1
  59. package/js/src/pro/gemini.js +89 -1
  60. package/js/src/pro/mexc.js +2 -1
  61. package/js/src/pro/whitebit.js +9 -8
  62. package/js/src/static_dependencies/jsencrypt/lib/jsbn/jsbn.d.ts +1 -1
  63. package/js/src/timex.d.ts +1 -0
  64. package/js/src/timex.js +35 -1
  65. package/js/src/upbit.js +11 -2
  66. package/package.json +3 -1
  67. package/skip-tests.json +4 -3
@@ -9296,6 +9296,11 @@ class Exchange {
9296
9296
  this.codes = Object.keys(currenciesSortedByCode);
9297
9297
  return this.markets;
9298
9298
  }
9299
+ getDescribeForExtendedWsExchange(currentRestInstance, parentRestInstance, wsBaseDescribe) {
9300
+ const extendedRestDescribe = this.deepExtend(parentRestInstance.describe(), currentRestInstance.describe());
9301
+ const superWithRestDescribe = this.deepExtend(extendedRestDescribe, wsBaseDescribe);
9302
+ return superWithRestDescribe;
9303
+ }
9299
9304
  safeBalance(balance) {
9300
9305
  const balances = this.omit(balance, ['info', 'timestamp', 'datetime', 'free', 'used', 'total']);
9301
9306
  const codes = Object.keys(balances);
@@ -18105,6 +18110,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
18105
18110
  'createMarketSellOrderWithCost': true,
18106
18111
  'createOrder': true,
18107
18112
  'createOrders': true,
18113
+ 'createOrderWithTakeProfitAndStopLoss': true,
18108
18114
  'createPostOnlyOrder': true,
18109
18115
  'createReduceOnlyOrder': true,
18110
18116
  'createStopLimitOrder': true,
@@ -18178,7 +18184,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
18178
18184
  'fetchTradingFee': true,
18179
18185
  'fetchTradingFees': true,
18180
18186
  'fetchTradingLimits': undefined,
18181
- 'fetchTransactionFee': undefined,
18187
+ 'fetchTransactionFee': 'emulated',
18182
18188
  'fetchTransactionFees': true,
18183
18189
  'fetchTransactions': false,
18184
18190
  'fetchTransfers': true,
@@ -21076,7 +21082,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21076
21082
  let fees = this.fees;
21077
21083
  let linear = undefined;
21078
21084
  let inverse = undefined;
21079
- const strike = this.safeInteger(market, 'strikePrice');
21085
+ const strike = this.safeString(market, 'strikePrice');
21080
21086
  let symbol = base + '/' + quote;
21081
21087
  if (contract) {
21082
21088
  if (swap) {
@@ -21086,7 +21092,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21086
21092
  symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry);
21087
21093
  }
21088
21094
  else if (option) {
21089
- symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry) + '-' + this.numberToString(strike) + '-' + this.safeString(optionParts, 3);
21095
+ symbol = symbol + ':' + settle + '-' + this.yymmdd(expiry) + '-' + strike + '-' + this.safeString(optionParts, 3);
21090
21096
  }
21091
21097
  contractSize = this.safeNumber2(market, 'contractSize', 'unit', this.parseNumber('1'));
21092
21098
  linear = settle === quote;
@@ -21119,6 +21125,10 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21119
21125
  unifiedType = 'option';
21120
21126
  active = undefined;
21121
21127
  }
21128
+ let parsedStrike = undefined;
21129
+ if (strike !== undefined) {
21130
+ parsedStrike = this.parseToNumeric(strike);
21131
+ }
21122
21132
  const entry = {
21123
21133
  'id': id,
21124
21134
  'lowercaseId': lowercaseId,
@@ -21144,7 +21154,7 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
21144
21154
  'contractSize': contractSize,
21145
21155
  'expiry': expiry,
21146
21156
  'expiryDatetime': this.iso8601(expiry),
21147
- 'strike': strike,
21157
+ 'strike': parsedStrike,
21148
21158
  'optionType': this.safeStringLower(market, 'side'),
21149
21159
  'precision': {
21150
21160
  'amount': this.safeInteger2(market, 'quantityPrecision', 'quantityScale'),
@@ -55755,7 +55765,7 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
55755
55765
  }
55756
55766
  parseTicker(ticker, market = undefined) {
55757
55767
  //
55758
- // spot
55768
+ // spot (REST)
55759
55769
  //
55760
55770
  // {
55761
55771
  // "symbol": "SOLAR_USDT",
@@ -55775,6 +55785,17 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
55775
55785
  // "timestamp": 1667403439367
55776
55786
  // }
55777
55787
  //
55788
+ // spot (WS)
55789
+ // {
55790
+ // "symbol":"BTC_USDT",
55791
+ // "last_price":"146.24",
55792
+ // "open_24h":"147.17",
55793
+ // "high_24h":"147.48",
55794
+ // "low_24h":"143.88",
55795
+ // "base_volume_24h":"117387.58", // NOT base, but quote currency!!!
55796
+ // "s_t": 1610936002
55797
+ // }
55798
+ //
55778
55799
  // swap
55779
55800
  //
55780
55801
  // {
@@ -55790,7 +55811,11 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
55790
55811
  // "legal_coin_price":"0.1302699"
55791
55812
  // }
55792
55813
  //
55793
- const timestamp = this.safeInteger(ticker, 'timestamp');
55814
+ let timestamp = this.safeInteger(ticker, 'timestamp');
55815
+ if (timestamp === undefined) {
55816
+ // ticker from WS has a different field (in seconds)
55817
+ timestamp = this.safeIntegerProduct(ticker, 's_t', 1000);
55818
+ }
55794
55819
  const marketId = this.safeString2(ticker, 'symbol', 'contract_symbol');
55795
55820
  market = this.safeMarket(marketId, market);
55796
55821
  const symbol = market['symbol'];
@@ -55806,9 +55831,20 @@ class bitmart extends _abstract_bitmart_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
55806
55831
  percentage = '0';
55807
55832
  }
55808
55833
  }
55809
- const baseVolume = this.safeString(ticker, 'base_volume_24h');
55834
+ let baseVolume = this.safeString(ticker, 'base_volume_24h');
55810
55835
  let quoteVolume = this.safeString(ticker, 'quote_volume_24h');
55811
- quoteVolume = this.safeString(ticker, 'volume_24h', quoteVolume);
55836
+ if (quoteVolume === undefined) {
55837
+ if (baseVolume === undefined) {
55838
+ // this is swap
55839
+ quoteVolume = this.safeString(ticker, 'volume_24h', quoteVolume);
55840
+ }
55841
+ else {
55842
+ // this is a ticker from websockets
55843
+ // contrary to name and documentation, base_volume_24h is actually the quote volume
55844
+ quoteVolume = baseVolume;
55845
+ baseVolume = undefined;
55846
+ }
55847
+ }
55812
55848
  const average = this.safeString2(ticker, 'avg_price', 'index_price');
55813
55849
  const high = this.safeString2(ticker, 'high_24h', 'high_price');
55814
55850
  const low = this.safeString2(ticker, 'low_24h', 'low_price');
@@ -69148,6 +69184,14 @@ class bitstamp extends _abstract_bitstamp_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
69148
69184
  'eurcv_address/': 1,
69149
69185
  'pyusd_withdrawal/': 1,
69150
69186
  'pyusd_address/': 1,
69187
+ 'lmwr_withdrawal/': 1,
69188
+ 'lmwr_address/': 1,
69189
+ 'pepe_withdrawal/': 1,
69190
+ 'pepe_address/': 1,
69191
+ 'blur_withdrawal/': 1,
69192
+ 'blur_address/': 1,
69193
+ 'vext_withdrawal/': 1,
69194
+ 'vext_address/': 1,
69151
69195
  },
69152
69196
  },
69153
69197
  },
@@ -75454,6 +75498,7 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
75454
75498
  'cancelOrder': true,
75455
75499
  'closeAllPositions': false,
75456
75500
  'closePosition': false,
75501
+ 'createDepositAddress': true,
75457
75502
  'createOrder': true,
75458
75503
  'createReduceOnlyOrder': false,
75459
75504
  'createStopLimitOrder': false,
@@ -75464,6 +75509,9 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
75464
75509
  'fetchBorrowRateHistory': false,
75465
75510
  'fetchCrossBorrowRate': false,
75466
75511
  'fetchCrossBorrowRates': false,
75512
+ 'fetchDepositAddress': false,
75513
+ 'fetchDepositAddresses': false,
75514
+ 'fetchDepositAddressesByNetwork': false,
75467
75515
  'fetchFundingHistory': false,
75468
75516
  'fetchFundingRate': false,
75469
75517
  'fetchFundingRateHistory': false,
@@ -75845,6 +75893,49 @@ class bl3p extends _abstract_bl3p_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
75845
75893
  };
75846
75894
  return await this.privatePostMarketMoneyOrderCancel(this.extend(request, params));
75847
75895
  }
75896
+ async createDepositAddress(code, params = {}) {
75897
+ /**
75898
+ * @method
75899
+ * @name bl3p#createDepositAddress
75900
+ * @description create a currency deposit address
75901
+ * @see https://github.com/BitonicNL/bl3p-api/blob/master/docs/authenticated_api/http.md#32---create-a-new-deposit-address
75902
+ * @param {string} code unified currency code of the currency for the deposit address
75903
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
75904
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
75905
+ */
75906
+ await this.loadMarkets();
75907
+ const currency = this.currency(code);
75908
+ const request = {
75909
+ 'currency': currency['id'],
75910
+ };
75911
+ const response = await this.privatePostGENMKTMoneyNewDepositAddress(this.extend(request, params));
75912
+ //
75913
+ // {
75914
+ // "result": "success",
75915
+ // "data": {
75916
+ // "address": "36Udu9zi1uYicpXcJpoKfv3bewZeok5tpk"
75917
+ // }
75918
+ // }
75919
+ //
75920
+ const data = this.safeDict(response, 'data');
75921
+ return this.parseDepositAddress(data, currency);
75922
+ }
75923
+ parseDepositAddress(depositAddress, currency = undefined) {
75924
+ //
75925
+ // {
75926
+ // "address": "36Udu9zi1uYicpXcJpoKfv3bewZeok5tpk"
75927
+ // }
75928
+ //
75929
+ const address = this.safeString(depositAddress, 'address');
75930
+ this.checkAddress(address);
75931
+ return {
75932
+ 'info': depositAddress,
75933
+ 'currency': this.safeString(currency, 'code'),
75934
+ 'address': address,
75935
+ 'tag': undefined,
75936
+ 'network': undefined,
75937
+ };
75938
+ }
75848
75939
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
75849
75940
  const request = this.implodeParams(path, params);
75850
75941
  let url = this.urls['api']['rest'] + '/' + this.version + '/' + request;
@@ -79221,6 +79312,7 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
79221
79312
  'cancelOrder': true,
79222
79313
  'closeAllPositions': false,
79223
79314
  'closePosition': false,
79315
+ 'createDepositAddress': false,
79224
79316
  'createOrder': true,
79225
79317
  'createReduceOnlyOrder': false,
79226
79318
  'createStopLimitOrder': false,
@@ -79233,6 +79325,9 @@ class btcalpha extends _abstract_btcalpha_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
79233
79325
  'fetchCrossBorrowRate': false,
79234
79326
  'fetchCrossBorrowRates': false,
79235
79327
  'fetchDeposit': false,
79328
+ 'fetchDepositAddress': false,
79329
+ 'fetchDepositAddresses': false,
79330
+ 'fetchDepositAddressesByNetwork': false,
79236
79331
  'fetchDeposits': true,
79237
79332
  'fetchFundingHistory': false,
79238
79333
  'fetchFundingRate': false,
@@ -80755,6 +80850,7 @@ class btcmarkets extends _abstract_btcmarkets_js__WEBPACK_IMPORTED_MODULE_0__/*
80755
80850
  'cancelOrders': true,
80756
80851
  'closeAllPositions': false,
80757
80852
  'closePosition': false,
80853
+ 'createDepositAddress': false,
80758
80854
  'createOrder': true,
80759
80855
  'createReduceOnlyOrder': false,
80760
80856
  'fetchBalance': true,
@@ -80763,6 +80859,9 @@ class btcmarkets extends _abstract_btcmarkets_js__WEBPACK_IMPORTED_MODULE_0__/*
80763
80859
  'fetchClosedOrders': 'emulated',
80764
80860
  'fetchCrossBorrowRate': false,
80765
80861
  'fetchCrossBorrowRates': false,
80862
+ 'fetchDepositAddress': false,
80863
+ 'fetchDepositAddresses': false,
80864
+ 'fetchDepositAddressesByNetwork': false,
80766
80865
  'fetchDeposits': true,
80767
80866
  'fetchDepositsWithdrawals': true,
80768
80867
  'fetchFundingHistory': false,
@@ -82020,6 +82119,7 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82020
82119
  'cancelOrder': true,
82021
82120
  'closeAllPositions': false,
82022
82121
  'closePosition': false,
82122
+ 'createDepositAddress': false,
82023
82123
  'createOrder': true,
82024
82124
  'createReduceOnlyOrder': false,
82025
82125
  'fetchBalance': true,
@@ -82027,6 +82127,9 @@ class btcturk extends _abstract_btcturk_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
82027
82127
  'fetchBorrowRateHistory': false,
82028
82128
  'fetchCrossBorrowRate': false,
82029
82129
  'fetchCrossBorrowRates': false,
82130
+ 'fetchDepositAddress': false,
82131
+ 'fetchDepositAddresses': false,
82132
+ 'fetchDepositAddressesByNetwork': false,
82030
82133
  'fetchFundingHistory': false,
82031
82134
  'fetchFundingRate': false,
82032
82135
  'fetchFundingRateHistory': false,
@@ -83021,6 +83124,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
83021
83124
  'fetchMarketLeverageTiers': true,
83022
83125
  'fetchMarkets': true,
83023
83126
  'fetchMarkOHLCV': true,
83127
+ 'fetchMyLiquidations': true,
83024
83128
  'fetchMySettlementHistory': true,
83025
83129
  'fetchMyTrades': true,
83026
83130
  'fetchOHLCV': true,
@@ -87516,7 +87620,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
87516
87620
  let paginate = false;
87517
87621
  [paginate, params] = this.handleOptionAndParams(params, 'fetchOrders', 'paginate');
87518
87622
  if (paginate) {
87519
- return await this.fetchPaginatedCallCursor('fetchOrders', symbol, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 50);
87623
+ return await this.fetchPaginatedCallCursor('fetchOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
87520
87624
  }
87521
87625
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
87522
87626
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
@@ -87694,7 +87798,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
87694
87798
  let paginate = false;
87695
87799
  [paginate, params] = this.handleOptionAndParams(params, 'fetchCanceledAndClosedOrders', 'paginate');
87696
87800
  if (paginate) {
87697
- return await this.fetchPaginatedCallCursor('fetchCanceledAndClosedOrders', symbol, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 50);
87801
+ return await this.fetchPaginatedCallCursor('fetchCanceledAndClosedOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
87698
87802
  }
87699
87803
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
87700
87804
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
@@ -88066,7 +88170,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
88066
88170
  let paginate = false;
88067
88171
  [paginate, params] = this.handleOptionAndParams(params, 'fetchMyTrades', 'paginate');
88068
88172
  if (paginate) {
88069
- return await this.fetchPaginatedCallCursor('fetchMyTrades', symbol, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 100);
88173
+ return await this.fetchPaginatedCallCursor('fetchMyTrades', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 100);
88070
88174
  }
88071
88175
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
88072
88176
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
@@ -88268,7 +88372,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
88268
88372
  let paginate = false;
88269
88373
  [paginate, params] = this.handleOptionAndParams(params, 'fetchDeposits', 'paginate');
88270
88374
  if (paginate) {
88271
- return await this.fetchPaginatedCallCursor('fetchDeposits', code, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 50);
88375
+ return await this.fetchPaginatedCallCursor('fetchDeposits', code, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
88272
88376
  }
88273
88377
  let request = {
88274
88378
  // 'coin': currency['id'],
@@ -88336,7 +88440,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
88336
88440
  let paginate = false;
88337
88441
  [paginate, params] = this.handleOptionAndParams(params, 'fetchWithdrawals', 'paginate');
88338
88442
  if (paginate) {
88339
- return await this.fetchPaginatedCallCursor('fetchWithdrawals', code, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 50);
88443
+ return await this.fetchPaginatedCallCursor('fetchWithdrawals', code, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
88340
88444
  }
88341
88445
  let request = {
88342
88446
  // 'coin': currency['id'],
@@ -89856,7 +89960,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
89856
89960
  let paginate = false;
89857
89961
  [paginate, params] = this.handleOptionAndParams(params, 'fetchTransfers', 'paginate');
89858
89962
  if (paginate) {
89859
- return await this.fetchPaginatedCallCursor('fetchTransfers', code, since, limit, params, 'nextPageCursor', 'nextPageCursor', undefined, 50);
89963
+ return await this.fetchPaginatedCallCursor('fetchTransfers', code, since, limit, params, 'nextPageCursor', 'cursor', undefined, 50);
89860
89964
  }
89861
89965
  let currency = undefined;
89862
89966
  let request = {};
@@ -90691,6 +90795,137 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
90691
90795
  'info': greeks,
90692
90796
  };
90693
90797
  }
90798
+ async fetchMyLiquidations(symbol = undefined, since = undefined, limit = undefined, params = {}) {
90799
+ /**
90800
+ * @method
90801
+ * @name bybit#fetchMyLiquidations
90802
+ * @description retrieves the users liquidated positions
90803
+ * @see https://bybit-exchange.github.io/docs/api-explorer/v5/position/execution
90804
+ * @param {string} [symbol] unified CCXT market symbol
90805
+ * @param {int} [since] the earliest time in ms to fetch liquidations for
90806
+ * @param {int} [limit] the maximum number of liquidation structures to retrieve
90807
+ * @param {object} [params] exchange specific parameters for the exchange API endpoint
90808
+ * @param {string} [params.type] market type, ['swap', 'option', 'spot']
90809
+ * @param {string} [params.subType] market subType, ['linear', 'inverse']
90810
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
90811
+ * @returns {object} an array of [liquidation structures]{@link https://docs.ccxt.com/#/?id=liquidation-structure}
90812
+ */
90813
+ await this.loadMarkets();
90814
+ let paginate = false;
90815
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchMyLiquidations', 'paginate');
90816
+ if (paginate) {
90817
+ return await this.fetchPaginatedCallCursor('fetchMyLiquidations', symbol, since, limit, params, 'nextPageCursor', 'cursor', undefined, 100);
90818
+ }
90819
+ let request = {
90820
+ 'execType': 'BustTrade',
90821
+ };
90822
+ let market = undefined;
90823
+ if (symbol !== undefined) {
90824
+ market = this.market(symbol);
90825
+ request['symbol'] = market['id'];
90826
+ }
90827
+ let type = undefined;
90828
+ [type, params] = this.getBybitType('fetchMyLiquidations', market, params);
90829
+ request['category'] = type;
90830
+ if (limit !== undefined) {
90831
+ request['limit'] = limit;
90832
+ }
90833
+ if (since !== undefined) {
90834
+ request['startTime'] = since;
90835
+ }
90836
+ [request, params] = this.handleUntilOption('endTime', request, params);
90837
+ const response = await this.privateGetV5ExecutionList(this.extend(request, params));
90838
+ //
90839
+ // {
90840
+ // "retCode": 0,
90841
+ // "retMsg": "OK",
90842
+ // "result": {
90843
+ // "nextPageCursor": "132766%3A2%2C132766%3A2",
90844
+ // "category": "linear",
90845
+ // "list": [
90846
+ // {
90847
+ // "symbol": "ETHPERP",
90848
+ // "orderType": "Market",
90849
+ // "underlyingPrice": "",
90850
+ // "orderLinkId": "",
90851
+ // "side": "Buy",
90852
+ // "indexPrice": "",
90853
+ // "orderId": "8c065341-7b52-4ca9-ac2c-37e31ac55c94",
90854
+ // "stopOrderType": "UNKNOWN",
90855
+ // "leavesQty": "0",
90856
+ // "execTime": "1672282722429",
90857
+ // "isMaker": false,
90858
+ // "execFee": "0.071409",
90859
+ // "feeRate": "0.0006",
90860
+ // "execId": "e0cbe81d-0f18-5866-9415-cf319b5dab3b",
90861
+ // "tradeIv": "",
90862
+ // "blockTradeId": "",
90863
+ // "markPrice": "1183.54",
90864
+ // "execPrice": "1190.15",
90865
+ // "markIv": "",
90866
+ // "orderQty": "0.1",
90867
+ // "orderPrice": "1236.9",
90868
+ // "execValue": "119.015",
90869
+ // "execType": "Trade",
90870
+ // "execQty": "0.1"
90871
+ // }
90872
+ // ]
90873
+ // },
90874
+ // "retExtInfo": {},
90875
+ // "time": 1672283754510
90876
+ // }
90877
+ //
90878
+ const liquidations = this.addPaginationCursorToResult(response);
90879
+ return this.parseLiquidations(liquidations, market, since, limit);
90880
+ }
90881
+ parseLiquidation(liquidation, market = undefined) {
90882
+ //
90883
+ // {
90884
+ // "symbol": "ETHPERP",
90885
+ // "orderType": "Market",
90886
+ // "underlyingPrice": "",
90887
+ // "orderLinkId": "",
90888
+ // "side": "Buy",
90889
+ // "indexPrice": "",
90890
+ // "orderId": "8c065341-7b52-4ca9-ac2c-37e31ac55c94",
90891
+ // "stopOrderType": "UNKNOWN",
90892
+ // "leavesQty": "0",
90893
+ // "execTime": "1672282722429",
90894
+ // "isMaker": false,
90895
+ // "execFee": "0.071409",
90896
+ // "feeRate": "0.0006",
90897
+ // "execId": "e0cbe81d-0f18-5866-9415-cf319b5dab3b",
90898
+ // "tradeIv": "",
90899
+ // "blockTradeId": "",
90900
+ // "markPrice": "1183.54",
90901
+ // "execPrice": "1190.15",
90902
+ // "markIv": "",
90903
+ // "orderQty": "0.1",
90904
+ // "orderPrice": "1236.9",
90905
+ // "execValue": "119.015",
90906
+ // "execType": "Trade",
90907
+ // "execQty": "0.1"
90908
+ // }
90909
+ //
90910
+ const marketId = this.safeString(liquidation, 'symbol');
90911
+ const timestamp = this.safeInteger(liquidation, 'execTime');
90912
+ const contractsString = this.safeString(liquidation, 'execQty');
90913
+ const contractSizeString = this.safeString(market, 'contractSize');
90914
+ const priceString = this.safeString(liquidation, 'execPrice');
90915
+ const baseValueString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(contractsString, contractSizeString);
90916
+ const quoteValueString = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(baseValueString, priceString);
90917
+ return this.safeLiquidation({
90918
+ 'info': liquidation,
90919
+ 'symbol': this.safeSymbol(marketId, market),
90920
+ 'contracts': this.parseNumber(contractsString),
90921
+ 'contractSize': this.parseNumber(contractSizeString),
90922
+ 'price': this.parseNumber(priceString),
90923
+ 'baseValue': this.parseNumber(baseValueString),
90924
+ 'quoteValue': this.parseNumber(quoteValueString),
90925
+ 'timestamp': timestamp,
90926
+ 'datetime': this.iso8601(timestamp),
90927
+ });
90928
+ }
90694
90929
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
90695
90930
  let url = this.implodeHostname(this.urls['api'][api]) + '/' + path;
90696
90931
  if (api === 'public') {
@@ -160035,6 +160270,9 @@ class independentreserve extends _abstract_independentreserve_js__WEBPACK_IMPORT
160035
160270
  'fetchClosedOrders': true,
160036
160271
  'fetchCrossBorrowRate': false,
160037
160272
  'fetchCrossBorrowRates': false,
160273
+ 'fetchDepositAddress': true,
160274
+ 'fetchDepositAddresses': false,
160275
+ 'fetchDepositAddressesByNetwork': false,
160038
160276
  'fetchFundingHistory': false,
160039
160277
  'fetchFundingRate': false,
160040
160278
  'fetchFundingRateHistory': false,
@@ -160714,6 +160952,51 @@ class independentreserve extends _abstract_independentreserve_js__WEBPACK_IMPORT
160714
160952
  };
160715
160953
  return await this.privatePostCancelOrder(this.extend(request, params));
160716
160954
  }
160955
+ async fetchDepositAddress(code, params = {}) {
160956
+ /**
160957
+ * @method
160958
+ * @name independentreserve#fetchDepositAddress
160959
+ * @description fetch the deposit address for a currency associated with this account
160960
+ * @see https://www.independentreserve.com/features/api#GetDigitalCurrencyDepositAddress
160961
+ * @param {string} code unified currency code
160962
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
160963
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
160964
+ */
160965
+ await this.loadMarkets();
160966
+ const currency = this.currency(code);
160967
+ const request = {
160968
+ 'primaryCurrencyCode': currency['id'],
160969
+ };
160970
+ const response = await this.privatePostGetDigitalCurrencyDepositAddress(this.extend(request, params));
160971
+ //
160972
+ // {
160973
+ // Tag: '3307446684',
160974
+ // DepositAddress: 'GCCQH4HACMRAD56EZZZ4TOIDQQRVNADMJ35QOFWF4B2VQGODMA2WVQ22',
160975
+ // LastCheckedTimestampUtc: '2024-02-20T11:13:35.6912985Z',
160976
+ // NextUpdateTimestampUtc: '2024-02-20T11:14:56.5112394Z'
160977
+ // }
160978
+ //
160979
+ return this.parseDepositAddress(response);
160980
+ }
160981
+ parseDepositAddress(depositAddress, currency = undefined) {
160982
+ //
160983
+ // {
160984
+ // Tag: '3307446684',
160985
+ // DepositAddress: 'GCCQH4HACMRAD56EZZZ4TOIDQQRVNADMJ35QOFWF4B2VQGODMA2WVQ22',
160986
+ // LastCheckedTimestampUtc: '2024-02-20T11:13:35.6912985Z',
160987
+ // NextUpdateTimestampUtc: '2024-02-20T11:14:56.5112394Z'
160988
+ // }
160989
+ //
160990
+ const address = this.safeString(depositAddress, 'DepositAddress');
160991
+ this.checkAddress(address);
160992
+ return {
160993
+ 'info': depositAddress,
160994
+ 'currency': this.safeString(currency, 'code'),
160995
+ 'address': address,
160996
+ 'tag': this.safeString(depositAddress, 'Tag'),
160997
+ 'network': undefined,
160998
+ };
160999
+ }
160717
161000
  sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
160718
161001
  let url = this.urls['api'][api] + '/' + path;
160719
161002
  if (api === 'public') {
@@ -176795,6 +177078,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
176795
177078
  * @method
176796
177079
  * @name latoken#fetchTime
176797
177080
  * @description fetches the current integer timestamp in milliseconds from the exchange server
177081
+ * @see https://api.latoken.com/doc/v2/#tag/Time/operation/currentTime
176798
177082
  * @param {object} [params] extra parameters specific to the exchange API endpoint
176799
177083
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
176800
177084
  */
@@ -176811,6 +177095,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
176811
177095
  * @method
176812
177096
  * @name latoken#fetchMarkets
176813
177097
  * @description retrieves data on all markets for latoken
177098
+ * @see https://api.latoken.com/doc/v2/#tag/Pair/operation/getActivePairs
176814
177099
  * @param {object} [params] extra parameters specific to the exchange API endpoint
176815
177100
  * @returns {object[]} an array of objects representing market data
176816
177101
  */
@@ -177047,6 +177332,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177047
177332
  * @method
177048
177333
  * @name latoken#fetchBalance
177049
177334
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
177335
+ * @see https://api.latoken.com/doc/v2/#tag/Account/operation/getBalancesByUser
177050
177336
  * @param {object} [params] extra parameters specific to the exchange API endpoint
177051
177337
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
177052
177338
  */
@@ -177113,6 +177399,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177113
177399
  * @method
177114
177400
  * @name latoken#fetchOrderBook
177115
177401
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
177402
+ * @see https://api.latoken.com/doc/v2/#tag/Order-Book/operation/getOrderBook
177116
177403
  * @param {string} symbol unified symbol of the market to fetch the order book for
177117
177404
  * @param {int} [limit] the maximum amount of order book entries to return
177118
177405
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -177198,6 +177485,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177198
177485
  * @method
177199
177486
  * @name latoken#fetchTicker
177200
177487
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
177488
+ * @see https://api.latoken.com/doc/v2/#tag/Ticker/operation/getTicker
177201
177489
  * @param {string} symbol unified symbol of the market to fetch the ticker for
177202
177490
  * @param {object} [params] extra parameters specific to the exchange API endpoint
177203
177491
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -177236,6 +177524,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177236
177524
  * @method
177237
177525
  * @name latoken#fetchTickers
177238
177526
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
177527
+ * @see https://api.latoken.com/doc/v2/#tag/Ticker/operation/getAllTickers
177239
177528
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
177240
177529
  * @param {object} [params] extra parameters specific to the exchange API endpoint
177241
177530
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -177358,6 +177647,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177358
177647
  * @method
177359
177648
  * @name latoken#fetchTrades
177360
177649
  * @description get the list of most recent trades for a particular symbol
177650
+ * @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByPair
177361
177651
  * @param {string} symbol unified symbol of the market to fetch trades for
177362
177652
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
177363
177653
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -177390,6 +177680,8 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177390
177680
  * @method
177391
177681
  * @name latoken#fetchTradingFee
177392
177682
  * @description fetch the trading fees for a market
177683
+ * @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getFeeByPair
177684
+ * @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getAuthFeeByPair
177393
177685
  * @param {string} symbol unified market symbol
177394
177686
  * @param {object} [params] extra parameters specific to the exchange API endpoint
177395
177687
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -177459,6 +177751,8 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177459
177751
  * @method
177460
177752
  * @name latoken#fetchMyTrades
177461
177753
  * @description fetch all trades made by the user
177754
+ * @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByTrader
177755
+ * @see https://api.latoken.com/doc/v2/#tag/Trade/operation/getTradesByAssetAndTrader
177462
177756
  * @param {string} symbol unified market symbol
177463
177757
  * @param {int} [since] the earliest time in ms to fetch trades for
177464
177758
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -177966,6 +178260,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
177966
178260
  * @name latoken#fetchTransactions
177967
178261
  * @deprecated
177968
178262
  * @description use fetchDepositsWithdrawals instead
178263
+ * @see https://api.latoken.com/doc/v2/#tag/Transaction/operation/getUserTransactions
177969
178264
  * @param {string} code unified currency code for the currency of the transactions, default is undefined
177970
178265
  * @param {int} [since] timestamp in ms of the earliest transaction, default is undefined
177971
178266
  * @param {int} [limit] max number of transactions to return, default is undefined
@@ -178094,6 +178389,7 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
178094
178389
  * @method
178095
178390
  * @name latoken#fetchTransfers
178096
178391
  * @description fetch a history of internal transfers made on an account
178392
+ * @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/getUsersTransfers
178097
178393
  * @param {string} code unified currency code of the currency transferred
178098
178394
  * @param {int} [since] the earliest time in ms to fetch transfers for
178099
178395
  * @param {int} [limit] the maximum number of transfers structures to retrieve
@@ -178142,6 +178438,9 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
178142
178438
  * @method
178143
178439
  * @name latoken#transfer
178144
178440
  * @description transfer currency internally between wallets on the same account
178441
+ * @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByEmail
178442
+ * @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferById
178443
+ * @see https://api.latoken.com/doc/v2/#tag/Transfer/operation/transferByPhone
178145
178444
  * @param {string} code unified currency code
178146
178445
  * @param {float} amount amount to transfer
178147
178446
  * @param {string} fromAccount account to transfer from
@@ -181351,6 +181650,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181351
181650
  * @method
181352
181651
  * @name luno#fetchMarkets
181353
181652
  * @description retrieves data on all markets for luno
181653
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/Markets
181354
181654
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181355
181655
  * @returns {object[]} an array of objects representing market data
181356
181656
  */
@@ -181441,6 +181741,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181441
181741
  * @method
181442
181742
  * @name luno#fetchAccounts
181443
181743
  * @description fetch all the accounts associated with a profile
181744
+ * @see https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
181444
181745
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181445
181746
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
181446
181747
  */
@@ -181495,6 +181796,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181495
181796
  * @method
181496
181797
  * @name luno#fetchBalance
181497
181798
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
181799
+ * @see https://www.luno.com/en/developers/api#tag/Accounts/operation/getBalances
181498
181800
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181499
181801
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
181500
181802
  */
@@ -181517,6 +181819,8 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181517
181819
  * @method
181518
181820
  * @name luno#fetchOrderBook
181519
181821
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
181822
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBookFull
181823
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/GetOrderBook
181520
181824
  * @param {string} symbol unified symbol of the market to fetch the order book for
181521
181825
  * @param {int} [limit] the maximum amount of order book entries to return
181522
181826
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -181625,6 +181929,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181625
181929
  * @method
181626
181930
  * @name luno#fetchOrder
181627
181931
  * @description fetches information on an order made by the user
181932
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/GetOrder
181628
181933
  * @param {string} symbol not used by luno fetchOrder
181629
181934
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181630
181935
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -181656,6 +181961,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181656
181961
  * @method
181657
181962
  * @name luno#fetchOrders
181658
181963
  * @description fetches information on multiple orders made by the user
181964
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
181659
181965
  * @param {string} symbol unified market symbol of the market orders were made in
181660
181966
  * @param {int} [since] the earliest time in ms to fetch orders for
181661
181967
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -181669,6 +181975,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181669
181975
  * @method
181670
181976
  * @name luno#fetchOpenOrders
181671
181977
  * @description fetch all unfilled currently open orders
181978
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
181672
181979
  * @param {string} symbol unified market symbol
181673
181980
  * @param {int} [since] the earliest time in ms to fetch open orders for
181674
181981
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -181682,6 +181989,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181682
181989
  * @method
181683
181990
  * @name luno#fetchClosedOrders
181684
181991
  * @description fetches information on multiple closed orders made by the user
181992
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListOrders
181685
181993
  * @param {string} symbol unified market symbol of the market orders were made in
181686
181994
  * @param {int} [since] the earliest time in ms to fetch orders for
181687
181995
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -181732,6 +182040,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181732
182040
  * @method
181733
182041
  * @name luno#fetchTickers
181734
182042
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
182043
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/GetTickers
181735
182044
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
181736
182045
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181737
182046
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -181756,6 +182065,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181756
182065
  * @method
181757
182066
  * @name luno#fetchTicker
181758
182067
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
182068
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/GetTicker
181759
182069
  * @param {string} symbol unified symbol of the market to fetch the ticker for
181760
182070
  * @param {object} [params] extra parameters specific to the exchange API endpoint
181761
182071
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -181877,6 +182187,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181877
182187
  * @method
181878
182188
  * @name luno#fetchTrades
181879
182189
  * @description get the list of most recent trades for a particular symbol
182190
+ * @see https://www.luno.com/en/developers/api#tag/Market/operation/ListTrades
181880
182191
  * @param {string} symbol unified symbol of the market to fetch trades for
181881
182192
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
181882
182193
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -181977,6 +182288,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
181977
182288
  * @method
181978
182289
  * @name luno#fetchMyTrades
181979
182290
  * @description fetch all trades made by the user
182291
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/ListUserTrades
181980
182292
  * @param {string} symbol unified market symbol
181981
182293
  * @param {int} [since] the earliest time in ms to fetch trades for
181982
182294
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -182027,6 +182339,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
182027
182339
  * @method
182028
182340
  * @name luno#fetchTradingFee
182029
182341
  * @description fetch the trading fees for a market
182342
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/getFeeInfo
182030
182343
  * @param {string} symbol unified market symbol
182031
182344
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182032
182345
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -182056,6 +182369,8 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
182056
182369
  * @method
182057
182370
  * @name luno#createOrder
182058
182371
  * @description create a trade order
182372
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/PostMarketOrder
182373
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/PostLimitOrder
182059
182374
  * @param {string} symbol unified symbol of the market to create an order in
182060
182375
  * @param {string} type 'market' or 'limit'
182061
182376
  * @param {string} side 'buy' or 'sell'
@@ -182097,6 +182412,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
182097
182412
  * @method
182098
182413
  * @name luno#cancelOrder
182099
182414
  * @description cancels an open order
182415
+ * @see https://www.luno.com/en/developers/api#tag/Orders/operation/StopOrder
182100
182416
  * @param {string} id order id
182101
182417
  * @param {string} symbol unified symbol of the market the order was made in
182102
182418
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -182128,6 +182444,7 @@ class luno extends _abstract_luno_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
182128
182444
  * @method
182129
182445
  * @name luno#fetchLedger
182130
182446
  * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
182447
+ * @see https://www.luno.com/en/developers/api#tag/Accounts/operation/ListTransactions
182131
182448
  * @param {string} code unified currency code, default is undefined
182132
182449
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
182133
182450
  * @param {int} [limit] max number of ledger entrys to return, default is undefined
@@ -182488,6 +182805,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182488
182805
  * @method
182489
182806
  * @name lykke#fetchCurrencies
182490
182807
  * @description fetches all available currencies on an exchange
182808
+ * @see https://lykkecity.github.io/Trading-API/#get-all-assets
182491
182809
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182492
182810
  * @returns {object} an associative dictionary of currencies
182493
182811
  */
@@ -182566,6 +182884,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182566
182884
  * @method
182567
182885
  * @name lykke#fetchMarkets
182568
182886
  * @description retrieves data on all markets for lykke
182887
+ * @see https://lykkecity.github.io/Trading-API/#get-asset-by-id
182569
182888
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182570
182889
  * @returns {object[]} an array of objects representing market data
182571
182890
  */
@@ -182725,6 +183044,8 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182725
183044
  * @method
182726
183045
  * @name lykke#fetchTicker
182727
183046
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
183047
+ * @see https://lykkecity.github.io/Trading-API/#get-current-prices
183048
+ * @see https://lykkecity.github.io/Trading-API/#24hr-ticker-price-change-statistics
182728
183049
  * @param {string} symbol unified symbol of the market to fetch the ticker for
182729
183050
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182730
183051
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -182784,6 +183105,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182784
183105
  * @method
182785
183106
  * @name lykke#fetchTickers
182786
183107
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
183108
+ * @see https://lykkecity.github.io/Trading-API/#24hr-ticker-price-change-statistics
182787
183109
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
182788
183110
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182789
183111
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -182815,6 +183137,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182815
183137
  * @method
182816
183138
  * @name lykke#fetchOrderBook
182817
183139
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
183140
+ * @see https://lykkecity.github.io/Trading-API/#asset-pair-order-book-ticker
182818
183141
  * @param {string} symbol unified symbol of the market to fetch the order book for
182819
183142
  * @param {int} [limit] the maximum amount of order book entries to return
182820
183143
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -182919,6 +183242,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182919
183242
  * @method
182920
183243
  * @name lykke#fetchTrades
182921
183244
  * @description get the list of most recent trades for a particular symbol
183245
+ * @see https://lykkecity.github.io/Trading-API/#get-public-trades
182922
183246
  * @param {string} symbol unified symbol of the market to fetch trades for
182923
183247
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
182924
183248
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -182983,6 +183307,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
182983
183307
  * @method
182984
183308
  * @name lykke#fetchBalance
182985
183309
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
183310
+ * @see https://lykkecity.github.io/Trading-API/#get-the-current-balance
182986
183311
  * @param {object} [params] extra parameters specific to the exchange API endpoint
182987
183312
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
182988
183313
  */
@@ -183078,6 +183403,8 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183078
183403
  * @method
183079
183404
  * @name lykke#createOrder
183080
183405
  * @description create a trade order
183406
+ * @see https://lykkecity.github.io/Trading-API/#place-a-limit-order
183407
+ * @see https://lykkecity.github.io/Trading-API/#place-a-market-order
183081
183408
  * @param {string} symbol unified symbol of the market to create an order in
183082
183409
  * @param {string} type 'market' or 'limit'
183083
183410
  * @param {string} side 'buy' or 'sell'
@@ -183154,6 +183481,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183154
183481
  * @method
183155
183482
  * @name lykke#cancelOrder
183156
183483
  * @description cancels an open order
183484
+ * @see https://lykkecity.github.io/Trading-API/#cancel-orders-by-id
183157
183485
  * @param {string} id order id
183158
183486
  * @param {string} symbol unified symbol of the market the order was made in
183159
183487
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -183175,6 +183503,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183175
183503
  * @method
183176
183504
  * @name lykke#cancelAllOrders
183177
183505
  * @description cancel all open orders
183506
+ * @see https://lykkecity.github.io/Trading-API/#mass-cancel-orders
183178
183507
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
183179
183508
  * @param {object} [params] extra parameters specific to the exchange API endpoint
183180
183509
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -183201,6 +183530,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183201
183530
  * @method
183202
183531
  * @name lykke#fetchOrder
183203
183532
  * @description fetches information on an order made by the user
183533
+ * @see https://lykkecity.github.io/Trading-API/#get-order-by-id
183204
183534
  * @param {string} symbol not used by lykke fetchOrder
183205
183535
  * @param {object} [params] extra parameters specific to the exchange API endpoint
183206
183536
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -183237,6 +183567,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183237
183567
  * @method
183238
183568
  * @name lykke#fetchOpenOrders
183239
183569
  * @description fetch all unfilled currently open orders
183570
+ * @see https://lykkecity.github.io/Trading-API/#get-active-or-closed-orders
183240
183571
  * @param {string} symbol unified market symbol
183241
183572
  * @param {int} [since] the earliest time in ms to fetch open orders for
183242
183573
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -183285,6 +183616,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183285
183616
  * @method
183286
183617
  * @name lykke#fetchClosedOrders
183287
183618
  * @description fetches information on multiple closed orders made by the user
183619
+ * @see https://lykkecity.github.io/Trading-API/#get-active-or-closed-orders
183288
183620
  * @param {string} symbol unified market symbol of the market orders were made in
183289
183621
  * @param {int} [since] the earliest time in ms to fetch orders for
183290
183622
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -183333,6 +183665,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183333
183665
  * @method
183334
183666
  * @name lykke#fetchMyTrades
183335
183667
  * @description fetch all trades made by the user
183668
+ * @see https://lykkecity.github.io/Trading-API/#get-trade-history
183336
183669
  * @param {string} symbol unified market symbol
183337
183670
  * @param {int} [since] the earliest time in ms to fetch trades for
183338
183671
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -183392,6 +183725,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183392
183725
  * @method
183393
183726
  * @name lykke#fetchDepositAddress
183394
183727
  * @description fetch the deposit address for a currency associated with this account
183728
+ * @see https://lykkecity.github.io/Trading-API/#get-deposit-address-for-a-given-asset
183395
183729
  * @param {string} code unified currency code
183396
183730
  * @param {object} [params] extra parameters specific to the exchange API endpoint
183397
183731
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -183489,6 +183823,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183489
183823
  * @method
183490
183824
  * @name lykke#fetchDepositsWithdrawals
183491
183825
  * @description fetch history of deposits and withdrawals
183826
+ * @see https://lykkecity.github.io/Trading-API/#get-the-history-of-withdrawals-and-deposits
183492
183827
  * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
183493
183828
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
183494
183829
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
@@ -183531,6 +183866,7 @@ class lykke extends _abstract_lykke_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
183531
183866
  * @method
183532
183867
  * @name lykke#withdraw
183533
183868
  * @description make a withdrawal
183869
+ * @see https://lykkecity.github.io/Trading-API/#withdrawal
183534
183870
  * @param {string} code unified currency code
183535
183871
  * @param {float} amount the amount to withdraw
183536
183872
  * @param {string} address the address to withdraw to
@@ -190310,6 +190646,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190310
190646
  * @method
190311
190647
  * @name ndax#signIn
190312
190648
  * @description sign in, must be called prior to using other authenticated methods
190649
+ * @see https://apidoc.ndax.io/#authenticate2fa
190313
190650
  * @param {object} [params] extra parameters specific to the exchange API endpoint
190314
190651
  * @returns response from exchange
190315
190652
  */
@@ -190363,6 +190700,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190363
190700
  * @method
190364
190701
  * @name ndax#fetchCurrencies
190365
190702
  * @description fetches all available currencies on an exchange
190703
+ * @see https://apidoc.ndax.io/#getproduct
190366
190704
  * @param {object} [params] extra parameters specific to the exchange API endpoint
190367
190705
  * @returns {object} an associative dictionary of currencies
190368
190706
  */
@@ -190432,6 +190770,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190432
190770
  * @method
190433
190771
  * @name ndax#fetchMarkets
190434
190772
  * @description retrieves data on all markets for ndax
190773
+ * @see https://apidoc.ndax.io/#getinstruments
190435
190774
  * @param {object} [params] extra parameters specific to the exchange API endpoint
190436
190775
  * @returns {object[]} an array of objects representing market data
190437
190776
  */
@@ -190591,6 +190930,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190591
190930
  * @method
190592
190931
  * @name ndax#fetchOrderBook
190593
190932
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
190933
+ * @see https://apidoc.ndax.io/#getl2snapshot
190594
190934
  * @param {string} symbol unified symbol of the market to fetch the order book for
190595
190935
  * @param {int} [limit] the maximum amount of order book entries to return
190596
190936
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -190701,6 +191041,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190701
191041
  * @method
190702
191042
  * @name ndax#fetchTicker
190703
191043
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
191044
+ * @see https://apidoc.ndax.io/#getlevel1
190704
191045
  * @param {string} symbol unified symbol of the market to fetch the ticker for
190705
191046
  * @param {object} [params] extra parameters specific to the exchange API endpoint
190706
191047
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -190773,6 +191114,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
190773
191114
  * @method
190774
191115
  * @name ndax#fetchOHLCV
190775
191116
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
191117
+ * @see https://apidoc.ndax.io/#gettickerhistory
190776
191118
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
190777
191119
  * @param {string} timeframe the length of time each candle represents
190778
191120
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -191019,6 +191361,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191019
191361
  * @method
191020
191362
  * @name ndax#fetchAccounts
191021
191363
  * @description fetch all the accounts associated with a profile
191364
+ * @see https://apidoc.ndax.io/#getuseraccounts
191022
191365
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191023
191366
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
191024
191367
  */
@@ -191072,6 +191415,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191072
191415
  * @method
191073
191416
  * @name ndax#fetchBalance
191074
191417
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
191418
+ * @see https://apidoc.ndax.io/#getaccountpositions
191075
191419
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191076
191420
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
191077
191421
  */
@@ -191199,6 +191543,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191199
191543
  * @method
191200
191544
  * @name ndax#fetchLedger
191201
191545
  * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
191546
+ * @see https://apidoc.ndax.io/#getaccounttransactions
191202
191547
  * @param {string} code unified currency code, default is undefined
191203
191548
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
191204
191549
  * @param {int} [limit] max number of ledger entrys to return, default is undefined
@@ -191353,6 +191698,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191353
191698
  * @method
191354
191699
  * @name ndax#createOrder
191355
191700
  * @description create a trade order
191701
+ * @see https://apidoc.ndax.io/#sendorder
191356
191702
  * @param {string} symbol unified symbol of the market to create an order in
191357
191703
  * @param {string} type 'market' or 'limit'
191358
191704
  * @param {string} side 'buy' or 'sell'
@@ -191471,6 +191817,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191471
191817
  * @method
191472
191818
  * @name ndax#fetchMyTrades
191473
191819
  * @description fetch all trades made by the user
191820
+ * @see https://apidoc.ndax.io/#gettradeshistory
191474
191821
  * @param {string} symbol unified market symbol
191475
191822
  * @param {int} [since] the earliest time in ms to fetch trades for
191476
191823
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -191558,6 +191905,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191558
191905
  * @method
191559
191906
  * @name ndax#cancelAllOrders
191560
191907
  * @description cancel all open orders
191908
+ * @see https://apidoc.ndax.io/#cancelallorders
191561
191909
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
191562
191910
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191563
191911
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -191592,6 +191940,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191592
191940
  * @method
191593
191941
  * @name ndax#cancelOrder
191594
191942
  * @description cancels an open order
191943
+ * @see https://apidoc.ndax.io/#cancelorder
191595
191944
  * @param {string} id order id
191596
191945
  * @param {string} symbol unified symbol of the market the order was made in
191597
191946
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -191631,6 +191980,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191631
191980
  * @method
191632
191981
  * @name ndax#fetchOpenOrders
191633
191982
  * @description fetch all unfilled currently open orders
191983
+ * @see https://apidoc.ndax.io/#getopenorders
191634
191984
  * @param {string} symbol unified market symbol
191635
191985
  * @param {int} [since] the earliest time in ms to fetch open orders for
191636
191986
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -191709,6 +192059,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191709
192059
  * @method
191710
192060
  * @name ndax#fetchOrders
191711
192061
  * @description fetches information on multiple orders made by the user
192062
+ * @see https://apidoc.ndax.io/#getorderhistory
191712
192063
  * @param {string} symbol unified market symbol of the market orders were made in
191713
192064
  * @param {int} [since] the earliest time in ms to fetch orders for
191714
192065
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -191803,6 +192154,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191803
192154
  * @method
191804
192155
  * @name ndax#fetchOrder
191805
192156
  * @description fetches information on an order made by the user
192157
+ * @see https://apidoc.ndax.io/#getorderstatus
191806
192158
  * @param {string} symbol unified symbol of the market the order was made in
191807
192159
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191808
192160
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -191878,6 +192230,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
191878
192230
  * @method
191879
192231
  * @name ndax#fetchOrderTrades
191880
192232
  * @description fetch all the trades made from a single order
192233
+ * @see https://apidoc.ndax.io/#getorderhistorybyorderid
191881
192234
  * @param {string} id order id
191882
192235
  * @param {string} symbol unified market symbol
191883
192236
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -192106,6 +192459,7 @@ class ndax extends _abstract_ndax_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
192106
192459
  * @method
192107
192460
  * @name ndax#fetchWithdrawals
192108
192461
  * @description fetch all withdrawals made from an account
192462
+ * @see https://apidoc.ndax.io/#getwithdraws
192109
192463
  * @param {string} code unified currency code
192110
192464
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
192111
192465
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -219330,7 +219684,7 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
219330
219684
  */
219331
219685
  await this.loadMarkets();
219332
219686
  const market = this.market(symbol);
219333
- const channel = 'depth-realtime' + ':' + market['id'];
219687
+ const channel = 'depth' + ':' + market['id'];
219334
219688
  params = this.extend(params, {
219335
219689
  'ch': channel,
219336
219690
  });
@@ -219340,7 +219694,7 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
219340
219694
  async watchOrderBookSnapshot(symbol, limit = undefined, params = {}) {
219341
219695
  await this.loadMarkets();
219342
219696
  const market = this.market(symbol);
219343
- const action = 'depth-snapshot-realtime';
219697
+ const action = 'depth-snapshot';
219344
219698
  const channel = action + ':' + market['id'];
219345
219699
  params = this.extend(params, {
219346
219700
  'action': action,
@@ -219352,6 +219706,15 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
219352
219706
  const orderbook = await this.watchPublic(channel, params);
219353
219707
  return orderbook.limit();
219354
219708
  }
219709
+ async fetchOrderBookSnapshot(symbol, limit = undefined, params = {}) {
219710
+ const restOrderBook = await this.fetchRestOrderBookSafe(symbol, limit, params);
219711
+ if (!(symbol in this.orderbooks)) {
219712
+ this.orderbooks[symbol] = this.orderBook();
219713
+ }
219714
+ const orderbook = this.orderbooks[symbol];
219715
+ orderbook.reset(restOrderBook);
219716
+ return orderbook;
219717
+ }
219355
219718
  handleOrderBookSnapshot(client, message) {
219356
219719
  //
219357
219720
  // {
@@ -219988,8 +220351,8 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
219988
220351
  'ping': this.handlePing,
219989
220352
  'auth': this.handleAuthenticate,
219990
220353
  'sub': this.handleSubscriptionStatus,
219991
- 'depth-realtime': this.handleOrderBook,
219992
- 'depth-snapshot-realtime': this.handleOrderBookSnapshot,
220354
+ 'depth': this.handleOrderBook,
220355
+ 'depth-snapshot': this.handleOrderBookSnapshot,
219993
220356
  'trades': this.handleTrades,
219994
220357
  'bar': this.handleOHLCV,
219995
220358
  'balance': this.handleBalance,
@@ -220016,7 +220379,7 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
220016
220379
  // { m: 'sub', id: "1647515701", ch: "depth:BTC/USDT", code: 0 }
220017
220380
  //
220018
220381
  const channel = this.safeString(message, 'ch', '');
220019
- if (channel.indexOf('depth-realtime') > -1) {
220382
+ if (channel.indexOf('depth') > -1 && !(channel.indexOf('depth-snapshot') > -1)) {
220020
220383
  this.handleOrderBookSubscription(client, message);
220021
220384
  }
220022
220385
  return message;
@@ -220025,12 +220388,18 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
220025
220388
  const channel = this.safeString(message, 'ch');
220026
220389
  const parts = channel.split(':');
220027
220390
  const marketId = parts[1];
220028
- const symbol = this.safeSymbol(marketId);
220391
+ const market = this.safeMarket(marketId);
220392
+ const symbol = market['symbol'];
220029
220393
  if (symbol in this.orderbooks) {
220030
220394
  delete this.orderbooks[symbol];
220031
220395
  }
220032
220396
  this.orderbooks[symbol] = this.orderBook({});
220033
- this.spawn(this.watchOrderBookSnapshot, symbol);
220397
+ if (this.options['defaultType'] === 'swap' || market['contract']) {
220398
+ this.spawn(this.fetchOrderBookSnapshot, symbol);
220399
+ }
220400
+ else {
220401
+ this.spawn(this.watchOrderBookSnapshot, symbol);
220402
+ }
220034
220403
  }
220035
220404
  async pong(client, message) {
220036
220405
  //
@@ -220085,18 +220454,18 @@ class ascendex extends _ascendex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
220085
220454
  /* harmony export */ Z: () => (/* binding */ bequant)
220086
220455
  /* harmony export */ });
220087
220456
  /* harmony import */ var _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5189);
220457
+ /* harmony import */ var _hitbtc_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4714);
220088
220458
  /* harmony import */ var _bequant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2049);
220089
220459
  // ---------------------------------------------------------------------------
220090
220460
 
220091
220461
 
220462
+
220092
220463
  // ---------------------------------------------------------------------------
220093
220464
  class bequant extends _hitbtc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
220094
220465
  describe() {
220095
220466
  // eslint-disable-next-line new-cap
220096
- const restInstance = new _bequant_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z();
220097
- const restDescribe = restInstance.describe();
220098
- const extended = this.deepExtend(super.describe(), restDescribe);
220099
- return this.deepExtend(extended, {
220467
+ const describeExtended = this.getDescribeForExtendedWsExchange(new _bequant_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z(), new _hitbtc_js__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z(), super.describe());
220468
+ return this.deepExtend(describeExtended, {
220100
220469
  'id': 'bequant',
220101
220470
  'name': 'Bequant',
220102
220471
  'countries': ['MT'],
@@ -220170,10 +220539,15 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
220170
220539
  'cancelOrderWs': true,
220171
220540
  'cancelOrdersWs': false,
220172
220541
  'cancelAllOrdersWs': true,
220173
- 'fetchOrderWs': true,
220174
- 'fetchOrdersWs': true,
220175
220542
  'fetchBalanceWs': true,
220543
+ 'fetchDepositsWs': false,
220544
+ 'fetchMarketsWs': false,
220176
220545
  'fetchMyTradesWs': true,
220546
+ 'fetchOpenOrdersWs': true,
220547
+ 'fetchOrderWs': true,
220548
+ 'fetchOrdersWs': true,
220549
+ 'fetchTradingFeesWs': false,
220550
+ 'fetchWithdrawalsWs': false,
220177
220551
  },
220178
220552
  'urls': {
220179
220553
  'test': {
@@ -222074,6 +222448,28 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
222074
222448
  const orders = await this.watch(url, messageHash, message, messageHash, subscription);
222075
222449
  return this.filterBySymbolSinceLimit(orders, symbol, since, limit);
222076
222450
  }
222451
+ async fetchClosedOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
222452
+ /**
222453
+ * @method
222454
+ * @name binance#fetchClosedOrdersWs
222455
+ * @see https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data
222456
+ * @description fetch closed orders
222457
+ * @param {string} symbol unified market symbol
222458
+ * @param {int} [since] the earliest time in ms to fetch open orders for
222459
+ * @param {int} [limit] the maximum number of open orders structures to retrieve
222460
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
222461
+ * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
222462
+ */
222463
+ const orders = await this.fetchOrdersWs(symbol, since, limit, params);
222464
+ const closedOrders = [];
222465
+ for (let i = 0; i < orders.length; i++) {
222466
+ const order = orders[i];
222467
+ if (order['status'] === 'closed') {
222468
+ closedOrders.push(order);
222469
+ }
222470
+ }
222471
+ return closedOrders;
222472
+ }
222077
222473
  async fetchOpenOrdersWs(symbol = undefined, since = undefined, limit = undefined, params = {}) {
222078
222474
  /**
222079
222475
  * @method
@@ -227045,6 +227441,7 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
227045
227441
  // "clientOid": "798d1425-d31d-4ada-a51b-ec701e00a1d9",
227046
227442
  // "price": "35000.00",
227047
227443
  // "size": "7.0000",
227444
+ // "newSize": "500.0000",
227048
227445
  // "notional": "7.000000",
227049
227446
  // "orderType": "limit",
227050
227447
  // "force": "gtc",
@@ -227212,6 +227609,7 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
227212
227609
  // "clientOid": "798d1425-d31d-4ada-a51b-ec701e00a1d9",
227213
227610
  // "price": "35000.00",
227214
227611
  // "size": "7.0000",
227612
+ // "newSize": "500.0000",
227215
227613
  // "notional": "7.000000",
227216
227614
  // "orderType": "limit",
227217
227615
  // "force": "gtc",
@@ -227319,6 +227717,25 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
227319
227717
  };
227320
227718
  }
227321
227719
  const triggerPrice = this.safeNumber(order, 'triggerPrice');
227720
+ const price = this.safeString(order, 'price');
227721
+ const avgPrice = this.omitZero(this.safeString2(order, 'priceAvg', 'fillPrice'));
227722
+ let cost = this.safeStringN(order, ['notional', 'notionalUsd', 'quoteSize']);
227723
+ const side = this.safeString(order, 'side');
227724
+ const type = this.safeString(order, 'orderType');
227725
+ if (side === 'buy' && market['spot'] && (type === 'market')) {
227726
+ cost = this.safeString(order, 'newSize', cost);
227727
+ }
227728
+ let filled = this.safeString2(order, 'accBaseVolume', 'baseVolume');
227729
+ if (market['spot'] && (rawStatus !== 'live')) {
227730
+ filled = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise */ .O.stringDiv(cost, avgPrice);
227731
+ }
227732
+ let amount = this.safeString(order, 'baseVolume');
227733
+ if (!market['spot'] || !(side === 'buy' && type === 'market')) {
227734
+ amount = this.safeString(order, 'newSize', amount);
227735
+ }
227736
+ if (market['swap'] && (amount === undefined)) {
227737
+ amount = this.safeString(order, 'size');
227738
+ }
227322
227739
  return this.safeOrder({
227323
227740
  'info': order,
227324
227741
  'symbol': symbol,
@@ -227327,17 +227744,17 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
227327
227744
  'timestamp': timestamp,
227328
227745
  'datetime': this.iso8601(timestamp),
227329
227746
  'lastTradeTimestamp': this.safeInteger(order, 'uTime'),
227330
- 'type': this.safeString(order, 'orderType'),
227747
+ 'type': type,
227331
227748
  'timeInForce': this.safeStringUpper(order, 'force'),
227332
227749
  'postOnly': undefined,
227333
- 'side': this.safeString(order, 'side'),
227334
- 'price': this.safeString(order, 'price'),
227750
+ 'side': side,
227751
+ 'price': price,
227335
227752
  'stopPrice': triggerPrice,
227336
227753
  'triggerPrice': triggerPrice,
227337
- 'amount': this.safeString(order, 'baseVolume'),
227338
- 'cost': this.safeStringN(order, ['notional', 'notionalUsd', 'quoteSize']),
227339
- 'average': this.omitZero(this.safeString2(order, 'priceAvg', 'fillPrice')),
227340
- 'filled': this.safeString2(order, 'accBaseVolume', 'baseVolume'),
227754
+ 'amount': amount,
227755
+ 'cost': cost,
227756
+ 'average': avgPrice,
227757
+ 'filled': filled,
227341
227758
  'remaining': undefined,
227342
227759
  'status': this.parseWsOrderStatus(rawStatus),
227343
227760
  'fee': feeObject,
@@ -232123,7 +232540,7 @@ class bitstamp extends _bitstamp_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
232123
232540
  // usually it takes at least 4-5 deltas to resolve
232124
232541
  const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 6);
232125
232542
  if (cacheLength === snapshotDelay) {
232126
- this.spawn(this.loadOrderBook, client, messageHash, symbol);
232543
+ this.spawn(this.loadOrderBook, client, messageHash, symbol, null, {});
232127
232544
  }
232128
232545
  storedOrderBook.cache.push(delta);
232129
232546
  return;
@@ -245902,6 +246319,7 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
245902
246319
  'watchBalance': false,
245903
246320
  'watchTicker': false,
245904
246321
  'watchTickers': false,
246322
+ 'watchBidsAsks': true,
245905
246323
  'watchTrades': true,
245906
246324
  'watchTradesForSymbols': true,
245907
246325
  'watchMyTrades': false,
@@ -246301,6 +246719,79 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
246301
246719
  const orderbook = await this.helperForWatchMultipleConstruct('orderbook', symbols, params);
246302
246720
  return orderbook.limit();
246303
246721
  }
246722
+ async watchBidsAsks(symbols, limit = undefined, params = {}) {
246723
+ /**
246724
+ * @method
246725
+ * @name gemini#watchBidsAsks
246726
+ * @description watches best bid & ask for symbols
246727
+ * @see https://docs.gemini.com/websocket-api/#multi-market-data
246728
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
246729
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
246730
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
246731
+ */
246732
+ return await this.helperForWatchMultipleConstruct('bidsasks', symbols, params);
246733
+ }
246734
+ handleBidsAsksForMultidata(client, rawBidAskChanges, timestamp, nonce) {
246735
+ //
246736
+ // {
246737
+ // eventId: '1683002916916153',
246738
+ // events: [
246739
+ // {
246740
+ // price: '50945.37',
246741
+ // reason: 'top-of-book',
246742
+ // remaining: '0.0',
246743
+ // side: 'bid',
246744
+ // symbol: 'BTCUSDT',
246745
+ // type: 'change'
246746
+ // },
246747
+ // {
246748
+ // price: '50947.75',
246749
+ // reason: 'top-of-book',
246750
+ // remaining: '0.11725',
246751
+ // side: 'bid',
246752
+ // symbol: 'BTCUSDT',
246753
+ // type: 'change'
246754
+ // }
246755
+ // ],
246756
+ // socket_sequence: 322,
246757
+ // timestamp: 1708674495,
246758
+ // timestampms: 1708674495174,
246759
+ // type: 'update'
246760
+ // }
246761
+ //
246762
+ const marketId = rawBidAskChanges[0]['symbol'];
246763
+ const market = this.safeMarket(marketId.toLowerCase());
246764
+ const symbol = market['symbol'];
246765
+ if (!(symbol in this.bidsasks)) {
246766
+ this.bidsasks[symbol] = this.parseTicker({});
246767
+ this.bidsasks[symbol]['symbol'] = symbol;
246768
+ }
246769
+ const currentBidAsk = this.bidsasks[symbol];
246770
+ const messageHash = 'bidsasks:' + symbol;
246771
+ // last update always overwrites the previous state and is the latest state
246772
+ for (let i = 0; i < rawBidAskChanges.length; i++) {
246773
+ const entry = rawBidAskChanges[i];
246774
+ const rawSide = this.safeString(entry, 'side');
246775
+ const price = this.safeNumber(entry, 'price');
246776
+ const size = this.safeNumber(entry, 'remaining');
246777
+ if (size === 0) {
246778
+ continue;
246779
+ }
246780
+ if (rawSide === 'bid') {
246781
+ currentBidAsk['bid'] = price;
246782
+ currentBidAsk['bidVolume'] = size;
246783
+ }
246784
+ else {
246785
+ currentBidAsk['ask'] = price;
246786
+ currentBidAsk['askVolume'] = size;
246787
+ }
246788
+ }
246789
+ currentBidAsk['timestamp'] = timestamp;
246790
+ currentBidAsk['datetime'] = this.iso8601(timestamp);
246791
+ currentBidAsk['info'] = rawBidAskChanges;
246792
+ this.bidsasks[symbol] = currentBidAsk;
246793
+ client.resolve(currentBidAsk, messageHash);
246794
+ }
246304
246795
  async helperForWatchMultipleConstruct(itemHashName, symbols, params = {}) {
246305
246796
  await this.loadMarkets();
246306
246797
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
@@ -246322,6 +246813,9 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
246322
246813
  if (itemHashName === 'orderbook') {
246323
246814
  url += 'trades=false&bids=true&offers=true';
246324
246815
  }
246816
+ else if (itemHashName === 'bidsasks') {
246817
+ url += 'trades=false&bids=true&offers=true&top_of_book=true';
246818
+ }
246325
246819
  else if (itemHashName === 'trades') {
246326
246820
  url += 'trades=true&bids=false&offers=false';
246327
246821
  }
@@ -246664,18 +247158,29 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
246664
247158
  const eventId = this.safeInteger(message, 'eventId');
246665
247159
  const events = this.safeList(message, 'events');
246666
247160
  const orderBookItems = [];
247161
+ const bidaskItems = [];
246667
247162
  const collectedEventsOfTrades = [];
247163
+ const eventsLength = events.length;
246668
247164
  for (let i = 0; i < events.length; i++) {
246669
247165
  const event = events[i];
246670
247166
  const eventType = this.safeString(event, 'type');
246671
247167
  const isOrderBook = (eventType === 'change') && ('side' in event) && this.inArray(event['side'], ['ask', 'bid']);
246672
- if (isOrderBook) {
247168
+ const eventReason = this.safeString(event, 'reason');
247169
+ const isBidAsk = (eventReason === 'top-of-book') || (isOrderBook && (eventReason === 'initial') && eventsLength === 2);
247170
+ if (isBidAsk) {
247171
+ bidaskItems.push(event);
247172
+ }
247173
+ else if (isOrderBook) {
246673
247174
  orderBookItems.push(event);
246674
247175
  }
246675
247176
  else if (eventType === 'trade') {
246676
247177
  collectedEventsOfTrades.push(events[i]);
246677
247178
  }
246678
247179
  }
247180
+ const lengthBa = bidaskItems.length;
247181
+ if (lengthBa > 0) {
247182
+ this.handleBidsAsksForMultidata(client, bidaskItems, ts, eventId);
247183
+ }
246679
247184
  const lengthOb = orderBookItems.length;
246680
247185
  if (lengthOb > 0) {
246681
247186
  this.handleOrderBookForMultidata(client, orderBookItems, ts, eventId);
@@ -259363,6 +259868,7 @@ class mexc extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
259363
259868
  const symbol = this.safeSymbol(marketId);
259364
259869
  const messageHash = 'orderbook:' + symbol;
259365
259870
  const subscription = this.safeValue(client.subscriptions, messageHash);
259871
+ const limit = this.safeInteger(subscription, 'limit');
259366
259872
  if (subscription === true) {
259367
259873
  // we set client.subscriptions[messageHash] to 1
259368
259874
  // once we have received the first delta and initialized the orderbook
@@ -259375,7 +259881,7 @@ class mexc extends _mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
259375
259881
  const cacheLength = storedOrderBook.cache.length;
259376
259882
  const snapshotDelay = this.handleOption('watchOrderBook', 'snapshotDelay', 25);
259377
259883
  if (cacheLength === snapshotDelay) {
259378
- this.spawn(this.loadOrderBook, client, messageHash, symbol);
259884
+ this.spawn(this.loadOrderBook, client, messageHash, symbol, limit, {});
259379
259885
  }
259380
259886
  storedOrderBook.cache.push(data);
259381
259887
  return;
@@ -270437,6 +270943,7 @@ class whitebit extends _whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
270437
270943
  // "params":[
270438
270944
  // true,
270439
270945
  // {
270946
+ // "timestamp": 1708679568.940867,
270440
270947
  // "asks":[
270441
270948
  // [ "21252.45","0.01957"],
270442
270949
  // ["21252.55","0.126205"],
@@ -270473,14 +270980,14 @@ class whitebit extends _whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] *
270473
270980
  const market = this.safeMarket(marketId);
270474
270981
  const symbol = market['symbol'];
270475
270982
  const data = this.safeValue(params, 1);
270476
- let orderbook = undefined;
270477
- if (symbol in this.orderbooks) {
270478
- orderbook = this.orderbooks[symbol];
270479
- }
270480
- else {
270481
- orderbook = this.orderBook();
270482
- this.orderbooks[symbol] = orderbook;
270983
+ const timestamp = this.safeTimestamp(data, 'timestamp');
270984
+ if (!(symbol in this.orderbooks)) {
270985
+ const ob = this.orderBook();
270986
+ this.orderbooks[symbol] = ob;
270483
270987
  }
270988
+ const orderbook = this.orderbooks[symbol];
270989
+ orderbook['timestamp'] = timestamp;
270990
+ orderbook['datetime'] = this.iso8601(timestamp);
270484
270991
  if (isSnapshot) {
270485
270992
  const snapshot = this.parseOrderBook(data, symbol);
270486
270993
  orderbook.reset(snapshot);
@@ -282994,6 +283501,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
282994
283501
  'fetchPremiumIndexOHLCV': false,
282995
283502
  'fetchTicker': true,
282996
283503
  'fetchTickers': true,
283504
+ 'fetchTime': true,
282997
283505
  'fetchTrades': true,
282998
283506
  'fetchTradingFee': true,
282999
283507
  'fetchWithdrawal': false,
@@ -283189,11 +283697,26 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283189
283697
  },
283190
283698
  });
283191
283699
  }
283700
+ async fetchTime(params = {}) {
283701
+ /**
283702
+ * @method
283703
+ * @name timex#fetchTime
283704
+ * @description fetches the current integer timestamp in milliseconds from the exchange server
283705
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
283706
+ * @returns {int} the current integer timestamp in milliseconds from the exchange server
283707
+ */
283708
+ const response = await this.tradingviewGetTime(params);
283709
+ //
283710
+ // 1708682617
283711
+ //
283712
+ return this.parseToInt(response) * 1000;
283713
+ }
283192
283714
  async fetchMarkets(params = {}) {
283193
283715
  /**
283194
283716
  * @method
283195
283717
  * @name timex#fetchMarkets
283196
283718
  * @description retrieves data on all markets for timex
283719
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listMarkets
283197
283720
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283198
283721
  * @returns {object[]} an array of objects representing market data
283199
283722
  */
@@ -283226,6 +283749,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283226
283749
  * @method
283227
283750
  * @name timex#fetchCurrencies
283228
283751
  * @description fetches all available currencies on an exchange
283752
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listCurrencies
283229
283753
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283230
283754
  * @returns {object} an associative dictionary of currencies
283231
283755
  */
@@ -283267,6 +283791,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283267
283791
  * @method
283268
283792
  * @name timex#fetchDeposits
283269
283793
  * @description fetch all deposits made to an account
283794
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Manager/getDeposits
283270
283795
  * @param {string} code unified currency code
283271
283796
  * @param {int} [since] the earliest time in ms to fetch deposits for
283272
283797
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -283302,6 +283827,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283302
283827
  * @method
283303
283828
  * @name timex#fetchWithdrawals
283304
283829
  * @description fetch all withdrawals made to an account
283830
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Manager/getWithdraws
283305
283831
  * @param {string} code unified currency code
283306
283832
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
283307
283833
  * @param {int} [limit] the maximum number of transaction structures to retrieve
@@ -283386,6 +283912,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283386
283912
  * @method
283387
283913
  * @name timex#fetchTickers
283388
283914
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
283915
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTickers
283389
283916
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
283390
283917
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283391
283918
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -283420,6 +283947,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283420
283947
  * @method
283421
283948
  * @name timex#fetchTicker
283422
283949
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
283950
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTickers
283423
283951
  * @param {string} symbol unified symbol of the market to fetch the ticker for
283424
283952
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283425
283953
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -283457,6 +283985,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283457
283985
  * @method
283458
283986
  * @name timex#fetchOrderBook
283459
283987
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
283988
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/orderbookV2
283460
283989
  * @param {string} symbol unified symbol of the market to fetch the order book for
283461
283990
  * @param {int} [limit] the maximum amount of order book entries to return
283462
283991
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -283503,6 +284032,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283503
284032
  * @method
283504
284033
  * @name timex#fetchTrades
283505
284034
  * @description get the list of most recent trades for a particular symbol
284035
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listTrades
283506
284036
  * @param {string} symbol unified symbol of the market to fetch trades for
283507
284037
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
283508
284038
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -283550,6 +284080,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283550
284080
  * @method
283551
284081
  * @name timex#fetchOHLCV
283552
284082
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
284083
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Public/listCandles
283553
284084
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
283554
284085
  * @param {string} timeframe the length of time each candle represents
283555
284086
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -283615,6 +284146,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283615
284146
  * @method
283616
284147
  * @name timex#fetchBalance
283617
284148
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
284149
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getBalances
283618
284150
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283619
284151
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
283620
284152
  */
@@ -283636,6 +284168,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283636
284168
  * @method
283637
284169
  * @name timex#createOrder
283638
284170
  * @description create a trade order
284171
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/createOrder
283639
284172
  * @param {string} symbol unified symbol of the market to create an order in
283640
284173
  * @param {string} type 'market' or 'limit'
283641
284174
  * @param {string} side 'buy' or 'sell'
@@ -283764,6 +284297,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283764
284297
  * @method
283765
284298
  * @name timex#cancelOrder
283766
284299
  * @description cancels an open order
284300
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/deleteOrders
283767
284301
  * @param {string} id order id
283768
284302
  * @param {string} symbol not used by timex cancelOrder ()
283769
284303
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -283777,6 +284311,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283777
284311
  * @method
283778
284312
  * @name timex#cancelOrders
283779
284313
  * @description cancel multiple orders
284314
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/deleteOrders
283780
284315
  * @param {string[]} ids order ids
283781
284316
  * @param {string} symbol unified market symbol, default is undefined
283782
284317
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -283818,6 +284353,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283818
284353
  * @method
283819
284354
  * @name timex#fetchOrder
283820
284355
  * @description fetches information on an order made by the user
284356
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getOrderDetails
283821
284357
  * @param {string} symbol not used by timex fetchOrder
283822
284358
  * @param {object} [params] extra parameters specific to the exchange API endpoint
283823
284359
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -283869,6 +284405,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283869
284405
  * @method
283870
284406
  * @name timex#fetchOpenOrders
283871
284407
  * @description fetch all unfilled currently open orders
284408
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getOpenOrders
283872
284409
  * @param {string} symbol unified market symbol
283873
284410
  * @param {int} [since] the earliest time in ms to fetch open orders for
283874
284411
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -283923,6 +284460,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283923
284460
  * @method
283924
284461
  * @name timex#fetchClosedOrders
283925
284462
  * @description fetches information on multiple closed orders made by the user
284463
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getOrders
283926
284464
  * @param {string} symbol unified market symbol of the market orders were made in
283927
284465
  * @param {int} [since] the earliest time in ms to fetch orders for
283928
284466
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -283982,6 +284520,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
283982
284520
  * @method
283983
284521
  * @name timex#fetchMyTrades
283984
284522
  * @description fetch all trades made by the user
284523
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/History/getTrades_1
283985
284524
  * @param {string} symbol unified market symbol
283986
284525
  * @param {int} [since] the earliest time in ms to fetch trades for
283987
284526
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -284060,6 +284599,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
284060
284599
  * @method
284061
284600
  * @name timex#fetchTradingFee
284062
284601
  * @description fetch the trading fees for a market
284602
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Trading/getFees
284063
284603
  * @param {string} symbol unified market symbol
284064
284604
  * @param {object} [params] extra parameters specific to the exchange API endpoint
284065
284605
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -284453,6 +284993,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
284453
284993
  * @method
284454
284994
  * @name timex#fetchDepositAddress
284455
284995
  * @description fetch the deposit address for a currency associated with this account, does not accept params["network"]
284996
+ * @see https://plasma-relay-backend.timex.io/swagger-ui/index.html?urls.primaryName=Relay#/Currency/selectCurrencyBySymbol
284456
284997
  * @param {string} code unified currency code
284457
284998
  * @param {object} [params] extra parameters specific to the exchange API endpoint
284458
284999
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -284515,7 +285056,7 @@ class timex extends _abstract_timex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
284515
285056
  if (Object.keys(params).length) {
284516
285057
  url += '?' + this.urlencodeWithArrayRepeat(params);
284517
285058
  }
284518
- if (api !== 'public') {
285059
+ if (api !== 'public' && api !== 'tradingview') {
284519
285060
  this.checkRequiredCredentials();
284520
285061
  const auth = this.stringToBase64(this.apiKey + ':' + this.secret);
284521
285062
  const secret = 'Basic ' + auth;
@@ -287156,9 +287697,9 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
287156
287697
  'fetchBalance': true,
287157
287698
  'fetchCanceledOrders': true,
287158
287699
  'fetchClosedOrders': true,
287700
+ 'fetchDeposit': true,
287159
287701
  'fetchDepositAddress': true,
287160
287702
  'fetchDepositAddresses': true,
287161
- 'fetchDeposit': true,
287162
287703
  'fetchDeposits': true,
287163
287704
  'fetchFundingHistory': false,
287164
287705
  'fetchFundingRate': false,
@@ -288142,6 +288683,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
288142
288683
  * @name upbit#createOrder
288143
288684
  * @description create a trade order
288144
288685
  * @see https://docs.upbit.com/reference/%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
288686
+ * @see https://global-docs.upbit.com/reference/order
288145
288687
  * @param {string} symbol unified symbol of the market to create an order in
288146
288688
  * @param {string} type 'market' or 'limit'
288147
288689
  * @param {string} side 'buy' or 'sell'
@@ -288149,6 +288691,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
288149
288691
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
288150
288692
  * @param {object} [params] extra parameters specific to the exchange API endpoint
288151
288693
  * @param {float} [params.cost] for market buy orders, the quote quantity that can be used as an alternative for the amount
288694
+ * @param {string} [params.timeInForce] 'IOC' or 'FOK'
288152
288695
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
288153
288696
  */
288154
288697
  await this.loadMarkets();
@@ -288205,6 +288748,13 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
288205
288748
  if (clientOrderId !== undefined) {
288206
288749
  request['identifier'] = clientOrderId;
288207
288750
  }
288751
+ if (type !== 'market') {
288752
+ const timeInForce = this.safeStringLower2(params, 'timeInForce', 'time_in_force');
288753
+ params = this.omit(params, 'timeInForce');
288754
+ if (timeInForce !== undefined) {
288755
+ request['time_in_force'] = timeInForce;
288756
+ }
288757
+ }
288208
288758
  params = this.omit(params, ['clientOrderId', 'identifier']);
288209
288759
  const response = await this.privatePostOrders(this.extend(request, params));
288210
288760
  //
@@ -288988,7 +289538,7 @@ class upbit extends _abstract_upbit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
288988
289538
  }
288989
289539
  if (api === 'private') {
288990
289540
  this.checkRequiredCredentials();
288991
- const nonce = this.nonce();
289541
+ const nonce = this.uuid();
288992
289542
  const request = {
288993
289543
  'access_key': this.apiKey,
288994
289544
  'nonce': nonce,
@@ -307318,7 +307868,7 @@ SOFTWARE.
307318
307868
 
307319
307869
  //-----------------------------------------------------------------------------
307320
307870
  // this is updated by vss.js when building
307321
- const version = '4.2.48';
307871
+ const version = '4.2.50';
307322
307872
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
307323
307873
  //-----------------------------------------------------------------------------
307324
307874