ccxt 4.1.80 → 4.1.81

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.
package/README.md CHANGED
@@ -209,13 +209,13 @@ console.log(version, Object.keys(exchanges));
209
209
 
210
210
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
211
211
 
212
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.80/dist/ccxt.browser.js
213
- * unpkg: https://unpkg.com/ccxt@4.1.80/dist/ccxt.browser.js
212
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.81/dist/ccxt.browser.js
213
+ * unpkg: https://unpkg.com/ccxt@4.1.81/dist/ccxt.browser.js
214
214
 
215
215
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
216
216
 
217
217
  ```HTML
218
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.80/dist/ccxt.browser.js"></script>
218
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.81/dist/ccxt.browser.js"></script>
219
219
  ```
220
220
 
221
221
  Creates a global `ccxt` object:
@@ -76612,6 +76612,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
76612
76612
  'v5/position/confirm-pending-mmr': 5,
76613
76613
  // account
76614
76614
  'v5/account/upgrade-to-uta': 5,
76615
+ 'v5/account/quick-repayment': 5,
76615
76616
  'v5/account/set-margin-mode': 5,
76616
76617
  'v5/account/set-hedging-mode': 5,
76617
76618
  'v5/account/mmp-modify': 5,
@@ -78259,8 +78260,9 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
78259
78260
  */
78260
78261
  await this.loadMarkets();
78261
78262
  let market = undefined;
78262
- const parsedSymbols = [];
78263
+ let parsedSymbols = undefined;
78263
78264
  if (symbols !== undefined) {
78265
+ parsedSymbols = [];
78264
78266
  const marketTypeInfo = this.handleMarketTypeAndParams('fetchTickers', undefined, params);
78265
78267
  const defaultType = marketTypeInfo[0]; // don't omit here
78266
78268
  // we can't use marketSymbols here due to the conflicing ids between markets
@@ -115088,6 +115090,9 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
115088
115090
  'addMargin': true,
115089
115091
  'cancelOrder': true,
115090
115092
  'cancelOrders': true,
115093
+ 'createMarketBuyOrderWithCost': true,
115094
+ 'createMarketOrderWithCost': false,
115095
+ 'createMarketSellOrderWithCost': false,
115091
115096
  'createOrder': true,
115092
115097
  'createOrders': true,
115093
115098
  'createPostOnlyOrder': true,
@@ -116620,6 +116625,7 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
116620
116625
  * @param {bool} [params.postOnly] true or false
116621
116626
  * @param {bool} [params.reduceOnly] true or false
116622
116627
  * @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
116628
+ * @param {float} [params.cost] *spot market buy only* the quote quantity that can be used as an alternative for the amount
116623
116629
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
116624
116630
  */
116625
116631
  await this.loadMarkets();
@@ -116837,16 +116843,27 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
116837
116843
  request['type'] = side + suffix;
116838
116844
  // limit orders require the amount in the base currency, market orders require the amount in the quote currency
116839
116845
  let quantity = undefined;
116840
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
116841
- if (createMarketBuyOrderRequiresPrice && isMarketOrder && (side === 'buy')) {
116842
- if (price === undefined) {
116843
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires a price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option to false and pass in the cost to spend into the amount parameter');
116846
+ let createMarketBuyOrderRequiresPrice = true;
116847
+ [createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrderRequest', 'createMarketBuyOrderRequiresPrice', true);
116848
+ if (isMarketOrder && (side === 'buy')) {
116849
+ const cost = this.safeNumber(params, 'cost');
116850
+ params = this.omit(params, 'cost');
116851
+ if (cost !== undefined) {
116852
+ quantity = this.costToPrecision(symbol, cost);
116853
+ }
116854
+ else if (createMarketBuyOrderRequiresPrice) {
116855
+ if (price === undefined) {
116856
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires a price argument for market buy orders on spot markets to calculate the total amount to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
116857
+ }
116858
+ else {
116859
+ const amountString = this.numberToString(amount);
116860
+ const priceString = this.numberToString(price);
116861
+ const costRequest = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
116862
+ quantity = this.costToPrecision(symbol, costRequest);
116863
+ }
116844
116864
  }
116845
116865
  else {
116846
- const amountString = this.numberToString(amount);
116847
- const priceString = this.numberToString(price);
116848
- const cost = this.parseNumber(_base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString));
116849
- quantity = this.priceToPrecision(symbol, cost);
116866
+ quantity = this.costToPrecision(symbol, amount);
116850
116867
  }
116851
116868
  }
116852
116869
  else {
@@ -116865,6 +116882,25 @@ class digifinex extends _abstract_digifinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["
116865
116882
  params = this.omit(params, ['postOnly']);
116866
116883
  return this.extend(request, params);
116867
116884
  }
116885
+ async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
116886
+ /**
116887
+ * @method
116888
+ * @name digifinex#createMarketBuyOrderWithCost
116889
+ * @description create a market buy order by providing the symbol and cost
116890
+ * @see https://docs.digifinex.com/en-ww/spot/v3/rest.html#create-new-order
116891
+ * @param {string} symbol unified symbol of the market to create an order in
116892
+ * @param {float} cost how much you want to trade in units of the quote currency
116893
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
116894
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
116895
+ */
116896
+ await this.loadMarkets();
116897
+ const market = this.market(symbol);
116898
+ if (!market['spot']) {
116899
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
116900
+ }
116901
+ params['createMarketBuyOrderRequiresPrice'] = false;
116902
+ return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
116903
+ }
116868
116904
  async cancelOrder(id, symbol = undefined, params = {}) {
116869
116905
  /**
116870
116906
  * @method
@@ -274389,7 +274425,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274389
274425
  * @method
274390
274426
  * @name whitebit#fetchMarkets
274391
274427
  * @description retrieves data on all markets for whitebit
274392
- * @see https://whitebit-exchange.github.io/api-docs/docs/Public/http-v4#market-info
274428
+ * @see https://docs.whitebit.com/public/http-v4/#market-info
274393
274429
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274394
274430
  * @returns {object[]} an array of objects representing market data
274395
274431
  */
@@ -274513,6 +274549,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274513
274549
  * @method
274514
274550
  * @name whitebit#fetchCurrencies
274515
274551
  * @description fetches all available currencies on an exchange
274552
+ * @see https://docs.whitebit.com/public/http-v4/#asset-status-list
274516
274553
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274517
274554
  * @returns {object} an associative dictionary of currencies
274518
274555
  */
@@ -274572,6 +274609,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274572
274609
  * @name whitebit#fetchTransactionFees
274573
274610
  * @deprecated
274574
274611
  * @description please use fetchDepositWithdrawFees instead
274612
+ * @see https://docs.whitebit.com/public/http-v4/#fee
274575
274613
  * @param {string[]|undefined} codes not used by fetchTransactionFees ()
274576
274614
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274577
274615
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -274626,6 +274664,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274626
274664
  * @method
274627
274665
  * @name whitebit#fetchDepositWithdrawFees
274628
274666
  * @description fetch deposit and withdraw fees
274667
+ * @see https://docs.whitebit.com/public/http-v4/#fee
274629
274668
  * @param {string[]|undefined} codes not used by fetchDepositWithdrawFees ()
274630
274669
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274631
274670
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -274775,6 +274814,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274775
274814
  * @method
274776
274815
  * @name whitebit#fetchTradingFees
274777
274816
  * @description fetch the trading fees for multiple markets
274817
+ * @see https://docs.whitebit.com/public/http-v4/#asset-status-list
274778
274818
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274779
274819
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
274780
274820
  */
@@ -274822,6 +274862,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274822
274862
  * @method
274823
274863
  * @name whitebit#fetchTicker
274824
274864
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
274865
+ * @see https://docs.whitebit.com/public/http-v4/#market-activity
274825
274866
  * @param {string} symbol unified symbol of the market to fetch the ticker for
274826
274867
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274827
274868
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -274910,6 +274951,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274910
274951
  * @method
274911
274952
  * @name whitebit#fetchTickers
274912
274953
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
274954
+ * @see https://docs.whitebit.com/public/http-v4/#market-activity
274913
274955
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
274914
274956
  * @param {object} [params] extra parameters specific to the exchange API endpoint
274915
274957
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -274943,8 +274985,8 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274943
274985
  /**
274944
274986
  * @method
274945
274987
  * @name whitebit#fetchOrderBook
274946
- * @see https://whitebit-exchange.github.io/api-docs/public/http-v4/#orderbook
274947
274988
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
274989
+ * @see https://docs.whitebit.com/public/http-v4/#orderbook
274948
274990
  * @param {string} symbol unified symbol of the market to fetch the order book for
274949
274991
  * @param {int} [limit] the maximum amount of order book entries to return
274950
274992
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -274986,6 +275028,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
274986
275028
  * @method
274987
275029
  * @name whitebit#fetchTrades
274988
275030
  * @description get the list of most recent trades for a particular symbol
275031
+ * @see https://docs.whitebit.com/public/http-v4/#recent-trades
274989
275032
  * @param {string} symbol unified symbol of the market to fetch trades for
274990
275033
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
274991
275034
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -275017,6 +275060,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275017
275060
  * @method
275018
275061
  * @name whitebit#fetchMyTrades
275019
275062
  * @description fetch all trades made by the user
275063
+ * @see https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-history
275020
275064
  * @param {string} symbol unified symbol of the market to fetch trades for
275021
275065
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
275022
275066
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -275170,6 +275214,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275170
275214
  * @method
275171
275215
  * @name whitebit#fetchOHLCV
275172
275216
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
275217
+ * @see https://docs.whitebit.com/public/http-v1/#kline
275173
275218
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
275174
275219
  * @param {string} timeframe the length of time each candle represents
275175
275220
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -275236,6 +275281,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275236
275281
  * @method
275237
275282
  * @name whitebit#fetchStatus
275238
275283
  * @description the latest known information on the availability of the exchange API
275284
+ * @see https://docs.whitebit.com/public/http-v4/#server-status
275239
275285
  * @param {object} [params] extra parameters specific to the exchange API endpoint
275240
275286
  * @returns {object} a [status structure]{@link https://docs.ccxt.com/#/?id=exchange-status-structure}
275241
275287
  */
@@ -275259,6 +275305,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275259
275305
  * @method
275260
275306
  * @name whitebit#fetchTime
275261
275307
  * @description fetches the current integer timestamp in milliseconds from the exchange server
275308
+ * @see https://docs.whitebit.com/public/http-v4/#server-time
275262
275309
  * @param {object} [params] extra parameters specific to the exchange API endpoint
275263
275310
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
275264
275311
  */
@@ -275275,6 +275322,11 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275275
275322
  * @method
275276
275323
  * @name whitebit#createOrder
275277
275324
  * @description create a trade order
275325
+ * @see https://docs.whitebit.com/private/http-trade-v4/#create-limit-order
275326
+ * @see https://docs.whitebit.com/private/http-trade-v4/#create-market-order
275327
+ * @see https://docs.whitebit.com/private/http-trade-v4/#create-buy-stock-market-order
275328
+ * @see https://docs.whitebit.com/private/http-trade-v4/#create-stop-limit-order
275329
+ * @see https://docs.whitebit.com/private/http-trade-v4/#create-stop-market-order
275278
275330
  * @param {string} symbol unified symbol of the market to create an order in
275279
275331
  * @param {string} type 'market' or 'limit'
275280
275332
  * @param {string} side 'buy' or 'sell'
@@ -275311,45 +275363,50 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275311
275363
  if (postOnly) {
275312
275364
  request['postOnly'] = true;
275313
275365
  }
275314
- let method;
275315
275366
  if (marginMode !== undefined && marginMode !== 'cross') {
275316
275367
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' createOrder() is only available for cross margin');
275317
275368
  }
275369
+ params = this.omit(query, ['postOnly', 'triggerPrice', 'stopPrice']);
275318
275370
  const useCollateralEndpoint = marginMode !== undefined || marketType === 'swap';
275371
+ let response = undefined;
275319
275372
  if (isStopOrder) {
275320
275373
  request['activation_price'] = this.priceToPrecision(symbol, stopPrice);
275321
275374
  if (isLimitOrder) {
275322
275375
  // stop limit order
275323
- method = 'v4PrivatePostOrderStopLimit';
275324
275376
  request['price'] = this.priceToPrecision(symbol, price);
275377
+ response = await this.v4PrivatePostOrderStopLimit(this.extend(request, params));
275325
275378
  }
275326
275379
  else {
275327
275380
  // stop market order
275328
- method = 'v4PrivatePostOrderStopMarket';
275329
275381
  if (useCollateralEndpoint) {
275330
- method = 'v4PrivatePostOrderCollateralTriggerMarket';
275382
+ response = await this.v4PrivatePostOrderCollateralTriggerMarket(this.extend(request, params));
275383
+ }
275384
+ else {
275385
+ response = await this.v4PrivatePostOrderStopMarket(this.extend(request, params));
275331
275386
  }
275332
275387
  }
275333
275388
  }
275334
275389
  else {
275335
275390
  if (isLimitOrder) {
275336
275391
  // limit order
275337
- method = 'v4PrivatePostOrderNew';
275392
+ request['price'] = this.priceToPrecision(symbol, price);
275338
275393
  if (useCollateralEndpoint) {
275339
- method = 'v4PrivatePostOrderCollateralLimit';
275394
+ response = await this.v4PrivatePostOrderCollateralLimit(this.extend(request, params));
275395
+ }
275396
+ else {
275397
+ response = await this.v4PrivatePostOrderNew(this.extend(request, params));
275340
275398
  }
275341
- request['price'] = this.priceToPrecision(symbol, price);
275342
275399
  }
275343
275400
  else {
275344
275401
  // market order
275345
- method = 'v4PrivatePostOrderStockMarket';
275346
275402
  if (useCollateralEndpoint) {
275347
- method = 'v4PrivatePostOrderCollateralMarket';
275403
+ response = await this.v4PrivatePostOrderCollateralMarket(this.extend(request, params));
275404
+ }
275405
+ else {
275406
+ response = await this.v4PrivatePostOrderStockMarket(this.extend(request, params));
275348
275407
  }
275349
275408
  }
275350
275409
  }
275351
- params = this.omit(query, ['postOnly', 'triggerPrice', 'stopPrice']);
275352
- const response = await this[method](this.extend(request, params));
275353
275410
  return this.parseOrder(response);
275354
275411
  }
275355
275412
  async cancelOrder(id, symbol = undefined, params = {}) {
@@ -275357,6 +275414,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275357
275414
  * @method
275358
275415
  * @name whitebit#cancelOrder
275359
275416
  * @description cancels an open order
275417
+ * @see https://docs.whitebit.com/private/http-trade-v4/#cancel-order
275360
275418
  * @param {string} id order id
275361
275419
  * @param {string} symbol unified symbol of the market the order was made in
275362
275420
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -275400,14 +275458,17 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275400
275458
  * @method
275401
275459
  * @name whitebit#fetchBalance
275402
275460
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
275461
+ * @see https://docs.whitebit.com/private/http-main-v4/#main-balance
275462
+ * @see https://docs.whitebit.com/private/http-trade-v4/#trading-balance
275403
275463
  * @param {object} [params] extra parameters specific to the exchange API endpoint
275404
275464
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
275405
275465
  */
275406
275466
  await this.loadMarkets();
275407
- const [marketType, query] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
275408
- let method = undefined;
275467
+ let marketType = undefined;
275468
+ [marketType, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
275469
+ let response = undefined;
275409
275470
  if (marketType === 'swap') {
275410
- method = 'v4PrivatePostCollateralAccountBalance';
275471
+ response = await this.v4PrivatePostCollateralAccountBalance(params);
275411
275472
  }
275412
275473
  else {
275413
275474
  const options = this.safeValue(this.options, 'fetchBalance', {});
@@ -275415,13 +275476,12 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275415
275476
  const account = this.safeString(params, 'account', defaultAccount);
275416
275477
  params = this.omit(params, 'account');
275417
275478
  if (account === 'main') {
275418
- method = 'v4PrivatePostMainAccountBalance';
275479
+ response = await this.v4PrivatePostMainAccountBalance(params);
275419
275480
  }
275420
275481
  else {
275421
- method = 'v4PrivatePostTradeAccountBalance';
275482
+ response = await this.v4PrivatePostTradeAccountBalance(params);
275422
275483
  }
275423
275484
  }
275424
- const response = await this[method](query);
275425
275485
  //
275426
275486
  // main account
275427
275487
  //
@@ -275451,6 +275511,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275451
275511
  * @method
275452
275512
  * @name whitebit#fetchOpenOrders
275453
275513
  * @description fetch all unfilled currently open orders
275514
+ * @see https://docs.whitebit.com/private/http-trade-v4/#query-unexecutedactive-orders
275454
275515
  * @param {string} symbol unified market symbol
275455
275516
  * @param {int} [since] the earliest time in ms to fetch open orders for
275456
275517
  * @param {int} [limit] the maximum number of open order structures to retrieve
@@ -275496,6 +275557,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275496
275557
  * @method
275497
275558
  * @name whitebit#fetchClosedOrders
275498
275559
  * @description fetches information on multiple closed orders made by the user
275560
+ * @see https://docs.whitebit.com/private/http-trade-v4/#query-executed-orders
275499
275561
  * @param {string} symbol unified market symbol of the market orders were made in
275500
275562
  * @param {int} [since] the earliest time in ms to fetch orders for
275501
275563
  * @param {int} [limit] the maximum number of orde structures to retrieve
@@ -275656,6 +275718,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275656
275718
  * @method
275657
275719
  * @name whitebit#fetchOrderTrades
275658
275720
  * @description fetch all the trades made from a single order
275721
+ * @see https://docs.whitebit.com/private/http-trade-v4/#query-executed-order-deals
275659
275722
  * @param {string} id order id
275660
275723
  * @param {string} symbol unified market symbol
275661
275724
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -275703,6 +275766,8 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275703
275766
  * @method
275704
275767
  * @name whitebit#fetchDepositAddress
275705
275768
  * @description fetch the deposit address for a currency associated with this account
275769
+ * @see https://docs.whitebit.com/private/http-main-v4/#get-fiat-deposit-address
275770
+ * @see https://docs.whitebit.com/private/http-main-v4/#get-cryptocurrency-deposit-address
275706
275771
  * @param {string} code unified currency code
275707
275772
  * @param {object} [params] extra parameters specific to the exchange API endpoint
275708
275773
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -275712,10 +275777,9 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275712
275777
  const request = {
275713
275778
  'ticker': currency['id'],
275714
275779
  };
275715
- let method = 'v4PrivatePostMainAccountAddress';
275780
+ let response = undefined;
275716
275781
  if (this.isFiat(code)) {
275717
- method = 'v4PrivatePostMainAccountFiatDepositUrl';
275718
- const provider = this.safeNumber(params, 'provider');
275782
+ const provider = this.safeString(params, 'provider');
275719
275783
  if (provider === undefined) {
275720
275784
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchDepositAddress() requires a provider when the ticker is fiat');
275721
275785
  }
@@ -275729,8 +275793,11 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275729
275793
  if (uniqueId === undefined) {
275730
275794
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchDepositAddress() requires an uniqueId when the ticker is fiat');
275731
275795
  }
275796
+ response = await this.v4PrivatePostMainAccountFiatDepositUrl(this.extend(request, params));
275797
+ }
275798
+ else {
275799
+ response = await this.v4PrivatePostMainAccountAddress(this.extend(request, params));
275732
275800
  }
275733
- const response = await this[method](this.extend(request, params));
275734
275801
  //
275735
275802
  // fiat
275736
275803
  //
@@ -275775,6 +275842,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275775
275842
  * @method
275776
275843
  * @name whitebit#setLeverage
275777
275844
  * @description set the level of leverage for a market
275845
+ * @see https://docs.whitebit.com/private/http-trade-v4/#change-collateral-account-leverage
275778
275846
  * @param {float} leverage the rate of leverage
275779
275847
  * @param {string} symbol unified market symbol
275780
275848
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -275800,7 +275868,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275800
275868
  * @method
275801
275869
  * @name whitebit#transfer
275802
275870
  * @description transfer currency internally between wallets on the same account
275803
- * @see https://github.com/whitebit-exchange/api-docs/blob/main/docs/Private/http-main-v4.md#transfer-between-main-and-trade-balances
275871
+ * @see https://docs.whitebit.com/private/http-main-v4/#transfer-between-main-and-trade-balances
275804
275872
  * @param {string} code unified currency code
275805
275873
  * @param {float} amount amount to transfer
275806
275874
  * @param {string} fromAccount account to transfer from - main, spot, collateral
@@ -275847,6 +275915,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275847
275915
  * @method
275848
275916
  * @name whitebit#withdraw
275849
275917
  * @description make a withdrawal
275918
+ * @see https://docs.whitebit.com/private/http-main-v4/#create-withdraw-request
275850
275919
  * @param {string} code unified currency code
275851
275920
  * @param {float} amount the amount to withdraw
275852
275921
  * @param {string} address the address to withdraw to
@@ -275973,6 +276042,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
275973
276042
  * @method
275974
276043
  * @name whitebit#fetchDeposit
275975
276044
  * @description fetch information on a deposit
276045
+ * @see https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
275976
276046
  * @param {string} id deposit id
275977
276047
  * @param {string} code not used by whitebit fetchDeposit ()
275978
276048
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -276037,6 +276107,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
276037
276107
  * @method
276038
276108
  * @name whitebit#fetchDeposits
276039
276109
  * @description fetch all deposits made to an account
276110
+ * @see https://docs.whitebit.com/private/http-main-v4/#get-depositwithdraw-history
276040
276111
  * @param {string} code unified currency code
276041
276112
  * @param {int} [since] the earliest time in ms to fetch deposits for
276042
276113
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -276103,7 +276174,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
276103
276174
  * @method
276104
276175
  * @name whitebit#fetchBorrowInterest
276105
276176
  * @description fetch the interest owed by the user for borrowing currency for margin trading
276106
- * @see https://github.com/whitebit-exchange/api-docs/blob/main/docs/Private/http-trade-v4.md#open-positions
276177
+ * @see https://docs.whitebit.com/private/http-trade-v4/#open-positions
276107
276178
  * @param {string} code unified currency code
276108
276179
  * @param {string} symbol unified market symbol
276109
276180
  * @param {int} [since] the earliest time in ms to fetch borrrow interest for
@@ -276182,7 +276253,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
276182
276253
  /**
276183
276254
  * @method
276184
276255
  * @name whitebit#fetchFundingRate
276185
- * @see https://whitebit-exchange.github.io/api-docs/public/http-v4/#available-futures-markets-list
276256
+ * @see https://docs.whitebit.com/public/http-v4/#available-futures-markets-list
276186
276257
  * @description fetch the current funding rate
276187
276258
  * @param {string} symbol unified market symbol
276188
276259
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -276197,7 +276268,7 @@ class whitebit extends _abstract_whitebit_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
276197
276268
  /**
276198
276269
  * @method
276199
276270
  * @name whitebit#fetchFundingRates
276200
- * @see https://whitebit-exchange.github.io/api-docs/public/http-v4/#available-futures-markets-list
276271
+ * @see https://docs.whitebit.com/public/http-v4/#available-futures-markets-list
276201
276272
  * @description fetch the funding rate for multiple markets
276202
276273
  * @param {string[]|undefined} symbols list of unified market symbols
276203
276274
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -288562,7 +288633,7 @@ SOFTWARE.
288562
288633
 
288563
288634
  //-----------------------------------------------------------------------------
288564
288635
  // this is updated by vss.js when building
288565
- const version = '4.1.80';
288636
+ const version = '4.1.81';
288566
288637
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
288567
288638
  //-----------------------------------------------------------------------------
288568
288639