ccxt 4.1.50 → 4.1.51

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
@@ -216,13 +216,13 @@ console.log(version, Object.keys(exchanges));
216
216
 
217
217
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
218
218
 
219
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.50/dist/ccxt.browser.js
220
- * unpkg: https://unpkg.com/ccxt@4.1.50/dist/ccxt.browser.js
219
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.1.51/dist/ccxt.browser.js
220
+ * unpkg: https://unpkg.com/ccxt@4.1.51/dist/ccxt.browser.js
221
221
 
222
222
  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.
223
223
 
224
224
  ```HTML
225
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.50/dist/ccxt.browser.js"></script>
225
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.1.51/dist/ccxt.browser.js"></script>
226
226
  ```
227
227
 
228
228
  Creates a global `ccxt` object:
@@ -149548,12 +149548,6 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
149548
149548
  'WithdrawInfo': 3,
149549
149549
  'WithdrawStatus': 3,
149550
149550
  'WalletTransfer': 3,
149551
- // staking
149552
- 'Stake': 3,
149553
- 'Unstake': 3,
149554
- 'Staking/Assets': 3,
149555
- 'Staking/Pending': 3,
149556
- 'Staking/Transactions': 3,
149557
149551
  // sub accounts
149558
149552
  'CreateSubaccount': 3,
149559
149553
  'AccountTransfer': 3,
@@ -149847,7 +149841,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
149847
149841
  'max': undefined,
149848
149842
  },
149849
149843
  'cost': {
149850
- 'min': undefined,
149844
+ 'min': this.safeNumber(market, 'costmin'),
149851
149845
  'max': undefined,
149852
149846
  },
149853
149847
  },
@@ -150618,7 +150612,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
150618
150612
  /**
150619
150613
  * @method
150620
150614
  * @name kraken#createOrder
150621
- * @see https://docs.kraken.com/rest/#tag/User-Trading/operation/addOrder
150615
+ * @see https://docs.kraken.com/rest/#tag/Trading/operation/addOrder
150622
150616
  * @description create a trade order
150623
150617
  * @param {string} symbol unified symbol of the market to create an order in
150624
150618
  * @param {string} type 'market' or 'limit'
@@ -150961,7 +150955,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
150961
150955
  * @method
150962
150956
  * @name kraken#editOrder
150963
150957
  * @description edit a trade order
150964
- * @see https://docs.kraken.com/rest/#tag/User-Trading/operation/editOrder
150958
+ * @see https://docs.kraken.com/rest/#tag/Trading/operation/editOrder
150965
150959
  * @param {string} id order id
150966
150960
  * @param {string} symbol unified symbol of the market to create an order in
150967
150961
  * @param {string} type 'market' or 'limit'
@@ -151557,6 +151551,9 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
151557
151551
  const request = {
151558
151552
  'asset': currency['id'],
151559
151553
  };
151554
+ if (since !== undefined) {
151555
+ request['start'] = since;
151556
+ }
151560
151557
  const response = await this.privatePostDepositStatus(this.extend(request, params));
151561
151558
  //
151562
151559
  // { error: [],
@@ -151783,7 +151780,7 @@ class kraken extends _abstract_kraken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defaul
151783
151780
  const request = {
151784
151781
  'asset': currency['id'],
151785
151782
  'amount': amount,
151786
- // 'address': address, // they don't allow withdrawals to direct addresses
151783
+ 'address': address,
151787
151784
  };
151788
151785
  const response = await this.privatePostWithdraw(this.extend(request, params));
151789
151786
  //
@@ -236594,6 +236591,25 @@ class krakenfutures extends _krakenfutures_js__WEBPACK_IMPORTED_MODULE_0__/* ["d
236594
236591
  // "reason": "cancelled_by_user"
236595
236592
  // }
236596
236593
  //
236594
+ // {
236595
+ // feed: 'open_orders',
236596
+ // order: {
236597
+ // instrument: 'PF_XBTUSD',
236598
+ // time: 1698159920097,
236599
+ // last_update_time: 1699835622988,
236600
+ // qty: 1.1,
236601
+ // filled: 0,
236602
+ // limit_price: 20000,
236603
+ // stop_price: 0,
236604
+ // type: 'limit',
236605
+ // order_id: '0eaf02b0-855d-4451-a3b7-e2b3070c1fa4',
236606
+ // direction: 0,
236607
+ // reduce_only: false
236608
+ // },
236609
+ // is_cancel: false,
236610
+ // reason: 'edited_by_user'
236611
+ // }
236612
+ //
236597
236613
  let orders = this.orders;
236598
236614
  if (orders === undefined) {
236599
236615
  const limit = this.safeInteger(this.options, 'ordersLimit');
@@ -236608,7 +236624,8 @@ class krakenfutures extends _krakenfutures_js__WEBPACK_IMPORTED_MODULE_0__/* ["d
236608
236624
  const orderId = this.safeString(order, 'order_id');
236609
236625
  const previousOrders = this.safeValue(orders.hashmap, symbol, {});
236610
236626
  const previousOrder = this.safeValue(previousOrders, orderId);
236611
- if (previousOrder === undefined) {
236627
+ const reason = this.safeString(message, 'reason');
236628
+ if ((previousOrder === undefined) || (reason === 'edited_by_user')) {
236612
236629
  const parsed = this.parseWsOrder(order);
236613
236630
  orders.append(parsed);
236614
236631
  client.resolve(orders, messageHash);
@@ -236634,9 +236651,10 @@ class krakenfutures extends _krakenfutures_js__WEBPACK_IMPORTED_MODULE_0__/* ["d
236634
236651
  }
236635
236652
  previousOrder['cost'] = totalCost;
236636
236653
  if (previousOrder['filled'] !== undefined) {
236637
- previousOrder['filled'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringAdd */ .O.stringAdd(previousOrder['filled'], this.numberToString(trade['amount']));
236654
+ const stringOrderFilled = this.numberToString(previousOrder['filled']);
236655
+ previousOrder['filled'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringAdd */ .O.stringAdd(stringOrderFilled, this.numberToString(trade['amount']));
236638
236656
  if (previousOrder['amount'] !== undefined) {
236639
- previousOrder['remaining'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringSub */ .O.stringSub(previousOrder['amount'], previousOrder['filled']);
236657
+ previousOrder['remaining'] = _base_Precise_js__WEBPACK_IMPORTED_MODULE_2__/* .Precise.stringSub */ .O.stringSub(this.numberToString(previousOrder['amount']), stringOrderFilled);
236640
236658
  }
236641
236659
  }
236642
236660
  if (previousOrder['fee'] === undefined) {
@@ -286654,7 +286672,7 @@ SOFTWARE.
286654
286672
 
286655
286673
  //-----------------------------------------------------------------------------
286656
286674
  // this is updated by vss.js when building
286657
- const version = '4.1.50';
286675
+ const version = '4.1.51';
286658
286676
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
286659
286677
  //-----------------------------------------------------------------------------
286660
286678