ccxt 4.0.90 → 4.0.93

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.
Files changed (41) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +928 -254
  3. package/dist/ccxt.browser.min.js +2 -2
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/binance.js +8 -3
  6. package/dist/cjs/src/bybit.js +1 -1
  7. package/dist/cjs/src/cryptocom.js +1 -1
  8. package/dist/cjs/src/delta.js +1 -1
  9. package/dist/cjs/src/gate.js +2 -1
  10. package/dist/cjs/src/huobi.js +1 -1
  11. package/dist/cjs/src/mexc.js +3 -1
  12. package/dist/cjs/src/okx.js +1 -1
  13. package/dist/cjs/src/pro/hitbtc.js +893 -235
  14. package/dist/cjs/src/pro/krakenfutures.js +4 -2
  15. package/dist/cjs/src/pro/okx.js +6 -5
  16. package/dist/cjs/src/pro/poloniexfutures.js +2 -1
  17. package/dist/cjs/src/pro/probit.js +4 -2
  18. package/js/ccxt.d.ts +3 -3
  19. package/js/ccxt.js +1 -1
  20. package/js/src/abstract/binance.d.ts +6 -1
  21. package/js/src/abstract/binancecoinm.d.ts +6 -1
  22. package/js/src/abstract/binanceus.d.ts +6 -1
  23. package/js/src/abstract/binanceusdm.d.ts +6 -1
  24. package/js/src/abstract/gate.d.ts +1 -0
  25. package/js/src/abstract/gateio.d.ts +1 -0
  26. package/js/src/base/Exchange.d.ts +1 -1
  27. package/js/src/binance.js +8 -3
  28. package/js/src/bybit.js +1 -1
  29. package/js/src/cryptocom.js +1 -1
  30. package/js/src/delta.js +1 -1
  31. package/js/src/gate.js +2 -1
  32. package/js/src/huobi.js +1 -1
  33. package/js/src/mexc.js +3 -1
  34. package/js/src/okx.js +1 -1
  35. package/js/src/pro/hitbtc.d.ts +19 -4
  36. package/js/src/pro/hitbtc.js +894 -236
  37. package/js/src/pro/krakenfutures.js +4 -2
  38. package/js/src/pro/okx.js +6 -5
  39. package/js/src/pro/poloniexfutures.js +2 -1
  40. package/js/src/pro/probit.js +4 -2
  41. package/package.json +1 -1
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.90';
183
+ const version = '4.0.93';
184
184
  Exchange["default"].ccxtVersion = version;
185
185
  const exchanges = {
186
186
  'ace': ace,
@@ -625,6 +625,7 @@ class binance extends binance$1 {
625
625
  'continuousKlines': { 'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]] },
626
626
  'indexPriceKlines': { 'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]] },
627
627
  'markPriceKlines': { 'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]] },
628
+ 'premiumIndexKlines': { 'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]] },
628
629
  'ticker/24hr': { 'cost': 1, 'noSymbol': 40 },
629
630
  'ticker/price': { 'cost': 1, 'noSymbol': 2 },
630
631
  'ticker/bookTicker': { 'cost': 1, 'noSymbol': 2 },
@@ -644,6 +645,7 @@ class binance extends binance$1 {
644
645
  'dapiPrivate': {
645
646
  'get': {
646
647
  'positionSide/dual': 30,
648
+ 'orderAmendment': 1,
647
649
  'order': 1,
648
650
  'openOrder': 1,
649
651
  'openOrders': { 'cost': 1, 'noSymbol': 5 },
@@ -657,8 +659,11 @@ class binance extends binance$1 {
657
659
  'leverageBracket': 1,
658
660
  'forceOrders': { 'cost': 20, 'noSymbol': 50 },
659
661
  'adlQuantile': 5,
660
- 'orderAmendment': 1,
661
- 'pmAccountInfo': 5,
662
+ 'commissionRate': 20,
663
+ 'income/asyn': 5,
664
+ 'income/asyn/id': 5,
665
+ 'pmExchangeInfo': 0.5,
666
+ 'pmAccountInfo': 0.5, // Weight(IP): 5 => cost = 0.1 * 5 = 0.5
662
667
  },
663
668
  'post': {
664
669
  'positionSide/dual': 1,
@@ -7750,7 +7755,7 @@ class binance extends binance$1 {
7750
7755
  * @param {int} [since] timestamp in ms
7751
7756
  * @param {int} [limit] number of records, default 100, max 100
7752
7757
  * @param {object} [params] exchange specific params
7753
- * @returns {object[]} a list of [settlement history objects]
7758
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
7754
7759
  */
7755
7760
  await this.loadMarkets();
7756
7761
  const market = (symbol === undefined) ? undefined : this.market(symbol);
@@ -8960,7 +8960,7 @@ class bybit extends bybit$1 {
8960
8960
  * @param {int} [since] timestamp in ms
8961
8961
  * @param {int} [limit] number of records
8962
8962
  * @param {object} [params] exchange specific params
8963
- * @returns {object[]} a list of [settlement history objects]
8963
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
8964
8964
  */
8965
8965
  await this.loadMarkets();
8966
8966
  const request = {};
@@ -2675,7 +2675,7 @@ class cryptocom extends cryptocom$1 {
2675
2675
  * @param {int} [limit] number of records
2676
2676
  * @param {object} [params] exchange specific params
2677
2677
  * @param {int} [params.type] 'future', 'option'
2678
- * @returns {object[]} a list of [settlement history objects]
2678
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
2679
2679
  */
2680
2680
  await this.loadMarkets();
2681
2681
  let market = undefined;
@@ -2871,7 +2871,7 @@ class delta extends delta$1 {
2871
2871
  * @param {int} [since] timestamp in ms
2872
2872
  * @param {int} [limit] number of records
2873
2873
  * @param {object} [params] exchange specific params
2874
- * @returns {object[]} a list of [settlement history objects]
2874
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
2875
2875
  */
2876
2876
  await this.loadMarkets();
2877
2877
  let market = undefined;
@@ -293,6 +293,7 @@ class gate extends gate$1 {
293
293
  'spot/orders/{order_id}': 1.5,
294
294
  },
295
295
  'post': {
296
+ 'account_mode': 1.5,
296
297
  'loans': 1.5,
297
298
  'spot/orders': 1.5,
298
299
  },
@@ -5803,7 +5804,7 @@ class gate extends gate$1 {
5803
5804
  * @param {int} [since] timestamp in ms
5804
5805
  * @param {int} [limit] number of records
5805
5806
  * @param {object} [params] exchange specific params
5806
- * @returns {object[]} a list of [settlement history objects]
5807
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
5807
5808
  */
5808
5809
  this.checkRequiredSymbol('fetchSettlementHistory', symbol);
5809
5810
  await this.loadMarkets();
@@ -7856,7 +7856,7 @@ class huobi extends huobi$1 {
7856
7856
  * @param {int} [params.until] timestamp in ms, value range = start_time -> current time,default = current time
7857
7857
  * @param {int} [params.page_index] page index, default page 1 if not filled
7858
7858
  * @param {int} [params.code] unified currency code, can be used when symbol is undefined
7859
- * @returns A list of settlement history objects
7859
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
7860
7860
  */
7861
7861
  const code = this.safeString(params, 'code');
7862
7862
  const until = this.safeInteger2(params, 'until', 'till');
@@ -833,7 +833,9 @@ class mexc extends mexc$1 {
833
833
  //
834
834
  // {}
835
835
  //
836
- status = Object.keys(response).length ? this.json(response) : 'ok';
836
+ const keys = Object.keys(response);
837
+ const length = keys.length;
838
+ status = length ? this.json(response) : 'ok';
837
839
  }
838
840
  else if (marketType === 'swap') {
839
841
  response = await this.contractPublicGetPing(query);
@@ -6612,7 +6612,7 @@ class okx extends okx$1 {
6612
6612
  * @param {int} [since] timestamp in ms
6613
6613
  * @param {int} [limit] number of records
6614
6614
  * @param {object} [params] exchange specific params
6615
- * @returns {object[]} a list of [settlement history objects]
6615
+ * @returns {object[]} a list of [settlement history objects]{@link https://github.com/ccxt/ccxt/wiki/Manual#settlement-history-structure}
6616
6616
  */
6617
6617
  this.checkRequiredSymbol('fetchSettlementHistory', symbol);
6618
6618
  await this.loadMarkets();