ccxt 4.3.85 → 4.3.86

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 (44) hide show
  1. package/README.md +7 -5
  2. package/dist/ccxt.browser.min.js +15 -15
  3. package/dist/cjs/ccxt.js +6 -1
  4. package/dist/cjs/src/abstract/hashkey.js +9 -0
  5. package/dist/cjs/src/base/Exchange.js +1 -1
  6. package/dist/cjs/src/binance.js +4 -2
  7. package/dist/cjs/src/bitfinex.js +2 -2
  8. package/dist/cjs/src/hashkey.js +4328 -0
  9. package/dist/cjs/src/hyperliquid.js +85 -65
  10. package/dist/cjs/src/indodax.js +37 -9
  11. package/dist/cjs/src/krakenfutures.js +12 -10
  12. package/dist/cjs/src/pro/ascendex.js +45 -5
  13. package/dist/cjs/src/pro/bingx.js +13 -12
  14. package/dist/cjs/src/pro/hashkey.js +839 -0
  15. package/dist/cjs/src/pro/hyperliquid.js +123 -0
  16. package/dist/cjs/src/pro/mexc.js +13 -7
  17. package/dist/cjs/src/pro/woo.js +1 -0
  18. package/dist/cjs/src/pro/woofipro.js +1 -0
  19. package/dist/cjs/src/pro/xt.js +1 -0
  20. package/js/ccxt.d.ts +8 -2
  21. package/js/ccxt.js +6 -2
  22. package/js/src/abstract/hashkey.d.ts +70 -0
  23. package/js/src/abstract/hashkey.js +11 -0
  24. package/js/src/base/Exchange.js +1 -1
  25. package/js/src/binance.js +4 -2
  26. package/js/src/bitfinex.js +2 -2
  27. package/js/src/hashkey.d.ts +178 -0
  28. package/js/src/hashkey.js +4329 -0
  29. package/js/src/hyperliquid.d.ts +3 -0
  30. package/js/src/hyperliquid.js +85 -65
  31. package/js/src/indodax.js +37 -9
  32. package/js/src/krakenfutures.js +12 -10
  33. package/js/src/pro/ascendex.d.ts +2 -0
  34. package/js/src/pro/ascendex.js +45 -5
  35. package/js/src/pro/bingx.js +13 -12
  36. package/js/src/pro/hashkey.d.ts +34 -0
  37. package/js/src/pro/hashkey.js +840 -0
  38. package/js/src/pro/hyperliquid.d.ts +7 -1
  39. package/js/src/pro/hyperliquid.js +123 -0
  40. package/js/src/pro/mexc.js +13 -7
  41. package/js/src/pro/woo.js +1 -0
  42. package/js/src/pro/woofipro.js +1 -0
  43. package/js/src/pro/xt.js +1 -0
  44. package/package.json +1 -1
package/dist/cjs/ccxt.js CHANGED
@@ -72,6 +72,7 @@ var fmfwio = require('./src/fmfwio.js');
72
72
  var gate = require('./src/gate.js');
73
73
  var gateio = require('./src/gateio.js');
74
74
  var gemini = require('./src/gemini.js');
75
+ var hashkey = require('./src/hashkey.js');
75
76
  var hitbtc = require('./src/hitbtc.js');
76
77
  var hitbtc3 = require('./src/hitbtc3.js');
77
78
  var hollaex = require('./src/hollaex.js');
@@ -158,6 +159,7 @@ var exmo$1 = require('./src/pro/exmo.js');
158
159
  var gate$1 = require('./src/pro/gate.js');
159
160
  var gateio$1 = require('./src/pro/gateio.js');
160
161
  var gemini$1 = require('./src/pro/gemini.js');
162
+ var hashkey$1 = require('./src/pro/hashkey.js');
161
163
  var hitbtc$1 = require('./src/pro/hitbtc.js');
162
164
  var hollaex$1 = require('./src/pro/hollaex.js');
163
165
  var htx$1 = require('./src/pro/htx.js');
@@ -194,7 +196,7 @@ var xt$1 = require('./src/pro/xt.js');
194
196
 
195
197
  //-----------------------------------------------------------------------------
196
198
  // this is updated by vss.js when building
197
- const version = '4.3.85';
199
+ const version = '4.3.86';
198
200
  Exchange["default"].ccxtVersion = version;
199
201
  const exchanges = {
200
202
  'ace': ace,
@@ -257,6 +259,7 @@ const exchanges = {
257
259
  'gate': gate,
258
260
  'gateio': gateio,
259
261
  'gemini': gemini,
262
+ 'hashkey': hashkey,
260
263
  'hitbtc': hitbtc,
261
264
  'hitbtc3': hitbtc3,
262
265
  'hollaex': hollaex,
@@ -345,6 +348,7 @@ const pro = {
345
348
  'gate': gate$1,
346
349
  'gateio': gateio$1,
347
350
  'gemini': gemini$1,
351
+ 'hashkey': hashkey$1,
348
352
  'hitbtc': hitbtc$1,
349
353
  'hollaex': hollaex$1,
350
354
  'htx': htx$1,
@@ -488,6 +492,7 @@ exports.fmfwio = fmfwio;
488
492
  exports.gate = gate;
489
493
  exports.gateio = gateio;
490
494
  exports.gemini = gemini;
495
+ exports.hashkey = hashkey;
491
496
  exports.hitbtc = hitbtc;
492
497
  exports.hitbtc3 = hitbtc3;
493
498
  exports.hollaex = hollaex;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var Exchange$1 = require('../base/Exchange.js');
4
+
5
+ // -------------------------------------------------------------------------------
6
+ class Exchange extends Exchange$1["default"] {
7
+ }
8
+
9
+ module.exports = Exchange;
@@ -6104,7 +6104,7 @@ class Exchange {
6104
6104
  if (method === 'fetchAccounts') {
6105
6105
  response = await this[method](params);
6106
6106
  }
6107
- else if (method === 'getLeverageTiersPaginated') {
6107
+ else if (method === 'getLeverageTiersPaginated' || method === 'fetchPositions') {
6108
6108
  response = await this[method](symbol, params);
6109
6109
  }
6110
6110
  else {
@@ -3852,12 +3852,14 @@ class binance extends binance$1 {
3852
3852
  const marketId = this.safeString(ticker, 'symbol');
3853
3853
  const symbol = this.safeSymbol(marketId, market, undefined, marketType);
3854
3854
  const last = this.safeString(ticker, 'lastPrice');
3855
+ const wAvg = this.safeString(ticker, 'weightedAvgPrice');
3855
3856
  const isCoinm = ('baseVolume' in ticker);
3856
3857
  let baseVolume = undefined;
3857
3858
  let quoteVolume = undefined;
3858
3859
  if (isCoinm) {
3859
3860
  baseVolume = this.safeString(ticker, 'baseVolume');
3860
- quoteVolume = this.safeString(ticker, 'volume');
3861
+ // 'volume' field in inverse markets is not quoteVolume, but traded amount (per contracts)
3862
+ quoteVolume = Precise["default"].stringMul(baseVolume, wAvg);
3861
3863
  }
3862
3864
  else {
3863
3865
  baseVolume = this.safeString(ticker, 'volume');
@@ -3873,7 +3875,7 @@ class binance extends binance$1 {
3873
3875
  'bidVolume': this.safeString(ticker, 'bidQty'),
3874
3876
  'ask': this.safeString(ticker, 'askPrice'),
3875
3877
  'askVolume': this.safeString(ticker, 'askQty'),
3876
- 'vwap': this.safeString(ticker, 'weightedAvgPrice'),
3878
+ 'vwap': wAvg,
3877
3879
  'open': this.safeString2(ticker, 'openPrice', 'open'),
3878
3880
  'close': last,
3879
3881
  'last': last,
@@ -851,7 +851,7 @@ class bitfinex extends bitfinex$1 {
851
851
  * @method
852
852
  * @name bitfinex#fetchTickers
853
853
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
854
- * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
854
+ * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
855
855
  * @param {object} [params] extra parameters specific to the exchange API endpoint
856
856
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
857
857
  */
@@ -860,7 +860,7 @@ class bitfinex extends bitfinex$1 {
860
860
  const response = await this.publicGetTickers(params);
861
861
  const result = {};
862
862
  for (let i = 0; i < response.length; i++) {
863
- const ticker = this.parseTicker({ 'result': response[i] });
863
+ const ticker = this.parseTicker(response[i]);
864
864
  const symbol = ticker['symbol'];
865
865
  result[symbol] = ticker;
866
866
  }