ccxt 4.0.78 → 4.0.79

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/dist/cjs/ccxt.js CHANGED
@@ -180,7 +180,7 @@ var woo$1 = require('./src/pro/woo.js');
180
180
 
181
181
  //-----------------------------------------------------------------------------
182
182
  // this is updated by vss.js when building
183
- const version = '4.0.78';
183
+ const version = '4.0.79';
184
184
  Exchange["default"].ccxtVersion = version;
185
185
  const exchanges = {
186
186
  'ace': ace,
@@ -186,12 +186,11 @@ class binance extends binance$1 {
186
186
  'api': {
187
187
  // the API structure below will need 3-layer apidefs
188
188
  'sapi': {
189
- // IP (api) = 1200 per minute => (rateLimit = 50)
190
189
  // IP (sapi) request rate limit of 12 000 per minute
191
- // 1 IP (sapi) => cost = 0.1
190
+ // 1 IP (sapi) => cost = 0.1 => (1000 / (50 * 0.1)) * 60 = 12000
192
191
  // 10 IP (sapi) => cost = 1
193
192
  // UID (sapi) request rate limit of 180 000 per minute
194
- // 1 UID (sapi) => cost = 1200 / 180 000 = 0.006667
193
+ // 1 UID (sapi) => cost = 0.006667 => (1000 / (50 * 0.006667)) * 60 = 180000
195
194
  'get': {
196
195
  'system/status': 0.1,
197
196
  // these endpoints require this.apiKey
@@ -207,7 +206,7 @@ class binance extends binance$1 {
207
206
  'asset/transfer': 0.1,
208
207
  'asset/assetDetail': 0.1,
209
208
  'asset/tradeFee': 0.1,
210
- 'asset/ledger-transfer/cloud-mining/queryByPage': 4,
209
+ 'asset/ledger-transfer/cloud-mining/queryByPage': 4.0002,
211
210
  'asset/convert-transfer/queryByPage': 0.033335,
212
211
  'margin/loan': 1,
213
212
  'margin/repay': 1,
@@ -236,15 +235,16 @@ class binance extends binance$1 {
236
235
  'margin/isolatedMarginTier': 0.1,
237
236
  'margin/rateLimit/order': 2,
238
237
  'margin/dribblet': 0.1,
239
- 'margin/dust': 20,
238
+ 'margin/dust': 20.001,
240
239
  'margin/crossMarginCollateralRatio': 10,
241
240
  'margin/exchange-small-liability': 0.6667,
242
241
  'margin/exchange-small-liability-history': 0.6667,
243
242
  'margin/next-hourly-interest-rate': 0.6667,
243
+ 'margin/delist-schedule': 0.6667,
244
244
  'loan/vip/loanable/data': 40,
245
245
  'loan/vip/collateral/data': 40,
246
- 'loan/vip/request/data': 40,
247
- 'loan/income': 40,
246
+ 'loan/vip/request/data': 2.6668,
247
+ 'loan/income': 40.002,
248
248
  'loan/ongoing/orders': 40,
249
249
  'loan/ltv/adjustment/history': 40,
250
250
  'loan/borrow/history': 40,
@@ -263,7 +263,7 @@ class binance extends binance$1 {
263
263
  'futures/loan/wallet': 1,
264
264
  'futures/loan/adjustCollateral/history': 1,
265
265
  'futures/loan/liquidationHistory': 1,
266
- 'rebate/taxQuery': 20.001,
266
+ 'rebate/taxQuery': 80.004,
267
267
  // https://binance-docs.github.io/apidocs/spot/en/#withdraw-sapi
268
268
  'capital/config/getall': 1,
269
269
  'capital/deposit/address': 1,
@@ -272,7 +272,7 @@ class binance extends binance$1 {
272
272
  'capital/deposit/subHisrec': 0.1,
273
273
  'capital/withdraw/history': 0.1,
274
274
  'capital/contract/convertible-coins': 4.0002,
275
- 'convert/tradeFlow': 20.0001,
275
+ 'convert/tradeFlow': 20.001,
276
276
  'convert/exchangeInfo': 50,
277
277
  'convert/assetInfo': 10,
278
278
  'convert/orderStatus': 0.6667,
@@ -280,7 +280,6 @@ class binance extends binance$1 {
280
280
  'account/apiTradingStatus': 0.1,
281
281
  'account/apiRestrictions/ipRestriction': 0.1,
282
282
  'bnbBurn': 0.1,
283
- // 'sub-account/assets': 1, (v3 endpoint)
284
283
  'sub-account/futures/account': 1,
285
284
  'sub-account/futures/accountSummary': 0.1,
286
285
  'sub-account/futures/positionRisk': 1,
@@ -294,15 +293,16 @@ class binance extends binance$1 {
294
293
  'sub-account/transfer/subUserHistory': 0.1,
295
294
  'sub-account/universalTransfer': 0.1,
296
295
  'sub-account/apiRestrictions/ipRestriction/thirdPartyList': 1,
297
- 'sub-account/transaction-tatistics': 0.4,
296
+ 'sub-account/transaction-statistics': 0.40002,
297
+ 'sub-account/subAccountApi/ipRestriction': 20.001,
298
298
  'managed-subaccount/asset': 0.1,
299
299
  'managed-subaccount/accountSnapshot': 240,
300
300
  'managed-subaccount/queryTransLogForInvestor': 0.1,
301
- 'managed-subaccount/queryTransLogForTradeParent': 0.1,
302
- 'managed-subaccount/fetch-future-asset': 0.1,
301
+ 'managed-subaccount/queryTransLogForTradeParent': 0.40002,
302
+ 'managed-subaccount/fetch-future-asset': 0.40002,
303
303
  'managed-subaccount/marginAsset': 0.1,
304
- 'managed-subaccount/info': 0.4,
305
- 'managed-subaccount/deposit/address': 0.1,
304
+ 'managed-subaccount/info': 0.40002,
305
+ 'managed-subaccount/deposit/address': 0.006667,
306
306
  'managed-subaccount/query-trans-log': 0.40002,
307
307
  // lending endpoints
308
308
  'lending/daily/product/list': 0.1,
@@ -380,6 +380,9 @@ class binance extends binance$1 {
380
380
  'giftcard/verify': 0.1,
381
381
  'giftcard/cryptography/rsa-public-key': 0.1,
382
382
  'giftcard/buyCode/token-limit': 0.1,
383
+ 'algo/spot/openOrders': 0.1,
384
+ 'algo/spot/historicalOrders': 0.1,
385
+ 'algo/spot/subOrders': 0.1,
383
386
  'algo/futures/openOrders': 0.1,
384
387
  'algo/futures/historicalOrders': 0.1,
385
388
  'algo/futures/subOrders': 0.1,
@@ -421,9 +424,9 @@ class binance extends binance$1 {
421
424
  'simple-earn/flexible/history/collateralRecord': 0.1,
422
425
  },
423
426
  'post': {
424
- 'asset/dust': 1,
427
+ 'asset/dust': 0.06667,
425
428
  'asset/dust-btc': 0.1,
426
- 'asset/transfer': 0.1,
429
+ 'asset/transfer': 6.0003,
427
430
  'asset/get-funding-asset': 0.1,
428
431
  'asset/convert-transfer': 0.033335,
429
432
  'account/disableFastWithdrawSwitch': 0.1,
@@ -433,12 +436,12 @@ class binance extends binance$1 {
433
436
  'capital/withdraw/apply': 4.0002,
434
437
  'capital/contract/convertible-coins': 4.0002,
435
438
  'capital/deposit/credit-apply': 0.1,
436
- 'margin/transfer': 1,
439
+ 'margin/transfer': 4.0002,
437
440
  'margin/loan': 20.001,
438
441
  'margin/repay': 20.001,
439
442
  'margin/order': 0.040002,
440
443
  'margin/order/oco': 0.040002,
441
- 'margin/dust': 20,
444
+ 'margin/dust': 20.001,
442
445
  'margin/exchange-small-liability': 20.001,
443
446
  // 'margin/isolated/create': 1, discontinued
444
447
  'margin/isolated/transfer': 4.0002,
@@ -455,8 +458,6 @@ class binance extends binance$1 {
455
458
  'sub-account/transfer/subToMaster': 0.1,
456
459
  'sub-account/universalTransfer': 0.1,
457
460
  'sub-account/options/enable': 0.1,
458
- // v2 not supported yet
459
- // 'sub-account/subAccountApi/ipRestriction': 20,
460
461
  'managed-subaccount/deposit': 0.1,
461
462
  'managed-subaccount/withdraw': 0.1,
462
463
  'userDataStream': 0.1,
@@ -502,6 +503,7 @@ class binance extends binance$1 {
502
503
  'giftcard/createCode': 0.1,
503
504
  'giftcard/redeemCode': 0.1,
504
505
  'giftcard/buyCode': 0.1,
506
+ 'algo/spot/newOrderTwap': 20.001,
505
507
  'algo/futures/newOrderVp': 20.001,
506
508
  'algo/futures/newOrderTwap': 20.001,
507
509
  // staking
@@ -509,14 +511,14 @@ class binance extends binance$1 {
509
511
  'staking/redeem': 0.1,
510
512
  'staking/setAutoStaking': 0.1,
511
513
  'portfolio/repay': 20.001,
512
- 'loan/vip/renew': 40,
513
- 'loan/vip/borrow': 40,
514
- 'loan/borrow': 40,
515
- 'loan/repay': 40,
516
- 'loan/adjust/ltv': 40,
517
- 'loan/customize/margin_call': 40,
518
- 'loan/vip/repay': 40,
519
- 'convert/getQuote': 20.001,
514
+ 'loan/vip/renew': 40.002,
515
+ 'loan/vip/borrow': 40.002,
516
+ 'loan/borrow': 40.002,
517
+ 'loan/repay': 40.002,
518
+ 'loan/adjust/ltv': 40.002,
519
+ 'loan/customize/margin_call': 40.002,
520
+ 'loan/vip/repay': 40.002,
521
+ 'convert/getQuote': 1.3334,
520
522
  'convert/acceptQuote': 3.3335,
521
523
  'portfolio/auto-collection': 150,
522
524
  'portfolio/asset-collection': 6,
@@ -541,15 +543,17 @@ class binance extends binance$1 {
541
543
  'delete': {
542
544
  // 'account/apiRestrictions/ipRestriction/ipList': 1, discontinued
543
545
  'margin/openOrders': 0.1,
544
- 'margin/order': 0.0066667,
545
- 'margin/orderList': 0.0066667,
546
+ 'margin/order': 0.006667,
547
+ 'margin/orderList': 0.006667,
546
548
  'margin/isolated/account': 2.0001,
547
549
  'userDataStream': 0.1,
548
550
  'userDataStream/isolated': 0.1,
549
551
  // brokerage API TODO NO MENTION OF RATELIMIT IN BROKERAGE DOCS
550
552
  'broker/subAccountApi': 1,
551
553
  'broker/subAccountApi/ipRestriction/ipList': 1,
554
+ 'algo/spot/order': 0.1,
552
555
  'algo/futures/order': 0.1,
556
+ 'sub-account/subAccountApi/ipRestriction/ipList': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
553
557
  },
554
558
  },
555
559
  'sapiV2': {
@@ -557,10 +561,13 @@ class binance extends binance$1 {
557
561
  'sub-account/futures/account': 0.1,
558
562
  'sub-account/futures/positionRisk': 0.1,
559
563
  },
564
+ 'post': {
565
+ 'sub-account/subAccountApi/ipRestriction': 20.001, // Weight(UID): 3000 => cost = 0.006667 * 3000 = 20.001
566
+ },
560
567
  },
561
568
  'sapiV3': {
562
569
  'get': {
563
- 'sub-account/assets': 1,
570
+ 'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
564
571
  },
565
572
  'post': {
566
573
  'asset/getUserAsset': 0.5,
@@ -568,7 +575,7 @@ class binance extends binance$1 {
568
575
  },
569
576
  'sapiV4': {
570
577
  'get': {
571
- 'sub-account/assets': 1,
578
+ 'sub-account/assets': 0.40002, // Weight(UID): 60 => cost = 0.006667 * 60 = 0.40002
572
579
  },
573
580
  },
574
581
  // deprecated
@@ -823,55 +830,59 @@ class binance extends binance$1 {
823
830
  },
824
831
  },
825
832
  'public': {
833
+ // IP (api) request rate limit of 6000 per minute
834
+ // 1 IP (api) => cost = 0.2 => (1000 / (50 * 0.2)) * 60 = 6000
826
835
  'get': {
827
- 'ping': 1,
828
- 'time': 1,
829
- 'depth': { 'cost': 1, 'byLimit': [[100, 1], [500, 5], [1000, 10], [5000, 50]] },
830
- 'trades': 1,
831
- 'aggTrades': 1,
832
- 'historicalTrades': 5,
833
- 'klines': 1,
834
- 'ticker/24hr': { 'cost': 1, 'noSymbol': 40 },
835
- 'ticker/price': { 'cost': 1, 'noSymbol': 2 },
836
- 'ticker/bookTicker': { 'cost': 1, 'noSymbol': 2 },
837
- 'exchangeInfo': 10,
836
+ 'ping': 0.2,
837
+ 'time': 0.2,
838
+ 'depth': { 'cost': 0.4, 'byLimit': [[100, 0.4], [500, 2], [1000, 4], [5000, 20]] },
839
+ 'trades': 0.4,
840
+ 'aggTrades': 0.4,
841
+ 'historicalTrades': 2,
842
+ 'klines': 0.4,
843
+ 'uiKlines': 0.4,
844
+ 'ticker/24hr': { 'cost': 0.4, 'noSymbol': 16 },
845
+ 'ticker/price': { 'cost': 0.4, 'noSymbol': 0.8 },
846
+ 'ticker/bookTicker': { 'cost': 0.4, 'noSymbol': 0.8 },
847
+ 'exchangeInfo': 4,
848
+ 'avgPrice': 0.4,
838
849
  },
839
850
  'put': {
840
- 'userDataStream': 1,
851
+ 'userDataStream': 0.4,
841
852
  },
842
853
  'post': {
843
- 'userDataStream': 1,
854
+ 'userDataStream': 0.4,
844
855
  },
845
856
  'delete': {
846
- 'userDataStream': 1,
857
+ 'userDataStream': 0.4,
847
858
  },
848
859
  },
849
860
  'private': {
850
861
  'get': {
851
- 'allOrderList': 10,
852
- 'openOrderList': 3,
853
- 'orderList': 2,
854
- 'order': 2,
855
- 'openOrders': { 'cost': 3, 'noSymbol': 40 },
856
- 'allOrders': 10,
857
- 'account': 10,
858
- 'myTrades': 10,
859
- 'rateLimit/order': 20,
860
- 'myPreventedMatches': 1,
861
- 'myAllocations': 10,
862
+ 'allOrderList': 4,
863
+ 'openOrderList': 1.2,
864
+ 'orderList': 0.8,
865
+ 'order': 0.8,
866
+ 'openOrders': { 'cost': 1.2, 'noSymbol': 16 },
867
+ 'allOrders': 4,
868
+ 'account': 4,
869
+ 'myTrades': 4,
870
+ 'rateLimit/order': 8,
871
+ 'myPreventedMatches': 4,
872
+ 'myAllocations': 4,
862
873
  },
863
874
  'post': {
864
- 'order/oco': 1,
865
- 'sor/order': 1,
866
- 'sor/order/test': 1,
867
- 'order': 1,
868
- 'order/cancelReplace': 1,
869
- 'order/test': 1,
875
+ 'order/oco': 0.2,
876
+ 'sor/order': 0.2,
877
+ 'sor/order/test': 0.2,
878
+ 'order': 0.2,
879
+ 'order/cancelReplace': 0.2,
880
+ 'order/test': 0.2,
870
881
  },
871
882
  'delete': {
872
- 'openOrders': 1,
873
- 'orderList': 1,
874
- 'order': 1,
883
+ 'openOrders': 0.2,
884
+ 'orderList': 0.2,
885
+ 'order': 0.2,
875
886
  },
876
887
  },
877
888
  'papi': {
@@ -633,7 +633,7 @@ class bithumb extends bithumb$1 {
633
633
  await this.loadMarkets();
634
634
  const market = this.market(symbol);
635
635
  const request = {
636
- 'currency': market['base'],
636
+ 'currency': market['base'] + '_' + market['quote'],
637
637
  };
638
638
  if (limit !== undefined) {
639
639
  request['count'] = limit; // default 20, max 100
@@ -192,6 +192,7 @@ class mexc extends mexc$1 {
192
192
  'rebate/detail': 1,
193
193
  'rebate/detail/kickback': 1,
194
194
  'rebate/referCode': 1,
195
+ 'rebate/affiliate/commission': 1,
195
196
  'mxDeduct/enable': 1,
196
197
  'userDataStream': 1,
197
198
  },
@@ -1607,8 +1607,13 @@ class phemex extends phemex$1 {
1607
1607
  id = this.safeString2(trade, 'execId', 'execID');
1608
1608
  orderId = this.safeString(trade, 'orderID');
1609
1609
  if (market['settle'] === 'USDT') {
1610
- const sideId = this.safeString(trade, 'side');
1611
- side = (sideId === '1') ? 'buy' : 'sell';
1610
+ const sideId = this.safeStringLower(trade, 'side');
1611
+ if ((sideId === 'buy') || (sideId === 'sell')) {
1612
+ side = sideId;
1613
+ }
1614
+ else if (sideId !== undefined) {
1615
+ side = (sideId === '1') ? 'buy' : 'sell';
1616
+ }
1612
1617
  const ordType = this.safeString(trade, 'ordType');
1613
1618
  if (ordType === '1') {
1614
1619
  type = 'market';
@@ -1616,7 +1621,7 @@ class phemex extends phemex$1 {
1616
1621
  else if (ordType === '2') {
1617
1622
  type = 'limit';
1618
1623
  }
1619
- priceString = this.safeString(trade, 'priceRp');
1624
+ priceString = this.safeString(trade, 'execPriceRp');
1620
1625
  amountString = this.safeString(trade, 'execQtyRq');
1621
1626
  costString = this.safeString(trade, 'execValueRv');
1622
1627
  feeCostString = this.safeString(trade, 'execFeeRv');
@@ -1204,25 +1204,21 @@ class poloniex extends poloniex$1 {
1204
1204
  return this.parseOrders(response, market, since, limit, extension);
1205
1205
  }
1206
1206
  async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
1207
- //
1208
- // @method
1209
- // @name poloniex#createOrder
1210
- // @description create a trade order
1211
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1212
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1213
- // @param {string} symbol unified symbol of the market to create an order in
1214
- // @param {string} type 'market' or 'limit'
1215
- // @param {string} side 'buy' or 'sell'
1216
- // @param {float} amount how much of currency you want to trade in units of base currency
1217
- // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1218
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
1219
- // <<<<<<< HEAD
1220
- // @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1221
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1222
- // =======
1223
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1224
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1225
- //
1207
+ /**
1208
+ * @method
1209
+ * @name poloniex#createOrder
1210
+ * @description create a trade order
1211
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1212
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1213
+ * @param {string} symbol unified symbol of the market to create an order in
1214
+ * @param {string} type 'market' or 'limit'
1215
+ * @param {string} side 'buy' or 'sell'
1216
+ * @param {float} amount how much of currency you want to trade in units of base currency
1217
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1218
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
1219
+ * @param {float} [params.triggerPrice] *spot only* The price at which a trigger order is triggered at
1220
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1221
+ */
1226
1222
  await this.loadMarkets();
1227
1223
  const market = this.market(symbol);
1228
1224
  if (!market['spot']) {
@@ -1291,26 +1287,22 @@ class poloniex extends poloniex$1 {
1291
1287
  return [request, params];
1292
1288
  }
1293
1289
  async editOrder(id, symbol, type, side, amount = undefined, price = undefined, params = {}) {
1294
- //
1295
- // @method
1296
- // @name poloniex#editOrder
1297
- // @description edit a trade order
1298
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1299
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1300
- // @param {string} id order id
1301
- // @param {string} symbol unified symbol of the market to create an order in
1302
- // @param {string} type 'market' or 'limit'
1303
- // @param {string} side 'buy' or 'sell'
1304
- // @param {float} [amount] how much of the currency you want to trade in units of the base currency
1305
- // @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1306
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
1307
- // <<<<<<< HEAD
1308
- // @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1309
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1310
- // =======
1311
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1312
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1313
- //
1290
+ /**
1291
+ * @method
1292
+ * @name poloniex#editOrder
1293
+ * @description edit a trade order
1294
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1295
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1296
+ * @param {string} id order id
1297
+ * @param {string} symbol unified symbol of the market to create an order in
1298
+ * @param {string} type 'market' or 'limit'
1299
+ * @param {string} side 'buy' or 'sell'
1300
+ * @param {float} [amount] how much of the currency you want to trade in units of the base currency
1301
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1302
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
1303
+ * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
1304
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1305
+ */
1314
1306
  await this.loadMarkets();
1315
1307
  const market = this.market(symbol);
1316
1308
  if (!market['spot']) {
@@ -1350,12 +1342,8 @@ class poloniex extends poloniex$1 {
1350
1342
  // @param {string} id order id
1351
1343
  // @param {string} symbol unified symbol of the market the order was made in
1352
1344
  // @param {object} [params] extra parameters specific to the poloniex api endpoint
1353
- // <<<<<<< HEAD
1354
1345
  // @param {boolean} [params.trigger] true if canceling a trigger order
1355
1346
  // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1356
- // =======
1357
- // @returns {object} An [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1358
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1359
1347
  //
1360
1348
  await this.loadMarkets();
1361
1349
  const request = {};
@@ -1385,21 +1373,17 @@ class poloniex extends poloniex$1 {
1385
1373
  return this.parseOrder(response);
1386
1374
  }
1387
1375
  async cancelAllOrders(symbol = undefined, params = {}) {
1388
- //
1389
- // @method
1390
- // @name poloniex#cancelAllOrders
1391
- // @description cancel all open orders
1392
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1393
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1394
- // @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1395
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
1396
- // <<<<<<< HEAD
1397
- // @param {boolean} [params.trigger] true if canceling trigger orders
1398
- // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1399
- // =======
1400
- // @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1401
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1402
- //
1376
+ /**
1377
+ * @method
1378
+ * @name poloniex#cancelAllOrders
1379
+ * @description cancel all open orders
1380
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1381
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1382
+ * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1383
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
1384
+ * @param {boolean} [params.trigger] true if canceling trigger orders
1385
+ * @returns {object[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1386
+ */
1403
1387
  await this.loadMarkets();
1404
1388
  const request = {
1405
1389
  // 'accountTypes': 'SPOT',
@@ -1441,22 +1425,18 @@ class poloniex extends poloniex$1 {
1441
1425
  return this.parseOrders(response, market);
1442
1426
  }
1443
1427
  async fetchOrder(id, symbol = undefined, params = {}) {
1444
- //
1445
- // @method
1446
- // @name poloniex#fetchOrder
1447
- // @description fetch an order by it's id
1448
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1449
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1450
- // @param {string} id order id
1451
- // @param {string} symbol unified market symbol, default is undefined
1452
- // @param {object} [params] extra parameters specific to the poloniex api endpoint
1453
- // <<<<<<< HEAD
1454
- // @param {boolean} [params.trigger] true if fetching a trigger order
1455
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1456
- // =======
1457
- // @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1458
- // >>>>>>> 1e1c747220aa06f7c710fc71e9b6658d1260c4d1
1459
- //
1428
+ /**
1429
+ * @method
1430
+ * @name poloniex#fetchOrder
1431
+ * @description fetch an order by it's id
1432
+ * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1433
+ * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1434
+ * @param {string} id order id
1435
+ * @param {string} symbol unified market symbol, default is undefined
1436
+ * @param {object} [params] extra parameters specific to the poloniex api endpoint
1437
+ * @param {boolean} [params.trigger] true if fetching a trigger order
1438
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1439
+ */
1460
1440
  await this.loadMarkets();
1461
1441
  id = id.toString();
1462
1442
  const request = {
package/js/ccxt.d.ts CHANGED
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
5
  import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
7
- declare const version = "4.0.77";
7
+ declare const version = "4.0.78";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.0.78';
41
+ const version = '4.0.79';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -47,6 +47,7 @@ interface Exchange {
47
47
  sapiGetMarginExchangeSmallLiability(params?: {}): Promise<implicitReturnType>;
48
48
  sapiGetMarginExchangeSmallLiabilityHistory(params?: {}): Promise<implicitReturnType>;
49
49
  sapiGetMarginNextHourlyInterestRate(params?: {}): Promise<implicitReturnType>;
50
+ sapiGetMarginDelistSchedule(params?: {}): Promise<implicitReturnType>;
50
51
  sapiGetLoanVipLoanableData(params?: {}): Promise<implicitReturnType>;
51
52
  sapiGetLoanVipCollateralData(params?: {}): Promise<implicitReturnType>;
52
53
  sapiGetLoanVipRequestData(params?: {}): Promise<implicitReturnType>;
@@ -98,7 +99,8 @@ interface Exchange {
98
99
  sapiGetSubAccountTransferSubUserHistory(params?: {}): Promise<implicitReturnType>;
99
100
  sapiGetSubAccountUniversalTransfer(params?: {}): Promise<implicitReturnType>;
100
101
  sapiGetSubAccountApiRestrictionsIpRestrictionThirdPartyList(params?: {}): Promise<implicitReturnType>;
101
- sapiGetSubAccountTransactionTatistics(params?: {}): Promise<implicitReturnType>;
102
+ sapiGetSubAccountTransactionStatistics(params?: {}): Promise<implicitReturnType>;
103
+ sapiGetSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
102
104
  sapiGetManagedSubaccountAsset(params?: {}): Promise<implicitReturnType>;
103
105
  sapiGetManagedSubaccountAccountSnapshot(params?: {}): Promise<implicitReturnType>;
104
106
  sapiGetManagedSubaccountQueryTransLogForInvestor(params?: {}): Promise<implicitReturnType>;
@@ -174,6 +176,9 @@ interface Exchange {
174
176
  sapiGetGiftcardVerify(params?: {}): Promise<implicitReturnType>;
175
177
  sapiGetGiftcardCryptographyRsaPublicKey(params?: {}): Promise<implicitReturnType>;
176
178
  sapiGetGiftcardBuyCodeTokenLimit(params?: {}): Promise<implicitReturnType>;
179
+ sapiGetAlgoSpotOpenOrders(params?: {}): Promise<implicitReturnType>;
180
+ sapiGetAlgoSpotHistoricalOrders(params?: {}): Promise<implicitReturnType>;
181
+ sapiGetAlgoSpotSubOrders(params?: {}): Promise<implicitReturnType>;
177
182
  sapiGetAlgoFuturesOpenOrders(params?: {}): Promise<implicitReturnType>;
178
183
  sapiGetAlgoFuturesHistoricalOrders(params?: {}): Promise<implicitReturnType>;
179
184
  sapiGetAlgoFuturesSubOrders(params?: {}): Promise<implicitReturnType>;
@@ -282,6 +287,7 @@ interface Exchange {
282
287
  sapiPostGiftcardCreateCode(params?: {}): Promise<implicitReturnType>;
283
288
  sapiPostGiftcardRedeemCode(params?: {}): Promise<implicitReturnType>;
284
289
  sapiPostGiftcardBuyCode(params?: {}): Promise<implicitReturnType>;
290
+ sapiPostAlgoSpotNewOrderTwap(params?: {}): Promise<implicitReturnType>;
285
291
  sapiPostAlgoFuturesNewOrderVp(params?: {}): Promise<implicitReturnType>;
286
292
  sapiPostAlgoFuturesNewOrderTwap(params?: {}): Promise<implicitReturnType>;
287
293
  sapiPostStakingPurchase(params?: {}): Promise<implicitReturnType>;
@@ -321,9 +327,12 @@ interface Exchange {
321
327
  sapiDeleteUserDataStreamIsolated(params?: {}): Promise<implicitReturnType>;
322
328
  sapiDeleteBrokerSubAccountApi(params?: {}): Promise<implicitReturnType>;
323
329
  sapiDeleteBrokerSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
330
+ sapiDeleteAlgoSpotOrder(params?: {}): Promise<implicitReturnType>;
324
331
  sapiDeleteAlgoFuturesOrder(params?: {}): Promise<implicitReturnType>;
332
+ sapiDeleteSubAccountSubAccountApiIpRestrictionIpList(params?: {}): Promise<implicitReturnType>;
325
333
  sapiV2GetSubAccountFuturesAccount(params?: {}): Promise<implicitReturnType>;
326
334
  sapiV2GetSubAccountFuturesPositionRisk(params?: {}): Promise<implicitReturnType>;
335
+ sapiV2PostSubAccountSubAccountApiIpRestriction(params?: {}): Promise<implicitReturnType>;
327
336
  sapiV3GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
328
337
  sapiV3PostAssetGetUserAsset(params?: {}): Promise<implicitReturnType>;
329
338
  sapiV4GetSubAccountAssets(params?: {}): Promise<implicitReturnType>;
@@ -518,10 +527,12 @@ interface Exchange {
518
527
  publicGetAggTrades(params?: {}): Promise<implicitReturnType>;
519
528
  publicGetHistoricalTrades(params?: {}): Promise<implicitReturnType>;
520
529
  publicGetKlines(params?: {}): Promise<implicitReturnType>;
530
+ publicGetUiKlines(params?: {}): Promise<implicitReturnType>;
521
531
  publicGetTicker24hr(params?: {}): Promise<implicitReturnType>;
522
532
  publicGetTickerPrice(params?: {}): Promise<implicitReturnType>;
523
533
  publicGetTickerBookTicker(params?: {}): Promise<implicitReturnType>;
524
534
  publicGetExchangeInfo(params?: {}): Promise<implicitReturnType>;
535
+ publicGetAvgPrice(params?: {}): Promise<implicitReturnType>;
525
536
  publicPutUserDataStream(params?: {}): Promise<implicitReturnType>;
526
537
  publicPostUserDataStream(params?: {}): Promise<implicitReturnType>;
527
538
  publicDeleteUserDataStream(params?: {}): Promise<implicitReturnType>;