ccxt 4.2.40 → 4.2.41

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
@@ -210,13 +210,13 @@ console.log(version, Object.keys(exchanges));
210
210
 
211
211
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
212
212
 
213
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.40/dist/ccxt.browser.js
214
- * unpkg: https://unpkg.com/ccxt@4.2.40/dist/ccxt.browser.js
213
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.2.41/dist/ccxt.browser.js
214
+ * unpkg: https://unpkg.com/ccxt@4.2.41/dist/ccxt.browser.js
215
215
 
216
216
  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.
217
217
 
218
218
  ```HTML
219
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.40/dist/ccxt.browser.js"></script>
219
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.2.41/dist/ccxt.browser.js"></script>
220
220
  ```
221
221
 
222
222
  Creates a global `ccxt` object:
@@ -22325,20 +22325,73 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
22325
22325
  // "time": 1676366446072
22326
22326
  // }
22327
22327
  //
22328
+ // fetchMyTrades: linear portfolio margin
22329
+ //
22330
+ // {
22331
+ // "symbol": "BTCUSDT",
22332
+ // "id": 4575108247,
22333
+ // "orderId": 261942655610,
22334
+ // "side": "SELL",
22335
+ // "price": "47263.40",
22336
+ // "qty": "0.010",
22337
+ // "realizedPnl": "27.38400000",
22338
+ // "marginAsset": "USDT",
22339
+ // "quoteQty": "472.63",
22340
+ // "commission": "0.18905360",
22341
+ // "commissionAsset": "USDT",
22342
+ // "time": 1707530039409,
22343
+ // "buyer": false,
22344
+ // "maker": false,
22345
+ // "positionSide": "LONG"
22346
+ // }
22347
+ //
22348
+ // fetchMyTrades: inverse portfolio margin
22349
+ //
22350
+ // {
22351
+ // "symbol": "ETHUSD_PERP",
22352
+ // "id": 701907838,
22353
+ // "orderId": 71548909034,
22354
+ // "pair": "ETHUSD",
22355
+ // "side": "SELL",
22356
+ // "price": "2498.15",
22357
+ // "qty": "1",
22358
+ // "realizedPnl": "0.00012517",
22359
+ // "marginAsset": "ETH",
22360
+ // "baseQty": "0.00400296",
22361
+ // "commission": "0.00000160",
22362
+ // "commissionAsset": "ETH",
22363
+ // "time": 1707530317519,
22364
+ // "positionSide": "LONG",
22365
+ // "buyer": false,
22366
+ // "maker": false
22367
+ // }
22368
+ //
22369
+ // fetchMyTrades: spot margin portfolio margin
22370
+ //
22371
+ // {
22372
+ // "symbol": "ADAUSDT",
22373
+ // "id": 470227543,
22374
+ // "orderId": 4421170947,
22375
+ // "price": "0.53880000",
22376
+ // "qty": "10.00000000",
22377
+ // "quoteQty": "5.38800000",
22378
+ // "commission": "0.00538800",
22379
+ // "commissionAsset": "USDT",
22380
+ // "time": 1707545780522,
22381
+ // "isBuyer": false,
22382
+ // "isMaker": false,
22383
+ // "isBestMatch": true
22384
+ // }
22385
+ //
22328
22386
  const timestamp = this.safeInteger2(trade, 'T', 'time');
22329
- const price = this.safeString2(trade, 'p', 'price');
22330
22387
  let amount = this.safeString2(trade, 'q', 'qty');
22331
22388
  amount = this.safeString(trade, 'quantity', amount);
22332
- const cost = this.safeString2(trade, 'quoteQty', 'baseQty'); // inverse futures
22333
22389
  const marketId = this.safeString(trade, 'symbol');
22334
- const isSpotTrade = ('isIsolated' in trade) || ('M' in trade) || ('orderListId' in trade);
22390
+ const isSpotTrade = ('isIsolated' in trade) || ('M' in trade) || ('orderListId' in trade) || ('isMaker' in trade);
22335
22391
  const marketType = isSpotTrade ? 'spot' : 'contract';
22336
22392
  market = this.safeMarket(marketId, market, undefined, marketType);
22337
22393
  const symbol = market['symbol'];
22338
- let id = this.safeString2(trade, 't', 'a');
22339
- id = this.safeString2(trade, 'tradeId', 'id', id);
22340
22394
  let side = undefined;
22341
- const orderId = this.safeString(trade, 'orderId');
22342
22395
  const buyerMaker = this.safeValue2(trade, 'm', 'isBuyerMaker');
22343
22396
  let takerOrMaker = undefined;
22344
22397
  if (buyerMaker !== undefined) {
@@ -22388,14 +22441,14 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
22388
22441
  'timestamp': timestamp,
22389
22442
  'datetime': this.iso8601(timestamp),
22390
22443
  'symbol': symbol,
22391
- 'id': id,
22392
- 'order': orderId,
22444
+ 'id': this.safeStringN(trade, ['t', 'a', 'tradeId', 'id']),
22445
+ 'order': this.safeString(trade, 'orderId'),
22393
22446
  'type': this.safeStringLower(trade, 'type'),
22394
22447
  'side': side,
22395
22448
  'takerOrMaker': takerOrMaker,
22396
- 'price': price,
22449
+ 'price': this.safeString2(trade, 'p', 'price'),
22397
22450
  'amount': amount,
22398
- 'cost': cost,
22451
+ 'cost': this.safeString2(trade, 'quoteQty', 'baseQty'),
22399
22452
  'fee': fee,
22400
22453
  }, market);
22401
22454
  }
@@ -24484,12 +24537,16 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
24484
24537
  * @see https://binance-docs.github.io/apidocs/futures/en/#account-trade-list-user_data
24485
24538
  * @see https://binance-docs.github.io/apidocs/delivery/en/#account-trade-list-user_data
24486
24539
  * @see https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data
24540
+ * @see https://binance-docs.github.io/apidocs/pm/en/#margin-account-trade-list-user_data
24541
+ * @see https://binance-docs.github.io/apidocs/pm/en/#um-account-trade-list-user_data
24542
+ * @see https://binance-docs.github.io/apidocs/pm/en/#cm-account-trade-list-user_data
24487
24543
  * @param {string} symbol unified market symbol
24488
24544
  * @param {int} [since] the earliest time in ms to fetch trades for
24489
24545
  * @param {int} [limit] the maximum number of trades structures to retrieve
24490
24546
  * @param {object} [params] extra parameters specific to the exchange API endpoint
24491
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
24547
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
24492
24548
  * @param {int} [params.until] the latest time in ms to fetch entries for
24549
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to fetch trades for a portfolio margin account
24493
24550
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
24494
24551
  */
24495
24552
  await this.loadMarkets();
@@ -24543,8 +24600,13 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
24543
24600
  throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' fetchMyTrades() requires a symbol argument');
24544
24601
  }
24545
24602
  [marginMode, params] = this.handleMarginModeAndParams('fetchMyTrades', params);
24603
+ let isPortfolioMargin = undefined;
24604
+ [isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'fetchMyTrades', 'papi', 'portfolioMargin', false);
24546
24605
  if (type === 'spot' || type === 'margin') {
24547
- if ((type === 'margin') || (marginMode !== undefined)) {
24606
+ if (isPortfolioMargin) {
24607
+ response = await this.papiGetMarginMyTrades(this.extend(request, params));
24608
+ }
24609
+ else if ((type === 'margin') || (marginMode !== undefined)) {
24548
24610
  if (marginMode === 'isolated') {
24549
24611
  request['isIsolated'] = true;
24550
24612
  }
@@ -24555,10 +24617,20 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
24555
24617
  }
24556
24618
  }
24557
24619
  else if (market['linear']) {
24558
- response = await this.fapiPrivateGetUserTrades(this.extend(request, params));
24620
+ if (isPortfolioMargin) {
24621
+ response = await this.papiGetUmUserTrades(this.extend(request, params));
24622
+ }
24623
+ else {
24624
+ response = await this.fapiPrivateGetUserTrades(this.extend(request, params));
24625
+ }
24559
24626
  }
24560
24627
  else if (market['inverse']) {
24561
- response = await this.dapiPrivateGetUserTrades(this.extend(request, params));
24628
+ if (isPortfolioMargin) {
24629
+ response = await this.papiGetCmUserTrades(this.extend(request, params));
24630
+ }
24631
+ else {
24632
+ response = await this.dapiPrivateGetUserTrades(this.extend(request, params));
24633
+ }
24562
24634
  }
24563
24635
  }
24564
24636
  //
@@ -24626,6 +24698,70 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
24626
24698
  // }
24627
24699
  // ]
24628
24700
  //
24701
+ // linear portfolio margin
24702
+ //
24703
+ // [
24704
+ // {
24705
+ // "symbol": "BTCUSDT",
24706
+ // "id": 4575108247,
24707
+ // "orderId": 261942655610,
24708
+ // "side": "SELL",
24709
+ // "price": "47263.40",
24710
+ // "qty": "0.010",
24711
+ // "realizedPnl": "27.38400000",
24712
+ // "marginAsset": "USDT",
24713
+ // "quoteQty": "472.63",
24714
+ // "commission": "0.18905360",
24715
+ // "commissionAsset": "USDT",
24716
+ // "time": 1707530039409,
24717
+ // "buyer": false,
24718
+ // "maker": false,
24719
+ // "positionSide": "LONG"
24720
+ // }
24721
+ // ]
24722
+ //
24723
+ // inverse portfolio margin
24724
+ //
24725
+ // [
24726
+ // {
24727
+ // "symbol": "ETHUSD_PERP",
24728
+ // "id": 701907838,
24729
+ // "orderId": 71548909034,
24730
+ // "pair": "ETHUSD",
24731
+ // "side": "SELL",
24732
+ // "price": "2498.15",
24733
+ // "qty": "1",
24734
+ // "realizedPnl": "0.00012517",
24735
+ // "marginAsset": "ETH",
24736
+ // "baseQty": "0.00400296",
24737
+ // "commission": "0.00000160",
24738
+ // "commissionAsset": "ETH",
24739
+ // "time": 1707530317519,
24740
+ // "positionSide": "LONG",
24741
+ // "buyer": false,
24742
+ // "maker": false
24743
+ // }
24744
+ // ]
24745
+ //
24746
+ // spot margin portfolio margin
24747
+ //
24748
+ // [
24749
+ // {
24750
+ // "symbol": "ADAUSDT",
24751
+ // "id": 470227543,
24752
+ // "orderId": 4421170947,
24753
+ // "price": "0.53880000",
24754
+ // "qty": "10.00000000",
24755
+ // "quoteQty": "5.38800000",
24756
+ // "commission": "0.00538800",
24757
+ // "commissionAsset": "USDT",
24758
+ // "time": 1707545780522,
24759
+ // "isBuyer": false,
24760
+ // "isMaker": false,
24761
+ // "isBestMatch": true
24762
+ // }
24763
+ // ]
24764
+ //
24629
24765
  return this.parseTrades(response, market, since, limit);
24630
24766
  }
24631
24767
  async fetchMyDustTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
@@ -28512,15 +28648,19 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
28512
28648
  * @name binance#fetchBorrowInterest
28513
28649
  * @description fetch the interest owed by the user for borrowing currency for margin trading
28514
28650
  * @see https://binance-docs.github.io/apidocs/spot/en/#get-interest-history-user_data
28515
- * @param {string} code unified currency code
28516
- * @param {string} symbol unified market symbol when fetch interest in isolated markets
28651
+ * @see https://binance-docs.github.io/apidocs/pm/en/#get-margin-borrow-loan-interest-history-user_data
28652
+ * @param {string} [code] unified currency code
28653
+ * @param {string} [symbol] unified market symbol when fetch interest in isolated markets
28517
28654
  * @param {int} [since] the earliest time in ms to fetch borrrow interest for
28518
28655
  * @param {int} [limit] the maximum number of structures to retrieve
28519
28656
  * @param {object} [params] extra parameters specific to the exchange API endpoint
28657
+ * @param {boolean} [params.portfolioMargin] set to true if you would like to fetch the borrow interest in a portfolio margin account
28520
28658
  * @returns {object[]} a list of [borrow interest structures]{@link https://docs.ccxt.com/#/?id=borrow-interest-structure}
28521
28659
  */
28522
28660
  await this.loadMarkets();
28523
- const request = {};
28661
+ let isPortfolioMargin = undefined;
28662
+ [isPortfolioMargin, params] = this.handleOptionAndParams2(params, 'fetchBorrowInterest', 'papi', 'portfolioMargin', false);
28663
+ let request = {};
28524
28664
  let market = undefined;
28525
28665
  if (code !== undefined) {
28526
28666
  const currency = this.currency(code);
@@ -28532,11 +28672,20 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
28532
28672
  if (limit !== undefined) {
28533
28673
  request['size'] = limit;
28534
28674
  }
28535
- if (symbol !== undefined) { // Isolated
28536
- market = this.market(symbol);
28537
- request['isolatedSymbol'] = market['id'];
28675
+ [request, params] = this.handleUntilOption('endTime', request, params);
28676
+ let response = undefined;
28677
+ if (isPortfolioMargin) {
28678
+ response = await this.papiGetMarginMarginInterestHistory(this.extend(request, params));
28679
+ }
28680
+ else {
28681
+ if (symbol !== undefined) {
28682
+ market = this.market(symbol);
28683
+ request['isolatedSymbol'] = market['id'];
28684
+ }
28685
+ response = await this.sapiGetMarginInterestHistory(this.extend(request, params));
28538
28686
  }
28539
- const response = await this.sapiGetMarginInterestHistory(this.extend(request, params));
28687
+ //
28688
+ // spot margin
28540
28689
  //
28541
28690
  // {
28542
28691
  // "rows":[
@@ -28553,13 +28702,31 @@ class binance extends _abstract_binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
28553
28702
  // "total": 1
28554
28703
  // }
28555
28704
  //
28705
+ // spot margin portfolio margin
28706
+ //
28707
+ // {
28708
+ // "total": 49,
28709
+ // "rows": [
28710
+ // {
28711
+ // "txId": 1656187724899910076,
28712
+ // "interestAccuredTime": 1707541200000,
28713
+ // "asset": "USDT",
28714
+ // "rawAsset": "USDT",
28715
+ // "principal": "0.00011146",
28716
+ // "interest": "0.00000001",
28717
+ // "interestRate": "0.00089489",
28718
+ // "type": "PERIODIC"
28719
+ // },
28720
+ // ]
28721
+ // }
28722
+ //
28556
28723
  const rows = this.safeList(response, 'rows');
28557
28724
  const interest = this.parseBorrowInterests(rows, market);
28558
28725
  return this.filterByCurrencySinceLimit(interest, code, since, limit);
28559
28726
  }
28560
28727
  parseBorrowInterest(info, market = undefined) {
28561
28728
  const symbol = this.safeString(info, 'isolatedSymbol');
28562
- const timestamp = this.safeNumber(info, 'interestAccuredTime');
28729
+ const timestamp = this.safeInteger(info, 'interestAccuredTime');
28563
28730
  const marginMode = (symbol === undefined) ? 'cross' : 'isolated';
28564
28731
  return {
28565
28732
  'account': (symbol === undefined) ? 'cross' : symbol,
@@ -31341,6 +31508,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31341
31508
  if (timeInForce === 'IOC') {
31342
31509
  request['timeInForce'] = 'IOC';
31343
31510
  }
31511
+ const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
31344
31512
  if (isSpot) {
31345
31513
  [postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'POC', params);
31346
31514
  if (postOnly || (timeInForce === 'POC')) {
@@ -31352,7 +31520,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31352
31520
  request['quoteOrderQty'] = this.parseToNumeric(this.costToPrecision(symbol, cost));
31353
31521
  }
31354
31522
  else {
31355
- if (market['spot'] && isMarketOrder && (price !== undefined)) {
31523
+ if (isMarketOrder && (price !== undefined)) {
31356
31524
  // keep the legacy behavior, to avoid breaking the old spot-market-buying code
31357
31525
  const calculatedCost = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringMul(this.numberToString(amount), this.numberToString(price));
31358
31526
  request['quoteOrderQty'] = this.parseToNumeric(calculatedCost);
@@ -31364,6 +31532,18 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31364
31532
  if (!isMarketOrder) {
31365
31533
  request['price'] = this.parseToNumeric(this.priceToPrecision(symbol, price));
31366
31534
  }
31535
+ if (triggerPrice !== undefined) {
31536
+ if (isMarketOrder && this.safeString(request, 'quoteOrderQty') === undefined) {
31537
+ throw new _base_errors_js__WEBPACK_IMPORTED_MODULE_2__.ArgumentsRequired(this.id + ' createOrder() requires the cost parameter (or the amount + price) for placing spot market-buy trigger orders');
31538
+ }
31539
+ request['stopPrice'] = this.priceToPrecision(symbol, triggerPrice);
31540
+ if (type === 'LIMIT') {
31541
+ request['type'] = 'TRIGGER_LIMIT';
31542
+ }
31543
+ else if (type === 'MARKET') {
31544
+ request['type'] = 'TRIGGER_MARKET';
31545
+ }
31546
+ }
31367
31547
  }
31368
31548
  else {
31369
31549
  [postOnly, params] = this.handlePostOnly(isMarketOrder, timeInForce === 'PostOnly', params);
@@ -31376,7 +31556,6 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31376
31556
  else if (timeInForce === 'FOK') {
31377
31557
  request['timeInForce'] = 'FOK';
31378
31558
  }
31379
- const triggerPrice = this.safeString2(params, 'stopPrice', 'triggerPrice');
31380
31559
  const stopLossPrice = this.safeString(params, 'stopLossPrice');
31381
31560
  const takeProfitPrice = this.safeString(params, 'takeProfitPrice');
31382
31561
  const trailingAmount = this.safeString(params, 'trailingAmount');
@@ -31676,6 +31855,13 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31676
31855
  };
31677
31856
  return this.safeString(sides, side, side);
31678
31857
  }
31858
+ parseOrderType(type) {
31859
+ const types = {
31860
+ 'trigger_market': 'market',
31861
+ 'trigger_limit': 'limit',
31862
+ };
31863
+ return this.safeString(types, type, type);
31864
+ }
31679
31865
  parseOrder(order, market = undefined) {
31680
31866
  //
31681
31867
  // spot
@@ -31940,7 +32126,7 @@ class bingx extends _abstract_bingx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"
31940
32126
  'datetime': this.iso8601(timestamp),
31941
32127
  'lastTradeTimestamp': lastTradeTimestamp,
31942
32128
  'lastUpdateTimestamp': this.safeInteger(order, 'updateTime'),
31943
- 'type': this.safeStringLower2(order, 'type', 'o'),
32129
+ 'type': this.parseOrderType(this.safeStringLower2(order, 'type', 'o')),
31944
32130
  'timeInForce': this.safeString(order, 'timeInForce'),
31945
32131
  'postOnly': undefined,
31946
32132
  'side': this.parseOrderSide(side),
@@ -44023,8 +44209,8 @@ class bitforex extends _abstract_bitforex_js__WEBPACK_IMPORTED_MODULE_0__/* ["de
44023
44209
  }
44024
44210
  parseOrder(order, market = undefined) {
44025
44211
  const id = this.safeString(order, 'orderId');
44026
- const timestamp = this.safeNumber(order, 'createTime');
44027
- const lastTradeTimestamp = this.safeNumber(order, 'lastTime');
44212
+ const timestamp = this.safeInteger(order, 'createTime');
44213
+ const lastTradeTimestamp = this.safeInteger(order, 'lastTime');
44028
44214
  const symbol = market['symbol'];
44029
44215
  const sideId = this.safeInteger(order, 'tradeType');
44030
44216
  const side = this.parseSide(sideId);
@@ -117009,7 +117195,7 @@ class currencycom extends _abstract_currencycom_js__WEBPACK_IMPORTED_MODULE_0__/
117009
117195
  //
117010
117196
  market = this.safeMarket(this.safeString(position, 'symbol'), market);
117011
117197
  const symbol = market['symbol'];
117012
- const timestamp = this.safeNumber(position, 'createdTimestamp');
117198
+ const timestamp = this.safeInteger(position, 'createdTimestamp');
117013
117199
  const quantityRaw = this.safeString(position, 'openQuantity');
117014
117200
  const side = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringGt(quantityRaw, '0') ? 'long' : 'short';
117015
117201
  const quantity = _base_Precise_js__WEBPACK_IMPORTED_MODULE_3__/* .Precise */ .O.stringAbs(quantityRaw);
@@ -152427,7 +152613,7 @@ class htx extends _abstract_htx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
152427
152613
  const marginMode = (marketId === undefined) ? 'cross' : 'isolated';
152428
152614
  market = this.safeMarket(marketId);
152429
152615
  const symbol = this.safeString(market, 'symbol');
152430
- const timestamp = this.safeNumber(info, 'accrued-at');
152616
+ const timestamp = this.safeInteger(info, 'accrued-at');
152431
152617
  return {
152432
152618
  'account': (marginMode === 'isolated') ? symbol : 'cross',
152433
152619
  'symbol': symbol,
@@ -187326,7 +187512,7 @@ class mexc extends _abstract_mexc_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"]
187326
187512
  const marginType = (openType === '1') ? 'isolated' : 'cross';
187327
187513
  const leverage = this.safeNumber(position, 'leverage');
187328
187514
  const liquidationPrice = this.safeNumber(position, 'liquidatePrice');
187329
- const timestamp = this.safeNumber(position, 'updateTime');
187515
+ const timestamp = this.safeInteger(position, 'updateTime');
187330
187516
  return this.safePosition({
187331
187517
  'info': position,
187332
187518
  'id': undefined,
@@ -234698,7 +234884,7 @@ class cex extends _cex_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z {
234698
234884
  trade = trade.split(':');
234699
234885
  }
234700
234886
  const side = this.safeString(trade, 0);
234701
- const timestamp = this.safeNumber(trade, 1);
234887
+ const timestamp = this.safeInteger(trade, 1);
234702
234888
  const amount = this.safeString(trade, 2);
234703
234889
  const price = this.safeString(trade, 3);
234704
234890
  const id = this.safeString(trade, 4);
@@ -244415,7 +244601,7 @@ class gemini extends _gemini_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z
244415
244601
  // "socket_sequence": 139
244416
244602
  // }
244417
244603
  //
244418
- const timestamp = this.safeNumber(order, 'timestampms');
244604
+ const timestamp = this.safeInteger(order, 'timestampms');
244419
244605
  const status = this.safeString(order, 'type');
244420
244606
  const marketId = this.safeString(order, 'symbol');
244421
244607
  const typeId = this.safeString(order, 'order_type');
@@ -305069,7 +305255,7 @@ SOFTWARE.
305069
305255
 
305070
305256
  //-----------------------------------------------------------------------------
305071
305257
  // this is updated by vss.js when building
305072
- const version = '4.2.40';
305258
+ const version = '4.2.41';
305073
305259
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange */ .e.ccxtVersion = version;
305074
305260
  //-----------------------------------------------------------------------------
305075
305261