ccxt 4.1.81 → 4.1.82

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.
@@ -79201,7 +79201,7 @@ class bybit extends _abstract_bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
79201
79201
  * @see https://bybit-exchange.github.io/docs/v5/account/wallet-balance
79202
79202
  * @param {object} [params] extra parameters specific to the exchange API endpoint
79203
79203
  * @param {string} [params.type] wallet type, ['spot', 'swap', 'fund']
79204
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
79204
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
79205
79205
  */
79206
79206
  await this.loadMarkets();
79207
79207
  const request = {};
@@ -91979,6 +91979,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
91979
91979
  * @method
91980
91980
  * @name coinex#fetchMarkets
91981
91981
  * @description retrieves data on all markets for coinex
91982
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market002_all_market_info
91983
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http006_market_list
91982
91984
  * @param {object} [params] extra parameters specific to the exchange API endpoint
91983
91985
  * @returns {object[]} an array of objects representing market data
91984
91986
  */
@@ -92250,6 +92252,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92250
92252
  * @method
92251
92253
  * @name coinex#fetchTicker
92252
92254
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
92255
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market007_single_market_ticker
92256
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http008_market_ticker
92253
92257
  * @param {string} symbol unified symbol of the market to fetch the ticker for
92254
92258
  * @param {object} [params] extra parameters specific to the exchange API endpoint
92255
92259
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -92259,8 +92263,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92259
92263
  const request = {
92260
92264
  'market': market['id'],
92261
92265
  };
92262
- const method = market['swap'] ? 'perpetualPublicGetMarketTicker' : 'publicGetMarketTicker';
92263
- const response = await this[method](this.extend(request, params));
92266
+ let response = undefined;
92267
+ if (market['swap']) {
92268
+ response = await this.perpetualPublicGetMarketTicker(this.extend(request, params));
92269
+ }
92270
+ else {
92271
+ response = await this.publicGetMarketTicker(this.extend(request, params));
92272
+ }
92264
92273
  //
92265
92274
  // Spot
92266
92275
  //
@@ -92336,8 +92345,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92336
92345
  market = this.market(symbol);
92337
92346
  }
92338
92347
  const [marketType, query] = this.handleMarketTypeAndParams('fetchTickers', market, params);
92339
- const method = (marketType === 'swap') ? 'perpetualPublicGetMarketTickerAll' : 'publicGetMarketTickerAll';
92340
- const response = await this[method](query);
92348
+ let response = undefined;
92349
+ if (marketType === 'swap') {
92350
+ response = await this.perpetualPublicGetMarketTickerAll(query);
92351
+ }
92352
+ else {
92353
+ response = await this.publicGetMarketTickerAll();
92354
+ }
92341
92355
  //
92342
92356
  // Spot
92343
92357
  //
@@ -92419,6 +92433,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92419
92433
  * @method
92420
92434
  * @name coinex#fetchTime
92421
92435
  * @description fetches the current integer timestamp in milliseconds from the exchange server
92436
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http005_system_time
92422
92437
  * @param {object} [params] extra parameters specific to the exchange API endpoint
92423
92438
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
92424
92439
  */
@@ -92437,6 +92452,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92437
92452
  * @method
92438
92453
  * @name coinex#fetchOrderBook
92439
92454
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
92455
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market004_market_depth
92456
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http010_market_depth
92440
92457
  * @param {string} symbol unified symbol of the market to fetch the order book for
92441
92458
  * @param {int} [limit] the maximum amount of order book entries to return
92442
92459
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -92452,8 +92469,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92452
92469
  'merge': '0',
92453
92470
  'limit': limit.toString(),
92454
92471
  };
92455
- const method = market['swap'] ? 'perpetualPublicGetMarketDepth' : 'publicGetMarketDepth';
92456
- const response = await this[method](this.extend(request, params));
92472
+ let response = undefined;
92473
+ if (market['swap']) {
92474
+ response = await this.perpetualPublicGetMarketDepth(this.extend(request, params));
92475
+ }
92476
+ else {
92477
+ response = await this.publicGetMarketDepth(this.extend(request, params));
92478
+ }
92457
92479
  //
92458
92480
  // Spot
92459
92481
  //
@@ -92633,6 +92655,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92633
92655
  * @method
92634
92656
  * @name coinex#fetchTrades
92635
92657
  * @description get the list of most recent trades for a particular symbol
92658
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market005_market_deals
92659
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http011_market_deals
92636
92660
  * @param {string} symbol unified symbol of the market to fetch trades for
92637
92661
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
92638
92662
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -92648,8 +92672,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92648
92672
  if (limit !== undefined) {
92649
92673
  request['limit'] = limit;
92650
92674
  }
92651
- const method = market['swap'] ? 'perpetualPublicGetMarketDeals' : 'publicGetMarketDeals';
92652
- const response = await this[method](this.extend(request, params));
92675
+ let response = undefined;
92676
+ if (market['swap']) {
92677
+ response = await this.perpetualPublicGetMarketDeals(this.extend(request, params));
92678
+ }
92679
+ else {
92680
+ response = await this.publicGetMarketDeals(this.extend(request, params));
92681
+ }
92653
92682
  //
92654
92683
  // Spot and Swap
92655
92684
  //
@@ -92675,6 +92704,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92675
92704
  * @method
92676
92705
  * @name coinex#fetchTradingFee
92677
92706
  * @description fetch the trading fees for a market
92707
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market003_single_market_info
92678
92708
  * @param {string} symbol unified market symbol
92679
92709
  * @param {object} [params] extra parameters specific to the exchange API endpoint
92680
92710
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -92709,6 +92739,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92709
92739
  * @method
92710
92740
  * @name coinex#fetchTradingFees
92711
92741
  * @description fetch the trading fees for multiple markets
92742
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market002_all_market_info
92712
92743
  * @param {object} [params] extra parameters specific to the exchange API endpoint
92713
92744
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
92714
92745
  */
@@ -92781,6 +92812,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92781
92812
  * @method
92782
92813
  * @name coinex#fetchOHLCV
92783
92814
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
92815
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market006_market_kline
92816
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http012_market_kline
92784
92817
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
92785
92818
  * @param {string} timeframe the length of time each candle represents
92786
92819
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -92797,8 +92830,13 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
92797
92830
  if (limit !== undefined) {
92798
92831
  request['limit'] = limit;
92799
92832
  }
92800
- const method = market['swap'] ? 'perpetualPublicGetMarketKline' : 'publicGetMarketKline';
92801
- const response = await this[method](this.extend(request, params));
92833
+ let response = undefined;
92834
+ if (market['swap']) {
92835
+ response = await this.perpetualPublicGetMarketKline(this.extend(request, params));
92836
+ }
92837
+ else {
92838
+ response = await this.publicGetMarketKline(this.extend(request, params));
92839
+ }
92802
92840
  //
92803
92841
  // Spot
92804
92842
  //
@@ -94046,6 +94084,10 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94046
94084
  * @method
94047
94085
  * @name coinex#cancelOrder
94048
94086
  * @description cancels an open order
94087
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade018_cancle_stop_pending_order
94088
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade015_cancel_order
94089
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http023_cancel_stop_order
94090
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http021_cancel_order
94049
94091
  * @param {string} id order id
94050
94092
  * @param {string} symbol unified symbol of the market the order was made in
94051
94093
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -94063,15 +94105,6 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94063
94105
  };
94064
94106
  const idRequest = swap ? 'order_id' : 'id';
94065
94107
  request[idRequest] = id;
94066
- let method = swap ? 'perpetualPrivatePostOrderCancel' : 'privateDeleteOrderPending';
94067
- if (stop) {
94068
- if (swap) {
94069
- method = 'perpetualPrivatePostOrderCancelStop';
94070
- }
94071
- else {
94072
- method = 'privateDeleteOrderStopPendingId';
94073
- }
94074
- }
94075
94108
  const accountId = this.safeInteger(params, 'account_id');
94076
94109
  const defaultType = this.safeString(this.options, 'defaultType');
94077
94110
  if (defaultType === 'margin') {
@@ -94081,7 +94114,23 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94081
94114
  request['account_id'] = accountId;
94082
94115
  }
94083
94116
  const query = this.omit(params, ['stop', 'account_id']);
94084
- const response = await this[method](this.extend(request, query));
94117
+ let response = undefined;
94118
+ if (stop) {
94119
+ if (swap) {
94120
+ response = await this.perpetualPrivatePostOrderCancelStop(this.extend(request, query));
94121
+ }
94122
+ else {
94123
+ response = await this.privateDeleteOrderStopPendingId(this.extend(request, query));
94124
+ }
94125
+ }
94126
+ else {
94127
+ if (swap) {
94128
+ response = await this.perpetualPrivatePostOrderCancel(this.extend(request, query));
94129
+ }
94130
+ else {
94131
+ response = await this.privateDeleteOrderPending(this.extend(request, query));
94132
+ }
94133
+ }
94085
94134
  //
94086
94135
  // Spot and Margin
94087
94136
  //
@@ -94196,6 +94245,10 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94196
94245
  * @method
94197
94246
  * @name coinex#cancelAllOrders
94198
94247
  * @description cancel all open orders in a market
94248
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade018_cancle_stop_pending_order
94249
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade015_cancel_order
94250
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http024_cancel_stop_all
94251
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http022_cancel_all
94199
94252
  * @param {string} symbol unified market symbol of the market to cancel orders in
94200
94253
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94201
94254
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -94214,22 +94267,25 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94214
94267
  };
94215
94268
  const swap = market['swap'];
94216
94269
  const stop = this.safeValue(params, 'stop');
94217
- let method;
94270
+ params = this.omit(params, ['stop', 'account_id']);
94271
+ let response = undefined;
94218
94272
  if (swap) {
94219
- method = 'perpetualPrivatePostOrderCancelAll';
94220
94273
  if (stop) {
94221
- method = 'perpetualPrivatePostOrderCancelStopAll';
94274
+ response = await this.perpetualPrivatePostOrderCancelStopAll(this.extend(request, params));
94275
+ }
94276
+ else {
94277
+ response = await this.perpetualPrivatePostOrderCancelAll(this.extend(request, params));
94222
94278
  }
94223
94279
  }
94224
94280
  else {
94225
- method = 'privateDeleteOrderPending';
94281
+ request['account_id'] = accountId;
94226
94282
  if (stop) {
94227
- method = 'privateDeleteOrderStopPending';
94283
+ response = await this.privateDeleteOrderStopPending(this.extend(request, params));
94284
+ }
94285
+ else {
94286
+ response = await this.privateDeleteOrderPending(this.extend(request, params));
94228
94287
  }
94229
- request['account_id'] = accountId;
94230
94288
  }
94231
- params = this.omit(params, ['stop', 'account_id']);
94232
- const response = await this[method](this.extend(request, params));
94233
94289
  //
94234
94290
  // Spot and Margin
94235
94291
  //
@@ -94246,6 +94302,9 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94246
94302
  * @method
94247
94303
  * @name coinex#fetchOrder
94248
94304
  * @description fetches information on an order made by the user
94305
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http028_stop_status
94306
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http026_order_status
94307
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade007_order_status
94249
94308
  * @param {string} symbol unified symbol of the market the order was made in
94250
94309
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94251
94310
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -94257,6 +94316,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94257
94316
  const market = this.market(symbol);
94258
94317
  const swap = market['swap'];
94259
94318
  const stop = this.safeValue(params, 'stop');
94319
+ params = this.omit(params, 'stop');
94260
94320
  const request = {
94261
94321
  'market': market['id'],
94262
94322
  // 'id': id, // SPOT
@@ -94264,15 +94324,18 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94264
94324
  };
94265
94325
  const idRequest = swap ? 'order_id' : 'id';
94266
94326
  request[idRequest] = id;
94267
- let method = undefined;
94327
+ let response = undefined;
94268
94328
  if (swap) {
94269
- method = stop ? 'perpetualPrivateGetOrderStopStatus' : 'perpetualPrivateGetOrderStatus';
94329
+ if (stop) {
94330
+ response = await this.perpetualPrivateGetOrderStopStatus(this.extend(request, params));
94331
+ }
94332
+ else {
94333
+ response = await this.perpetualPrivateGetOrderStatus(this.extend(request, params));
94334
+ }
94270
94335
  }
94271
94336
  else {
94272
- method = 'privateGetOrderStatus';
94337
+ response = await this.privateGetOrderStatus(this.extend(request, params));
94273
94338
  }
94274
- params = this.omit(params, 'stop');
94275
- const response = await this[method](this.extend(request, params));
94276
94339
  //
94277
94340
  // Spot
94278
94341
  //
@@ -94392,15 +94455,20 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94392
94455
  request['market'] = market['id'];
94393
94456
  }
94394
94457
  const [marketType, query] = this.handleMarketTypeAndParams('fetchOrdersByStatus', market, params);
94395
- let method = undefined;
94458
+ const accountId = this.safeInteger(params, 'account_id');
94459
+ const defaultType = this.safeString(this.options, 'defaultType');
94460
+ if (defaultType === 'margin') {
94461
+ if (accountId === undefined) {
94462
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchOpenOrders() and fetchClosedOrders() require an account_id parameter for margin orders');
94463
+ }
94464
+ request['account_id'] = accountId;
94465
+ }
94466
+ params = this.omit(query, 'account_id');
94467
+ let response = undefined;
94396
94468
  if (marketType === 'swap') {
94397
94469
  if (symbol === undefined) {
94398
94470
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchOrdersByStatus() requires a symbol argument for swap markets');
94399
94471
  }
94400
- method = 'perpetualPrivateGetOrder' + this.capitalize(status);
94401
- if (stop) {
94402
- method = 'perpetualPrivateGetOrderStopPending';
94403
- }
94404
94472
  if (side !== undefined) {
94405
94473
  request['side'] = side;
94406
94474
  }
@@ -94408,24 +94476,37 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94408
94476
  request['side'] = 0;
94409
94477
  }
94410
94478
  request['offset'] = 0;
94411
- }
94412
- else {
94413
- method = 'privateGetOrder' + this.capitalize(status);
94414
94479
  if (stop) {
94415
- method = 'privateGetOrderStop' + this.capitalize(status);
94480
+ response = await this.perpetualPrivateGetOrderStopPending(this.extend(request, params));
94481
+ }
94482
+ else {
94483
+ if (status === 'finished') {
94484
+ response = await this.perpetualPrivateGetOrderFinished(this.extend(request, params));
94485
+ }
94486
+ else if (status === 'pending') {
94487
+ response = await this.perpetualPrivateGetOrderPending(this.extend(request, params));
94488
+ }
94416
94489
  }
94417
- request['page'] = 1;
94418
94490
  }
94419
- const accountId = this.safeInteger(params, 'account_id');
94420
- const defaultType = this.safeString(this.options, 'defaultType');
94421
- if (defaultType === 'margin') {
94422
- if (accountId === undefined) {
94423
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchOpenOrders() and fetchClosedOrders() require an account_id parameter for margin orders');
94491
+ else {
94492
+ request['page'] = 1;
94493
+ if (status === 'finished') {
94494
+ if (stop) {
94495
+ response = await this.privateGetOrderStopFinished(this.extend(request, params));
94496
+ }
94497
+ else {
94498
+ response = await this.privateGetOrderFinished(this.extend(request, params));
94499
+ }
94500
+ }
94501
+ else if (status === 'pending') {
94502
+ if (stop) {
94503
+ response = await this.privateGetOrderStopPending(this.extend(request, params));
94504
+ }
94505
+ else {
94506
+ response = await this.privateGetOrderPending(this.extend(request, params));
94507
+ }
94424
94508
  }
94425
- request['account_id'] = accountId;
94426
94509
  }
94427
- params = this.omit(query, 'account_id');
94428
- const response = await this[method](this.extend(request, params));
94429
94510
  //
94430
94511
  // Spot and Margin
94431
94512
  //
@@ -94586,6 +94667,10 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94586
94667
  * @method
94587
94668
  * @name coinex#fetchOpenOrders
94588
94669
  * @description fetch all unfilled currently open orders
94670
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http027_query_pending_stop
94671
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http025_query_pending
94672
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade013_stop_pending_order
94673
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade011_pending_order
94589
94674
  * @param {string} symbol unified market symbol
94590
94675
  * @param {int} [since] the earliest time in ms to fetch open orders for
94591
94676
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -94599,6 +94684,9 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94599
94684
  * @method
94600
94685
  * @name coinex#fetchClosedOrders
94601
94686
  * @description fetches information on multiple closed orders made by the user
94687
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http029_query_finished
94688
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade010_stop_finished_order
94689
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade012_finished_order
94602
94690
  * @param {string} symbol unified market symbol of the market orders were made in
94603
94691
  * @param {int} [since] the earliest time in ms to fetch orders for
94604
94692
  * @param {int} [limit] the maximum number of orde structures to retrieve
@@ -94612,6 +94700,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94612
94700
  * @method
94613
94701
  * @name coinex#createDepositAddress
94614
94702
  * @description create a currency deposit address
94703
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account019_update_deposit_address
94615
94704
  * @param {string} code unified currency code of the currency for the deposit address
94616
94705
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94617
94706
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -94644,6 +94733,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94644
94733
  * @method
94645
94734
  * @name coinex#fetchDepositAddress
94646
94735
  * @description fetch the deposit address for a currency associated with this account
94736
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account020_query_deposit_address
94647
94737
  * @param {string} code unified currency code
94648
94738
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94649
94739
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -94738,6 +94828,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94738
94828
  * @method
94739
94829
  * @name coinex#fetchMyTrades
94740
94830
  * @description fetch all trades made by the user
94831
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http013_user_deals
94832
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot003_trade014_user_deals
94741
94833
  * @param {string} symbol unified market symbol
94742
94834
  * @param {int} [since] the earliest time in ms to fetch trades for
94743
94835
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -94767,9 +94859,17 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94767
94859
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument for non-spot markets');
94768
94860
  }
94769
94861
  const swap = (type === 'swap');
94770
- let method = undefined;
94862
+ const accountId = this.safeInteger(params, 'account_id');
94863
+ const defaultType = this.safeString(this.options, 'defaultType');
94864
+ if (defaultType === 'margin') {
94865
+ if (accountId === undefined) {
94866
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchMyTrades() requires an account_id parameter for margin trades');
94867
+ }
94868
+ request['account_id'] = accountId;
94869
+ params = this.omit(params, 'account_id');
94870
+ }
94871
+ let response = undefined;
94771
94872
  if (swap) {
94772
- method = 'perpetualPublicGetMarketUserDeals';
94773
94873
  const side = this.safeInteger(params, 'side');
94774
94874
  if (side === undefined) {
94775
94875
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a side parameter for swap markets');
@@ -94779,21 +94879,12 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94779
94879
  }
94780
94880
  request['side'] = side;
94781
94881
  params = this.omit(params, 'side');
94882
+ response = await this.perpetualPublicGetMarketUserDeals(this.extend(request, params));
94782
94883
  }
94783
94884
  else {
94784
- method = 'privateGetOrderUserDeals';
94785
94885
  request['page'] = 1;
94886
+ response = await this.privateGetOrderUserDeals(this.extend(request, params));
94786
94887
  }
94787
- const accountId = this.safeInteger(params, 'account_id');
94788
- const defaultType = this.safeString(this.options, 'defaultType');
94789
- if (defaultType === 'margin') {
94790
- if (accountId === undefined) {
94791
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.BadRequest(this.id + ' fetchMyTrades() requires an account_id parameter for margin trades');
94792
- }
94793
- request['account_id'] = accountId;
94794
- params = this.omit(params, 'account_id');
94795
- }
94796
- const response = await this[method](this.extend(request, params));
94797
94888
  //
94798
94889
  // Spot and Margin
94799
94890
  //
@@ -94876,6 +94967,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94876
94967
  * @method
94877
94968
  * @name coinex#fetchPositions
94878
94969
  * @description fetch all open positions
94970
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http033_pending_position
94879
94971
  * @param {string[]|undefined} symbols list of unified market symbols
94880
94972
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94881
94973
  * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
@@ -94971,6 +95063,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
94971
95063
  * @method
94972
95064
  * @name coinex#fetchPosition
94973
95065
  * @description fetch data on a single open contract trade position
95066
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http033_pending_position
94974
95067
  * @param {string} symbol unified market symbol of the market the position is held in, default is undefined
94975
95068
  * @param {object} [params] extra parameters specific to the exchange API endpoint
94976
95069
  * @returns {object} a [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
@@ -95153,6 +95246,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95153
95246
  * @method
95154
95247
  * @name coinex#setMarginMode
95155
95248
  * @description set margin mode to 'cross' or 'isolated'
95249
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http014_adjust_leverage
95156
95250
  * @param {string} marginMode 'cross' or 'isolated'
95157
95251
  * @param {string} symbol unified market symbol
95158
95252
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -95242,6 +95336,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95242
95336
  * @method
95243
95337
  * @name coinex#fetchLeverageTiers
95244
95338
  * @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
95339
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http007_market_limit
95245
95340
  * @param {string[]|undefined} symbols list of unified market symbols
95246
95341
  * @param {object} [params] extra parameters specific to the exchange API endpoint
95247
95342
  * @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
@@ -95406,6 +95501,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95406
95501
  * @method
95407
95502
  * @name coinex#addMargin
95408
95503
  * @description add margin
95504
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http032_adjust_position_margin
95409
95505
  * @param {string} symbol unified market symbol
95410
95506
  * @param {float} amount amount of margin to add
95411
95507
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -95418,6 +95514,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95418
95514
  * @method
95419
95515
  * @name coinex#reduceMargin
95420
95516
  * @description remove margin from a position
95517
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http032_adjust_position_margin
95421
95518
  * @param {string} symbol unified market symbol
95422
95519
  * @param {float} amount the amount of margin to remove
95423
95520
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -95430,6 +95527,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95430
95527
  * @method
95431
95528
  * @name coinex#fetchFundingHistory
95432
95529
  * @description fetch the history of funding payments paid and received on this account
95530
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http034_funding_position
95433
95531
  * @param {string} symbol unified market symbol
95434
95532
  * @param {int} [since] the earliest time in ms to fetch funding history for
95435
95533
  * @param {int} [limit] the maximum number of funding history structures to retrieve
@@ -95505,6 +95603,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95505
95603
  * @method
95506
95604
  * @name coinex#fetchFundingRate
95507
95605
  * @description fetch the current funding rate
95606
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http008_market_ticker
95508
95607
  * @param {string} symbol unified market symbol
95509
95608
  * @param {object} [params] extra parameters specific to the exchange API endpoint
95510
95609
  * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
@@ -95613,6 +95712,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95613
95712
  * @method
95614
95713
  * @name coinex#fetchFundingRates
95615
95714
  * @description fetch the current funding rates
95715
+ * @see https://viabtc.github.io/coinex_api_en_doc/futures/#docsfutures001_http009_market_ticker_all
95616
95716
  * @param {string[]} symbols unified market symbols
95617
95717
  * @param {object} [params] extra parameters specific to the exchange API endpoint
95618
95718
  * @returns {object[]} an array of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
@@ -95939,6 +96039,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95939
96039
  * @method
95940
96040
  * @name coinex#transfer
95941
96041
  * @description transfer currency internally between wallets on the same account
96042
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account014_balance_contract_transfer
96043
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account013_margin_transfer
95942
96044
  * @param {string} code unified currency code
95943
96045
  * @param {float} amount amount to transfer
95944
96046
  * @param {string} fromAccount account to transfer from
@@ -95953,12 +96055,14 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95953
96055
  'amount': amountToPrecision,
95954
96056
  'coin_type': currency['id'],
95955
96057
  };
95956
- let method = 'privatePostContractBalanceTransfer';
96058
+ let response = undefined;
95957
96059
  if ((fromAccount === 'spot') && (toAccount === 'swap')) {
95958
96060
  request['transfer_side'] = 'in'; // 'in' spot to swap, 'out' swap to spot
96061
+ response = await this.privatePostContractBalanceTransfer(this.extend(request, params));
95959
96062
  }
95960
96063
  else if ((fromAccount === 'swap') && (toAccount === 'spot')) {
95961
96064
  request['transfer_side'] = 'out'; // 'in' spot to swap, 'out' swap to spot
96065
+ response = await this.privatePostContractBalanceTransfer(this.extend(request, params));
95962
96066
  }
95963
96067
  else {
95964
96068
  const accountsById = this.safeValue(this.options, 'accountsById', {});
@@ -95968,9 +96072,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
95968
96072
  // spot is 0, use fetchBalance() to find the margin account id
95969
96073
  request['from_account'] = parseInt(fromId);
95970
96074
  request['to_account'] = parseInt(toId);
95971
- method = 'privatePostMarginTransfer';
96075
+ response = await this.privatePostMarginTransfer(this.extend(request, params));
95972
96076
  }
95973
- const response = await this[method](this.extend(request, params));
95974
96077
  //
95975
96078
  // {"code": 0, "data": null, "message": "Success"}
95976
96079
  //
@@ -96052,6 +96155,8 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96052
96155
  * @method
96053
96156
  * @name coinex#fetchTransfers
96054
96157
  * @description fetch a history of internal transfers made on an account
96158
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account025_margin_transfer_history
96159
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account024_contract_transfer_history
96055
96160
  * @param {string} code unified currency code of the currency transferred
96056
96161
  * @param {int} [since] the earliest time in ms to fetch transfers for
96057
96162
  * @param {int} [limit] the maximum number of transfers structures to retrieve
@@ -96062,7 +96167,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96062
96167
  let currency = undefined;
96063
96168
  const request = {
96064
96169
  'page': 1,
96065
- 'limit': limit,
96170
+ // 'limit': limit,
96066
96171
  // 'asset': 'USDT',
96067
96172
  // 'start_time': since,
96068
96173
  // 'end_time': 1515806440,
@@ -96073,16 +96178,27 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96073
96178
  request['page'] = page;
96074
96179
  }
96075
96180
  if (code !== undefined) {
96076
- currency = this.safeCurrencyCode(code);
96181
+ currency = this.currency(code);
96077
96182
  request['asset'] = currency['id'];
96078
96183
  }
96079
96184
  if (since !== undefined) {
96080
96185
  request['start_time'] = since;
96081
96186
  }
96187
+ if (limit !== undefined) {
96188
+ request['limit'] = limit;
96189
+ }
96190
+ else {
96191
+ request['limit'] = 100;
96192
+ }
96082
96193
  params = this.omit(params, 'page');
96083
96194
  const defaultType = this.safeString(this.options, 'defaultType');
96084
- const method = (defaultType === 'margin') ? 'privateGetMarginTransferHistory' : 'privateGetContractTransferHistory';
96085
- const response = await this[method](this.extend(request, params));
96195
+ let response = undefined;
96196
+ if (defaultType === 'margin') {
96197
+ response = await this.privateGetMarginTransferHistory(this.extend(request, params));
96198
+ }
96199
+ else {
96200
+ response = await this.privateGetContractTransferHistory(this.extend(request, params));
96201
+ }
96086
96202
  //
96087
96203
  // Swap
96088
96204
  //
@@ -96136,6 +96252,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96136
96252
  * @method
96137
96253
  * @name coinex#fetchWithdrawals
96138
96254
  * @description fetch all withdrawals made from an account
96255
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account026_withdraw_list
96139
96256
  * @param {string} code unified currency code
96140
96257
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
96141
96258
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -96202,6 +96319,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96202
96319
  * @method
96203
96320
  * @name coinex#fetchDeposits
96204
96321
  * @description fetch all deposits made to an account
96322
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account009_deposit_list
96205
96323
  * @param {string} code unified currency code
96206
96324
  * @param {int} [since] the earliest time in ms to fetch deposits for
96207
96325
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -96301,6 +96419,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96301
96419
  * @method
96302
96420
  * @name coinex#fetchIsolatedBorrowRate
96303
96421
  * @description fetch the rate of interest to borrow a currency for margin trading
96422
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account007_margin_account_settings
96304
96423
  * @param {string} symbol unified symbol of the market to fetch the borrow rate for
96305
96424
  * @param {object} [params] extra parameters specific to the exchange API endpoint
96306
96425
  * @returns {object} an [isolated borrow rate structure]{@link https://docs.ccxt.com/#/?id=isolated-borrow-rate-structure}
@@ -96339,6 +96458,7 @@ class coinex extends _abstract_coinex_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
96339
96458
  * @method
96340
96459
  * @name coinex#fetchIsolatedBorrowRates
96341
96460
  * @description fetch the borrow interest rates of all currencies
96461
+ * @see https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot002_account007_margin_account_settings
96342
96462
  * @param {object} [params] extra parameters specific to the exchange API endpoint
96343
96463
  * @returns {object} a list of [isolated borrow rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#isolated-borrow-rate-structure}
96344
96464
  */
@@ -139794,14 +139914,16 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
139794
139914
  // "margin_mode": "cross",
139795
139915
  // "margin_account": "USDT",
139796
139916
  // "margin_asset": "USDT",
139797
- // "margin_balance": 200.000000000000000000,
139798
- // "margin_static": 200.000000000000000000,
139799
- // "margin_position": 0,
139800
- // "margin_frozen": 0,
139801
- // "profit_real": 0E-18,
139802
- // "profit_unreal": 0,
139803
- // "withdraw_available": 2E+2,
139804
- // "risk_rate": null,
139917
+ // "margin_balance": 49.874186030200000000,
139918
+ // "money_in": 50,
139919
+ // "money_out": 0,
139920
+ // "margin_static": 49.872786030200000000,
139921
+ // "margin_position": 6.180000000000000000,
139922
+ // "margin_frozen": 6.000000000000000000,
139923
+ // "profit_unreal": 0.001400000000000000,
139924
+ // "withdraw_available": 37.6927860302,
139925
+ // "risk_rate": 271.984050521072796934,
139926
+ // "new_risk_rate": 0.001858676950514399,
139805
139927
  // "contract_detail": [
139806
139928
  // {
139807
139929
  // "symbol": "MANA",
@@ -139908,8 +140030,8 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
139908
140030
  }
139909
140031
  else {
139910
140032
  const account = this.account();
139911
- account['free'] = this.safeString(first, 'margin_balance', 'margin_available');
139912
- account['used'] = this.safeString(first, 'margin_frozen');
140033
+ account['free'] = this.safeString(first, 'withdraw_available');
140034
+ account['total'] = this.safeString(first, 'margin_balance');
139913
140035
  const currencyId = this.safeString2(first, 'margin_asset', 'symbol');
139914
140036
  const code = this.safeCurrencyCode(currencyId);
139915
140037
  result[code] = account;
@@ -166538,6 +166660,9 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
166538
166660
  'addMargin': false,
166539
166661
  'cancelAllOrders': true,
166540
166662
  'cancelOrder': true,
166663
+ 'createMarketBuyOrderWithCost': true,
166664
+ 'createMarketOrderWithCost': false,
166665
+ 'createMarketSellOrderWithCost': false,
166541
166666
  'createOrder': true,
166542
166667
  'createReduceOnlyOrder': false,
166543
166668
  'createStopLimitOrder': false,
@@ -166608,10 +166733,10 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
166608
166733
  'contract': 'https://lbkperp.lbank.com',
166609
166734
  },
166610
166735
  'api2': 'https://api.lbkex.com',
166611
- 'www': 'https://www.lbank.info',
166612
- 'doc': 'https://www.lbank.info/en-US/docs/index.html',
166613
- 'fees': 'https://lbankinfo.zendesk.com/hc/en-gb/articles/360012072873-Trading-Fees',
166614
- 'referral': 'https://www.lbank.info/invitevip?icode=7QCY',
166736
+ 'www': 'https://www.lbank.com',
166737
+ 'doc': 'https://www.lbank.com/en-US/docs/index.html',
166738
+ 'fees': 'https://support.lbank.site/hc/en-gb/articles/900000535703-Trading-Fees-From-14-00-on-April-7-2020-UTC-8-',
166739
+ 'referral': 'https://www.lbank.com/login/?icode=7QCY',
166615
166740
  },
166616
166741
  'api': {
166617
166742
  'spot': {
@@ -166799,7 +166924,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
166799
166924
  * @method
166800
166925
  * @name lbank2#fetchTime
166801
166926
  * @description fetches the current integer timestamp in milliseconds from the exchange server
166802
- * @see https://www.lbank.info/en-US/docs/index.html#get-timestamp
166927
+ * @see https://www.lbank.com/en-US/docs/index.html#get-timestamp
166803
166928
  * @see https://www.lbank.com/en-US/docs/contract.html#get-the-current-time
166804
166929
  * @param {object} [params] extra parameters specific to the exchange API endpoint
166805
166930
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
@@ -167094,7 +167219,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167094
167219
  * @method
167095
167220
  * @name lbank2#fetchTicker
167096
167221
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
167097
- * @see https://www.lbank.info/en-US/docs/index.html#query-current-market-data-new
167222
+ * @see https://www.lbank.com/en-US/docs/index.html#query-current-market-data-new
167098
167223
  * @param {string} symbol unified symbol of the market to fetch the ticker for
167099
167224
  * @param {object} [params] extra parameters specific to the exchange API endpoint
167100
167225
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -167139,7 +167264,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167139
167264
  * @method
167140
167265
  * @name lbank2#fetchTickers
167141
167266
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
167142
- * @see https://www.lbank.info/en-US/docs/index.html#query-current-market-data-new
167267
+ * @see https://www.lbank.com/en-US/docs/index.html#query-current-market-data-new
167143
167268
  * @see https://www.lbank.com/en-US/docs/contract.html#query-contract-market-list
167144
167269
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
167145
167270
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -167219,7 +167344,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167219
167344
  * @method
167220
167345
  * @name lbank2#fetchOrderBook
167221
167346
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
167222
- * @see https://www.lbank.info/en-US/docs/index.html#query-market-depth
167347
+ * @see https://www.lbank.com/en-US/docs/index.html#query-market-depth
167223
167348
  * @see https://www.lbank.com/en-US/docs/contract.html#get-handicap
167224
167349
  * @param {string} symbol unified symbol of the market to fetch the order book for
167225
167350
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -167408,8 +167533,8 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167408
167533
  * @method
167409
167534
  * @name lbank2#fetchTrades
167410
167535
  * @description get the list of most recent trades for a particular symbol
167411
- * @see https://www.lbank.info/en-US/docs/index.html#query-historical-transactions
167412
- * @see https://www.lbank.info/en-US/docs/index.html#recent-transactions-list
167536
+ * @see https://www.lbank.com/en-US/docs/index.html#query-historical-transactions
167537
+ * @see https://www.lbank.com/en-US/docs/index.html#recent-transactions-list
167413
167538
  * @param {string} symbol unified symbol of the market to fetch trades for
167414
167539
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
167415
167540
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -167481,7 +167606,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167481
167606
  * @method
167482
167607
  * @name lbank2#fetchOHLCV
167483
167608
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
167484
- * @see https://www.lbank.info/en-US/docs/index.html#query-k-bar-data
167609
+ * @see https://www.lbank.com/en-US/docs/index.html#query-k-bar-data
167485
167610
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
167486
167611
  * @param {string} timeframe the length of time each candle represents
167487
167612
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -167666,9 +167791,9 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167666
167791
  * @method
167667
167792
  * @name lbank2#fetchBalance
167668
167793
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
167669
- * @see https://www.lbank.info/en-US/docs/index.html#asset-information
167670
- * @see https://www.lbank.info/en-US/docs/index.html#account-information
167671
- * @see https://www.lbank.info/en-US/docs/index.html#get-all-coins-information
167794
+ * @see https://www.lbank.com/en-US/docs/index.html#asset-information
167795
+ * @see https://www.lbank.com/en-US/docs/index.html#account-information
167796
+ * @see https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
167672
167797
  * @param {object} [params] extra parameters specific to the exchange API endpoint
167673
167798
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
167674
167799
  */
@@ -167733,7 +167858,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167733
167858
  * @method
167734
167859
  * @name lbank2#fetchTradingFee
167735
167860
  * @description fetch the trading fees for a market
167736
- * @see https://www.lbank.info/en-US/docs/index.html#transaction-fee-rate-query
167861
+ * @see https://www.lbank.com/en-US/docs/index.html#transaction-fee-rate-query
167737
167862
  * @param {string} symbol unified market symbol
167738
167863
  * @param {object} [params] extra parameters specific to the exchange API endpoint
167739
167864
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -167747,7 +167872,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167747
167872
  * @method
167748
167873
  * @name lbank2#fetchTradingFees
167749
167874
  * @description fetch the trading fees for multiple markets
167750
- * @see https://www.lbank.info/en-US/docs/index.html#transaction-fee-rate-query
167875
+ * @see https://www.lbank.com/en-US/docs/index.html#transaction-fee-rate-query
167751
167876
  * @param {object} [params] extra parameters specific to the exchange API endpoint
167752
167877
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
167753
167878
  */
@@ -167763,13 +167888,33 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167763
167888
  }
167764
167889
  return result;
167765
167890
  }
167891
+ async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
167892
+ /**
167893
+ * @method
167894
+ * @name lbank#createMarketBuyOrderWithCost
167895
+ * @description create a market buy order by providing the symbol and cost
167896
+ * @see https://www.lbank.com/en-US/docs/index.html#place-order
167897
+ * @see https://www.lbank.com/en-US/docs/index.html#place-an-order
167898
+ * @param {string} symbol unified symbol of the market to create an order in
167899
+ * @param {float} cost how much you want to trade in units of the quote currency
167900
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
167901
+ * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
167902
+ */
167903
+ await this.loadMarkets();
167904
+ const market = this.market(symbol);
167905
+ if (!market['spot']) {
167906
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.NotSupported(this.id + ' createMarketBuyOrderWithCost() supports spot orders only');
167907
+ }
167908
+ params['createMarketBuyOrderRequiresPrice'] = false;
167909
+ return await this.createOrder(symbol, 'market', 'buy', cost, undefined, params);
167910
+ }
167766
167911
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
167767
167912
  /**
167768
167913
  * @method
167769
167914
  * @name lbank2#createOrder
167770
167915
  * @description create a trade order
167771
- * @see https://www.lbank.info/en-US/docs/index.html#place-order
167772
- * @see https://www.lbank.info/en-US/docs/index.html#place-an-order
167916
+ * @see https://www.lbank.com/en-US/docs/index.html#place-order
167917
+ * @see https://www.lbank.com/en-US/docs/index.html#place-an-order
167773
167918
  * @param {string} symbol unified symbol of the market to create an order in
167774
167919
  * @param {string} type 'market' or 'limit'
167775
167920
  * @param {string} side 'buy' or 'sell'
@@ -167814,21 +167959,30 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
167814
167959
  }
167815
167960
  else if (side === 'buy') {
167816
167961
  request['type'] = side + '_' + 'market';
167817
- if (this.options['createMarketBuyOrderRequiresPrice']) {
167962
+ let quoteAmount = undefined;
167963
+ let createMarketBuyOrderRequiresPrice = true;
167964
+ [createMarketBuyOrderRequiresPrice, params] = this.handleOptionAndParams(params, 'createOrder', 'createMarketBuyOrderRequiresPrice', true);
167965
+ const cost = this.safeNumber(params, 'cost');
167966
+ params = this.omit(params, 'cost');
167967
+ if (cost !== undefined) {
167968
+ quoteAmount = this.costToPrecision(symbol, cost);
167969
+ }
167970
+ else if (createMarketBuyOrderRequiresPrice) {
167818
167971
  if (price === undefined) {
167819
- throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + " createOrder () requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply the price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false to supply the cost in the amount argument (the exchange-specific behaviour)");
167972
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.InvalidOrder(this.id + ' createOrder() requires the price argument for market buy orders to calculate the total cost to spend (amount * price), alternatively set the createMarketBuyOrderRequiresPrice option or param to false and pass the cost to spend in the amount argument');
167820
167973
  }
167821
167974
  else {
167822
167975
  const amountString = this.numberToString(amount);
167823
167976
  const priceString = this.numberToString(price);
167824
- const quoteAmount = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString);
167825
- const cost = this.parseNumber(quoteAmount);
167826
- request['price'] = this.priceToPrecision(symbol, cost);
167977
+ const costRequest = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(amountString, priceString);
167978
+ quoteAmount = this.costToPrecision(symbol, costRequest);
167827
167979
  }
167828
167980
  }
167829
167981
  else {
167830
- request['price'] = amount;
167982
+ quoteAmount = this.costToPrecision(symbol, amount);
167831
167983
  }
167984
+ // market buys require filling the price param instead of the amount param, for market buys the price is treated as the cost by lbank
167985
+ request['price'] = quoteAmount;
167832
167986
  }
167833
167987
  }
167834
167988
  if (clientOrderId !== undefined) {
@@ -168000,8 +168154,8 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168000
168154
  * @method
168001
168155
  * @name lbank2#fetchOrder
168002
168156
  * @description fetches information on an order made by the user
168003
- * @see https://www.lbank.info/en-US/docs/index.html#query-order
168004
- * @see https://www.lbank.info/en-US/docs/index.html#query-order-new
168157
+ * @see https://www.lbank.com/en-US/docs/index.html#query-order
168158
+ * @see https://www.lbank.com/en-US/docs/index.html#query-order-new
168005
168159
  * @param {string} symbol unified symbol of the market the order was made in
168006
168160
  * @param {object} [params] extra parameters specific to the exchange API endpoint
168007
168161
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -168104,7 +168258,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168104
168258
  * @method
168105
168259
  * @name lbank2#fetchMyTrades
168106
168260
  * @description fetch all trades made by the user
168107
- * @see https://www.lbank.info/en-US/docs/index.html#past-transaction-details
168261
+ * @see https://www.lbank.com/en-US/docs/index.html#past-transaction-details
168108
168262
  * @param {string} symbol unified market symbol
168109
168263
  * @param {int} [since] the earliest time in ms to fetch trades for
168110
168264
  * @param {int} [limit] the maximum number of trade structures to retrieve
@@ -168163,7 +168317,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168163
168317
  * @method
168164
168318
  * @name lbank2#fetchOrders
168165
168319
  * @description fetches information on multiple orders made by the user
168166
- * @see https://www.lbank.info/en-US/docs/index.html#query-all-orders
168320
+ * @see https://www.lbank.com/en-US/docs/index.html#query-all-orders
168167
168321
  * @param {string} symbol unified market symbol of the market orders were made in
168168
168322
  * @param {int} [since] the earliest time in ms to fetch orders for
168169
168323
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -168223,7 +168377,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168223
168377
  * @method
168224
168378
  * @name lbank2#fetchOpenOrders
168225
168379
  * @description fetch all unfilled currently open orders
168226
- * @see https://www.lbank.info/en-US/docs/index.html#current-pending-order
168380
+ * @see https://www.lbank.com/en-US/docs/index.html#current-pending-order
168227
168381
  * @param {string} symbol unified market symbol
168228
168382
  * @param {int} [since] the earliest time in ms to fetch open orders for
168229
168383
  * @param {int} [limit] the maximum number of open order structures to retrieve
@@ -168280,7 +168434,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168280
168434
  * @method
168281
168435
  * @name lbank2#cancelOrder
168282
168436
  * @description cancels an open order
168283
- * @see https://www.lbank.info/en-US/docs/index.html#cancel-order-new
168437
+ * @see https://www.lbank.com/en-US/docs/index.html#cancel-order-new
168284
168438
  * @param {string} id order id
168285
168439
  * @param {string} symbol unified symbol of the market the order was made in
168286
168440
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -168322,7 +168476,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168322
168476
  * @method
168323
168477
  * @name lbank2#cancelAllOrders
168324
168478
  * @description cancel all open orders in a market
168325
- * @see https://www.lbank.info/en-US/docs/index.html#cancel-all-pending-orders-for-a-single-trading-pair
168479
+ * @see https://www.lbank.com/en-US/docs/index.html#cancel-all-pending-orders-for-a-single-trading-pair
168326
168480
  * @param {string} symbol unified market symbol of the market to cancel orders in
168327
168481
  * @param {object} [params] extra parameters specific to the exchange API endpoint
168328
168482
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -168369,8 +168523,8 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168369
168523
  * @method
168370
168524
  * @name lbank2#fetchDepositAddress
168371
168525
  * @description fetch the deposit address for a currency associated with this account
168372
- * @see https://www.lbank.info/en-US/docs/index.html#get-deposit-address
168373
- * @see https://www.lbank.info/en-US/docs/index.html#the-user-obtains-the-deposit-address
168526
+ * @see https://www.lbank.com/en-US/docs/index.html#get-deposit-address
168527
+ * @see https://www.lbank.com/en-US/docs/index.html#the-user-obtains-the-deposit-address
168374
168528
  * @param {string} code unified currency code
168375
168529
  * @param {object} [params] extra parameters specific to the exchange API endpoint
168376
168530
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -168468,7 +168622,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168468
168622
  * @method
168469
168623
  * @name lbank2#withdraw
168470
168624
  * @description make a withdrawal
168471
- * @see https://www.lbank.info/en-US/docs/index.html#withdrawal
168625
+ * @see https://www.lbank.com/en-US/docs/index.html#withdrawal
168472
168626
  * @param {string} code unified currency code
168473
168627
  * @param {float} amount the amount to withdraw
168474
168628
  * @param {string} address the address to withdraw to
@@ -168634,7 +168788,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168634
168788
  * @method
168635
168789
  * @name lbank2#fetchDeposits
168636
168790
  * @description fetch all deposits made to an account
168637
- * @see https://www.lbank.info/en-US/docs/index.html#get-recharge-history
168791
+ * @see https://www.lbank.com/en-US/docs/index.html#get-recharge-history
168638
168792
  * @param {string} code unified currency code
168639
168793
  * @param {int} [since] the earliest time in ms to fetch deposits for
168640
168794
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -168687,7 +168841,7 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168687
168841
  * @method
168688
168842
  * @name lbank2#fetchWithdrawals
168689
168843
  * @description fetch all withdrawals made from an account
168690
- * @see https://www.lbank.info/en-US/docs/index.html#get-withdrawal-history
168844
+ * @see https://www.lbank.com/en-US/docs/index.html#get-withdrawal-history
168691
168845
  * @param {string} code unified currency code
168692
168846
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
168693
168847
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -168890,8 +169044,8 @@ class lbank extends _abstract_lbank_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
168890
169044
  * @method
168891
169045
  * @name lbank2#fetchDepositWithdrawFees
168892
169046
  * @description when using private endpoint, only returns information for currencies with non-zero balance, use public method by specifying this.options['fetchDepositWithdrawFees']['method'] = 'fetchPublicDepositWithdrawFees'
168893
- * @see https://www.lbank.info/en-US/docs/index.html#get-all-coins-information
168894
- * @see https://www.lbank.info/en-US/docs/index.html#withdrawal-configurations
169047
+ * @see https://www.lbank.com/en-US/docs/index.html#get-all-coins-information
169048
+ * @see https://www.lbank.com/en-US/docs/index.html#withdrawal-configurations
168895
169049
  * @param {string[]|undefined} codes array of unified currency codes
168896
169050
  * @param {object} [params] extra parameters specific to the exchange API endpoint
168897
169051
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -189121,7 +189275,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
189121
189275
  });
189122
189276
  }
189123
189277
  }
189124
- const response = await this[method](request); // * dont extend with params, otherwise ARRAY will be turned into OBJECT
189278
+ let response = undefined;
189279
+ if (method === 'privatePostTradeCancelAlgos') {
189280
+ response = await this.privatePostTradeCancelAlgos(request); // * dont extend with params, otherwise ARRAY will be turned into OBJECT
189281
+ }
189282
+ else {
189283
+ response = await this.privatePostTradeCancelBatchOrders(request); // * dont extend with params, otherwise ARRAY will be turned into OBJECT
189284
+ }
189125
189285
  //
189126
189286
  // {
189127
189287
  // "code": "0",
@@ -189420,7 +189580,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
189420
189580
  }
189421
189581
  }
189422
189582
  const query = this.omit(params, ['method', 'clOrdId', 'clientOrderId', 'stop']);
189423
- const response = await this[method](this.extend(request, query));
189583
+ let response = undefined;
189584
+ if (method === 'privateGetTradeOrderAlgo') {
189585
+ response = await this.privateGetTradeOrderAlgo(this.extend(request, query));
189586
+ }
189587
+ else {
189588
+ response = await this.privateGetTradeOrder(this.extend(request, query));
189589
+ }
189424
189590
  //
189425
189591
  // Spot and Swap
189426
189592
  //
@@ -189579,7 +189745,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
189579
189745
  }
189580
189746
  }
189581
189747
  const query = this.omit(params, ['method', 'stop']);
189582
- const response = await this[method](this.extend(request, query));
189748
+ let response = undefined;
189749
+ if (method === 'privateGetTradeOrdersAlgoPending') {
189750
+ response = await this.privateGetTradeOrdersAlgoPending(this.extend(request, query));
189751
+ }
189752
+ else {
189753
+ response = await this.privateGetTradeOrdersPending(this.extend(request, query));
189754
+ }
189583
189755
  //
189584
189756
  // {
189585
189757
  // "code": "0",
@@ -189751,7 +189923,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
189751
189923
  }
189752
189924
  }
189753
189925
  const send = this.omit(query, ['method', 'stop', 'ordType']);
189754
- const response = await this[method](this.extend(request, send));
189926
+ let response = undefined;
189927
+ if (method === 'privateGetTradeOrdersAlgoHistory') {
189928
+ response = await this.privateGetTradeOrdersAlgoHistory(this.extend(request, send));
189929
+ }
189930
+ else {
189931
+ response = await this.privateGetTradeOrdersHistory(this.extend(request, send));
189932
+ }
189755
189933
  //
189756
189934
  // {
189757
189935
  // "code": "0",
@@ -189928,7 +190106,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
189928
190106
  request['state'] = 'filled';
189929
190107
  }
189930
190108
  const send = this.omit(query, ['method', 'stop']);
189931
- const response = await this[method](this.extend(request, send));
190109
+ let response = undefined;
190110
+ if (method === 'privateGetTradeOrdersAlgoHistory') {
190111
+ response = await this.privateGetTradeOrdersAlgoHistory(this.extend(request, send));
190112
+ }
190113
+ else {
190114
+ response = await this.privateGetTradeOrdersHistory(this.extend(request, send));
190115
+ }
189932
190116
  //
189933
190117
  // {
189934
190118
  // "code": "0",
@@ -190181,7 +190365,16 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
190181
190365
  request['ccy'] = currency['id'];
190182
190366
  }
190183
190367
  [request, params] = this.handleUntilOption('end', request, params);
190184
- const response = await this[method](this.extend(request, query));
190368
+ let response = undefined;
190369
+ if (method === 'privateGetAccountBillsArchive') {
190370
+ response = await this.privateGetAccountBillsArchive(this.extend(request, query));
190371
+ }
190372
+ else if (method === 'privateGetAssetBills') {
190373
+ response = await this.privateGetAssetBills(this.extend(request, query));
190374
+ }
190375
+ else {
190376
+ response = await this.privateGetAccountBills(this.extend(request, query));
190377
+ }
190185
190378
  //
190186
190379
  // privateGetAccountBills, privateGetAccountBillsArchive
190187
190380
  //
@@ -191093,7 +191286,13 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
191093
191286
  }
191094
191287
  const fetchPositionsOptions = this.safeValue(this.options, 'fetchPositions', {});
191095
191288
  const method = this.safeString(fetchPositionsOptions, 'method', 'privateGetAccountPositions');
191096
- const response = await this[method](this.extend(request, params));
191289
+ let response = undefined;
191290
+ if (method === 'privateGetAccountPositionsHistory') {
191291
+ response = await this.privateGetAccountPositionsHistory(this.extend(request, params));
191292
+ }
191293
+ else {
191294
+ response = await this.privateGetAccountPositions(this.extend(request, params));
191295
+ }
191097
191296
  //
191098
191297
  // {
191099
191298
  // "code": "0",
@@ -205895,7 +206094,7 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
205895
206094
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
205896
206095
  * @param {int} [limit] the maximum amount of trades to fetch
205897
206096
  * @param {object} [params] extra parameters specific to the exchange API endpoint
205898
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
206097
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
205899
206098
  */
205900
206099
  await this.loadMarkets();
205901
206100
  symbols = this.marketSymbols(symbols, undefined, false, true, true);
@@ -208996,7 +209195,7 @@ class bingx extends _bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
208996
209195
  * @see https://bingx-api.github.io/docs/#/swapV2/socket/account.html#Account%20balance%20and%20position%20update%20push
208997
209196
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
208998
209197
  * @param {object} [params] extra parameters specific to the exchange API endpoint
208999
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
209198
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
209000
209199
  */
209001
209200
  await this.loadMarkets();
209002
209201
  await this.authenticate();
@@ -211927,7 +212126,7 @@ class bitget extends _bitget_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
211927
212126
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
211928
212127
  * @param {int} [limit] the maximum amount of trades to fetch
211929
212128
  * @param {object} [params] extra parameters specific to the exchange API endpoint
211930
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
212129
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
211931
212130
  */
211932
212131
  const symbolsLength = symbols.length;
211933
212132
  if (symbolsLength === 0) {
@@ -220934,7 +221133,7 @@ class bybit extends _bybit_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
220934
221133
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
220935
221134
  * @param {int} [limit] the maximum amount of trades to fetch
220936
221135
  * @param {object} [params] extra parameters specific to the exchange API endpoint
220937
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
221136
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
220938
221137
  */
220939
221138
  await this.loadMarkets();
220940
221139
  symbols = this.marketSymbols(symbols);
@@ -222575,7 +222774,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
222575
222774
  * @see https://docs.cex.io/#ws-api-get-balance
222576
222775
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
222577
222776
  * @param {object} [params] extra parameters specific to the cex api endpoint
222578
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/en/latest/manual.html?#balance-structure}
222777
+ * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
222579
222778
  */
222580
222779
  await this.loadMarkets();
222581
222780
  await this.authenticate();
@@ -224459,7 +224658,7 @@ class coinbasepro extends _coinbasepro_js__WEBPACK_IMPORTED_MODULE_0__/* ["defau
224459
224658
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
224460
224659
  * @param {int} [limit] the maximum amount of trades to fetch
224461
224660
  * @param {object} [params] extra parameters specific to the exchange API endpoint
224462
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
224661
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
224463
224662
  */
224464
224663
  const symbolsLength = symbols.length;
224465
224664
  if (symbolsLength === 0) {
@@ -226559,7 +226758,7 @@ class cryptocom extends _cryptocom_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
226559
226758
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
226560
226759
  * @param {int} [limit] the maximum amount of trades to fetch
226561
226760
  * @param {object} [params] extra parameters specific to the exchange API endpoint
226562
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
226761
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
226563
226762
  */
226564
226763
  await this.loadMarkets();
226565
226764
  symbols = this.marketSymbols(symbols);
@@ -229824,7 +230023,7 @@ class gate extends _gate_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
229824
230023
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
229825
230024
  * @param {int} [limit] the maximum amount of trades to fetch
229826
230025
  * @param {object} [params] extra parameters specific to the exchange API endpoint
229827
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
230026
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
229828
230027
  */
229829
230028
  await this.loadMarkets();
229830
230029
  symbols = this.marketSymbols(symbols);
@@ -240602,7 +240801,7 @@ class kucoin extends _kucoin_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
240602
240801
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
240603
240802
  * @param {int} [limit] the maximum amount of trades to fetch
240604
240803
  * @param {object} [params] extra parameters specific to the exchange API endpoint
240605
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
240804
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
240606
240805
  */
240607
240806
  const symbolsLength = symbols.length;
240608
240807
  if (symbolsLength === 0) {
@@ -241691,7 +241890,7 @@ class kucoinfutures extends _kucoinfutures_js__WEBPACK_IMPORTED_MODULE_0__/* ["d
241691
241890
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
241692
241891
  * @param {int} [limit] the maximum amount of trades to fetch
241693
241892
  * @param {object} [params] extra parameters specific to the exchange API endpoint
241694
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
241893
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
241695
241894
  */
241696
241895
  const symbolsLength = symbols.length;
241697
241896
  if (symbolsLength === 0) {
@@ -245289,7 +245488,7 @@ class okx extends _okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
245289
245488
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
245290
245489
  * @param {int} [limit] the maximum amount of trades to fetch
245291
245490
  * @param {object} [params] extra parameters specific to the exchange API endpoint
245292
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/en/latest/manual.html?#public-trades}
245491
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
245293
245492
  */
245294
245493
  const symbolsLength = symbols.length;
245295
245494
  if (symbolsLength === 0) {
@@ -288633,7 +288832,7 @@ SOFTWARE.
288633
288832
 
288634
288833
  //-----------------------------------------------------------------------------
288635
288834
  // this is updated by vss.js when building
288636
- const version = '4.1.81';
288835
+ const version = '4.1.82';
288637
288836
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
288638
288837
  //-----------------------------------------------------------------------------
288639
288838