ccxt 4.1.47 → 4.1.49

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 (114) hide show
  1. package/README.md +124 -124
  2. package/dist/ccxt.browser.js +670 -460
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +6 -1
  5. package/dist/cjs/src/abstract/htx.js +9 -0
  6. package/dist/cjs/src/binance.js +2 -0
  7. package/dist/cjs/src/bitmart.js +183 -62
  8. package/dist/cjs/src/coinex.js +67 -18
  9. package/dist/cjs/src/htx.js +8505 -0
  10. package/dist/cjs/src/huobi.js +5 -8503
  11. package/dist/cjs/src/kraken.js +0 -4
  12. package/dist/cjs/src/mexc.js +21 -21
  13. package/dist/cjs/src/pro/htx.js +2356 -0
  14. package/dist/cjs/src/pro/huobi.js +5 -2345
  15. package/dist/cjs/src/timex.js +1 -1
  16. package/js/ccxt.d.ts +8 -2
  17. package/js/ccxt.js +6 -2
  18. package/js/src/abstract/binance.d.ts +2 -0
  19. package/js/src/abstract/binancecoinm.d.ts +2 -0
  20. package/js/src/abstract/binanceus.d.ts +2 -0
  21. package/js/src/abstract/binanceusdm.d.ts +2 -0
  22. package/js/src/abstract/htx.d.ts +544 -0
  23. package/js/src/abstract/htx.js +11 -0
  24. package/js/src/abstract/huobi.d.ts +4 -4
  25. package/js/src/abstract/huobi.js +3 -3
  26. package/js/src/ace.d.ts +2 -2
  27. package/js/src/ascendex.d.ts +2 -2
  28. package/js/src/base/Exchange.d.ts +2 -2
  29. package/js/src/base/types.d.ts +0 -1
  30. package/js/src/bigone.d.ts +2 -2
  31. package/js/src/binance.d.ts +3 -56
  32. package/js/src/binance.js +2 -0
  33. package/js/src/bingx.d.ts +3 -55
  34. package/js/src/bitbns.d.ts +2 -2
  35. package/js/src/bitfinex.d.ts +2 -2
  36. package/js/src/bitfinex2.d.ts +2 -2
  37. package/js/src/bitget.d.ts +3 -53
  38. package/js/src/bithumb.d.ts +2 -2
  39. package/js/src/bitmart.d.ts +4 -2
  40. package/js/src/bitmart.js +183 -62
  41. package/js/src/bitmex.d.ts +2 -2
  42. package/js/src/bitopro.d.ts +2 -2
  43. package/js/src/bitpanda.d.ts +2 -2
  44. package/js/src/bitrue.d.ts +2 -2
  45. package/js/src/bitstamp.d.ts +2 -2
  46. package/js/src/bittrex.d.ts +2 -2
  47. package/js/src/bitvavo.d.ts +2 -2
  48. package/js/src/blockchaincom.d.ts +2 -2
  49. package/js/src/btcalpha.d.ts +2 -2
  50. package/js/src/btcturk.d.ts +2 -2
  51. package/js/src/bybit.d.ts +2 -2
  52. package/js/src/cex.d.ts +2 -2
  53. package/js/src/coinbase.d.ts +2 -2
  54. package/js/src/coinbasepro.d.ts +2 -2
  55. package/js/src/coinex.d.ts +2 -2
  56. package/js/src/coinex.js +67 -18
  57. package/js/src/coinfalcon.d.ts +2 -2
  58. package/js/src/coinlist.d.ts +2 -2
  59. package/js/src/coinone.d.ts +2 -2
  60. package/js/src/coinsph.d.ts +2 -2
  61. package/js/src/coinspot.d.ts +2 -2
  62. package/js/src/cryptocom.d.ts +2 -2
  63. package/js/src/currencycom.d.ts +2 -2
  64. package/js/src/delta.d.ts +2 -2
  65. package/js/src/deribit.d.ts +2 -2
  66. package/js/src/digifinex.d.ts +2 -2
  67. package/js/src/exmo.d.ts +2 -2
  68. package/js/src/gate.d.ts +2 -2
  69. package/js/src/gemini.d.ts +3 -51
  70. package/js/src/hitbtc.d.ts +2 -2
  71. package/js/src/hollaex.d.ts +2 -2
  72. package/js/src/htx.d.ts +257 -0
  73. package/js/src/htx.js +8506 -0
  74. package/js/src/huobi.d.ts +2 -255
  75. package/js/src/huobi.js +5 -8503
  76. package/js/src/huobijp.d.ts +2 -2
  77. package/js/src/idex.d.ts +2 -2
  78. package/js/src/indodax.d.ts +2 -2
  79. package/js/src/kraken.d.ts +2 -2
  80. package/js/src/kraken.js +0 -4
  81. package/js/src/krakenfutures.d.ts +2 -2
  82. package/js/src/kucoin.d.ts +2 -2
  83. package/js/src/kuna.d.ts +2 -2
  84. package/js/src/latoken.d.ts +2 -2
  85. package/js/src/lbank.d.ts +2 -2
  86. package/js/src/lbank2.d.ts +2 -2
  87. package/js/src/luno.d.ts +2 -2
  88. package/js/src/lykke.d.ts +2 -2
  89. package/js/src/mexc.d.ts +2 -2
  90. package/js/src/mexc.js +21 -21
  91. package/js/src/novadax.d.ts +2 -2
  92. package/js/src/oceanex.d.ts +2 -2
  93. package/js/src/okcoin.d.ts +3 -3
  94. package/js/src/okx.d.ts +3 -3
  95. package/js/src/phemex.d.ts +2 -2
  96. package/js/src/poloniex.d.ts +2 -2
  97. package/js/src/poloniexfutures.d.ts +2 -2
  98. package/js/src/pro/htx.d.ts +45 -0
  99. package/js/src/pro/htx.js +2357 -0
  100. package/js/src/pro/huobi.d.ts +2 -43
  101. package/js/src/pro/huobi.js +5 -2345
  102. package/js/src/probit.d.ts +2 -2
  103. package/js/src/tidex.d.ts +2 -2
  104. package/js/src/timex.d.ts +3 -53
  105. package/js/src/timex.js +1 -1
  106. package/js/src/tokocrypto.d.ts +2 -2
  107. package/js/src/upbit.d.ts +2 -2
  108. package/js/src/wavesexchange.d.ts +2 -2
  109. package/js/src/wazirx.d.ts +2 -2
  110. package/js/src/whitebit.d.ts +2 -2
  111. package/js/src/yobit.d.ts +2 -2
  112. package/js/src/zonda.d.ts +2 -2
  113. package/package.json +1 -1
  114. package/skip-tests.json +4 -4
package/js/src/bitmart.js CHANGED
@@ -578,6 +578,7 @@ export default class bitmart extends Exchange {
578
578
  'swap': 'swap',
579
579
  },
580
580
  'createMarketBuyOrderRequiresPrice': true,
581
+ 'brokerId': 'CCXTxBitmart000',
581
582
  },
582
583
  });
583
584
  }
@@ -1984,6 +1985,12 @@ export default class bitmart extends Exchange {
1984
1985
  // "order_id": 2707217580
1985
1986
  // }
1986
1987
  //
1988
+ // swap
1989
+ // "data": {
1990
+ // "order_id": 231116359426639,
1991
+ // "price": "market price"
1992
+ // },
1993
+ //
1987
1994
  // cancelOrder
1988
1995
  //
1989
1996
  // "2707217580" // order id
@@ -2066,6 +2073,10 @@ export default class bitmart extends Exchange {
2066
2073
  type = 'limit';
2067
2074
  timeInForce = 'IOC';
2068
2075
  }
2076
+ let priceString = this.safeString(order, 'price');
2077
+ if (priceString === 'market price') {
2078
+ priceString = undefined;
2079
+ }
2069
2080
  return this.safeOrder({
2070
2081
  'id': id,
2071
2082
  'clientOrderId': this.safeString(order, 'client_order_id'),
@@ -2078,7 +2089,7 @@ export default class bitmart extends Exchange {
2078
2089
  'timeInForce': timeInForce,
2079
2090
  'postOnly': postOnly,
2080
2091
  'side': this.parseOrderSide(this.safeString(order, 'side')),
2081
- 'price': this.omitZero(this.safeString(order, 'price')),
2092
+ 'price': this.omitZero(priceString),
2082
2093
  'stopPrice': undefined,
2083
2094
  'triggerPrice': undefined,
2084
2095
  'amount': this.omitZero(this.safeString(order, 'size')),
@@ -2132,6 +2143,7 @@ export default class bitmart extends Exchange {
2132
2143
  * @description create a trade order
2133
2144
  * @see https://developer-pro.bitmart.com/en/spot/#place-spot-order
2134
2145
  * @see https://developer-pro.bitmart.com/en/spot/#place-margin-order
2146
+ * @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
2135
2147
  * @param {string} symbol unified symbol of the market to create an order in
2136
2148
  * @param {string} type 'market' or 'limit'
2137
2149
  * @param {string} side 'buy' or 'sell'
@@ -2139,11 +2151,153 @@ export default class bitmart extends Exchange {
2139
2151
  * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2140
2152
  * @param {object} [params] extra parameters specific to the bitmart api endpoint
2141
2153
  * @param {string} [params.marginMode] 'cross' or 'isolated'
2154
+ * @param {string} [params.leverage] *swap only* leverage level
2155
+ * @param {string} [params.clientOrderId] client order id of the order
2156
+ * @param {boolean} [params.reduceOnly] *swap only* reduce only
2157
+ * @param {boolean} [params.postOnly] make sure the order is posted to the order book and not matched immediately
2142
2158
  * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2143
2159
  */
2144
2160
  await this.loadMarkets();
2145
2161
  const market = this.market(symbol);
2146
- const request = {};
2162
+ const result = this.handleMarginModeAndParams('createOrder', params);
2163
+ const marginMode = this.safeString(result, 0);
2164
+ let response = undefined;
2165
+ if (market['spot']) {
2166
+ const spotRequest = this.createSpotOrderRequest(symbol, type, side, amount, price, params);
2167
+ if (marginMode === 'isolated') {
2168
+ response = await this.privatePostSpotV1MarginSubmitOrder(spotRequest);
2169
+ }
2170
+ else {
2171
+ response = await this.privatePostSpotV2SubmitOrder(spotRequest);
2172
+ }
2173
+ }
2174
+ else {
2175
+ const swapRequest = this.createSwapOrderRequest(symbol, type, side, amount, price, params);
2176
+ response = await this.privatePostContractPrivateSubmitOrder(swapRequest);
2177
+ }
2178
+ //
2179
+ // spot and margin
2180
+ //
2181
+ // {
2182
+ // "code": 1000,
2183
+ // "trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
2184
+ // "message": "OK",
2185
+ // "data": {
2186
+ // "order_id": 2707217580
2187
+ // }
2188
+ // }
2189
+ //
2190
+ // swap
2191
+ // {"code":1000,"message":"Ok","data":{"order_id":231116359426639,"price":"market price"},"trace":"7f9c94e10f9d4513bc08a7bfc2a5559a.62.16996369620521911"}
2192
+ //
2193
+ const data = this.safeValue(response, 'data', {});
2194
+ const order = this.parseOrder(data, market);
2195
+ order['type'] = type;
2196
+ order['side'] = side;
2197
+ order['amount'] = amount;
2198
+ order['price'] = price;
2199
+ return order;
2200
+ }
2201
+ createSwapOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
2202
+ /**
2203
+ * @method
2204
+ * @name bitmart#createSwapOrderRequest
2205
+ * @description create a trade order
2206
+ * @see https://developer-pro.bitmart.com/en/futures/#submit-order-signed
2207
+ * @param {string} symbol unified symbol of the market to create an order in
2208
+ * @param {string} type 'market' or 'limit'
2209
+ * @param {string} side 'buy' or 'sell'
2210
+ * @param {float} amount how much of currency you want to trade in units of base currency
2211
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2212
+ * @param {object} [params] extra parameters specific to the bitmart api endpoint
2213
+ * @param {int} [params.leverage] leverage level
2214
+ * @param {boolean} [params.reduceOnly] *swap only* reduce only
2215
+ * @param {string} [params.marginMode] 'cross' or 'isolated', default is 'cross'
2216
+ * @param {string} [params.clientOrderId] client order id of the order
2217
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2218
+ */
2219
+ const market = this.market(symbol);
2220
+ const request = {
2221
+ 'symbol': market['id'],
2222
+ 'type': type,
2223
+ 'size': parseInt(this.amountToPrecision(symbol, amount)),
2224
+ };
2225
+ const timeInForce = this.safeString(params, 'timeInForce');
2226
+ const mode = this.safeInteger(params, 'mode'); // only for swap
2227
+ const isMarketOrder = type === 'market';
2228
+ let postOnly = undefined;
2229
+ const reduceOnly = this.safeValue(params, 'reduceOnly');
2230
+ const isExchangeSpecificPo = (mode === 4);
2231
+ [postOnly, params] = this.handlePostOnly(isMarketOrder, isExchangeSpecificPo, params);
2232
+ params = this.omit(params, ['timeInForce', 'postOnly', 'reduceOnly']);
2233
+ const ioc = ((timeInForce === 'IOC') || (mode === 3));
2234
+ const isLimitOrder = (type === 'limit') || postOnly || ioc;
2235
+ if (timeInForce === 'GTC') {
2236
+ request['mode'] = 1;
2237
+ }
2238
+ else if (timeInForce === 'FOK') {
2239
+ request['mode'] = 2;
2240
+ }
2241
+ else if (timeInForce === 'IOC') {
2242
+ request['mode'] = 3;
2243
+ }
2244
+ if (postOnly) {
2245
+ request['mode'] = 4;
2246
+ }
2247
+ if (isLimitOrder) {
2248
+ request['price'] = this.priceToPrecision(symbol, price);
2249
+ }
2250
+ if (side === 'buy') {
2251
+ if (reduceOnly) {
2252
+ request['side'] = 2; // sell close long
2253
+ }
2254
+ else {
2255
+ request['side'] = 1; // buy open long
2256
+ }
2257
+ }
2258
+ else if (side === 'sell') {
2259
+ if (reduceOnly) {
2260
+ request['side'] = 3; // sell close long
2261
+ }
2262
+ else {
2263
+ request['side'] = 4; // sell open short
2264
+ }
2265
+ }
2266
+ let marginMode = undefined;
2267
+ [marginMode, params] = this.handleMarginModeAndParams('createOrder', params, 'cross');
2268
+ request['open_type'] = marginMode;
2269
+ const clientOrderId = this.safeString(params, 'clientOrderId');
2270
+ if (clientOrderId !== undefined) {
2271
+ params = this.omit(params, 'clientOrderId');
2272
+ request['client_order_id'] = clientOrderId;
2273
+ }
2274
+ const leverage = this.safeInteger(params, 'leverage', 1);
2275
+ params = this.omit(params, 'leverage');
2276
+ request['leverage'] = this.numberToString(leverage);
2277
+ return this.extend(request, params);
2278
+ }
2279
+ createSpotOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
2280
+ /**
2281
+ * @method
2282
+ * @name bitmart#createSpotOrderRequest
2283
+ * @description create a spot order request
2284
+ * @see https://developer-pro.bitmart.com/en/spot/#place-spot-order
2285
+ * @see https://developer-pro.bitmart.com/en/spot/#place-margin-order
2286
+ * @param {string} symbol unified symbol of the market to create an order in
2287
+ * @param {string} type 'market' or 'limit'
2288
+ * @param {string} side 'buy' or 'sell'
2289
+ * @param {float} amount how much of currency you want to trade in units of base currency
2290
+ * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2291
+ * @param {object} [params] extra parameters specific to the bitmart api endpoint
2292
+ * @param {string} [params.marginMode] 'cross' or 'isolated'
2293
+ * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
2294
+ */
2295
+ const market = this.market(symbol);
2296
+ const request = {
2297
+ 'symbol': market['id'],
2298
+ 'side': side,
2299
+ 'type': type,
2300
+ };
2147
2301
  const timeInForce = this.safeString(params, 'timeInForce');
2148
2302
  if (timeInForce === 'FOK') {
2149
2303
  throw new InvalidOrder(this.id + ' createOrder() only accepts timeInForce parameter values of IOC or PO');
@@ -2156,45 +2310,36 @@ export default class bitmart extends Exchange {
2156
2310
  params = this.omit(params, ['timeInForce', 'postOnly']);
2157
2311
  const ioc = ((timeInForce === 'IOC') || (type === 'ioc'));
2158
2312
  const isLimitOrder = (type === 'limit') || postOnly || ioc;
2159
- let method = undefined;
2160
- if (market['spot']) {
2161
- request['symbol'] = market['id'];
2162
- request['side'] = side;
2163
- request['type'] = type;
2164
- method = 'privatePostSpotV2SubmitOrder';
2165
- if (isLimitOrder) {
2166
- request['size'] = this.amountToPrecision(symbol, amount);
2167
- request['price'] = this.priceToPrecision(symbol, price);
2168
- }
2169
- else if (isMarketOrder) {
2170
- // for market buy it requires the amount of quote currency to spend
2171
- if (side === 'buy') {
2172
- let notional = this.safeNumber(params, 'notional');
2173
- const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
2174
- if (createMarketBuyOrderRequiresPrice) {
2175
- if (price !== undefined) {
2176
- if (notional === undefined) {
2177
- const amountString = this.numberToString(amount);
2178
- const priceString = this.numberToString(price);
2179
- notional = this.parseNumber(Precise.stringMul(amountString, priceString));
2180
- }
2181
- }
2182
- else if (notional === undefined) {
2183
- throw new InvalidOrder(this.id + " createOrder () requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false and supply the total cost value in the 'amount' argument or in the 'notional' extra parameter (the exchange-specific behaviour)");
2313
+ // method = 'privatePostSpotV2SubmitOrder';
2314
+ if (isLimitOrder) {
2315
+ request['size'] = this.amountToPrecision(symbol, amount);
2316
+ request['price'] = this.priceToPrecision(symbol, price);
2317
+ }
2318
+ else if (isMarketOrder) {
2319
+ // for market buy it requires the amount of quote currency to spend
2320
+ if (side === 'buy') {
2321
+ let notional = this.safeNumber(params, 'notional');
2322
+ const createMarketBuyOrderRequiresPrice = this.safeValue(this.options, 'createMarketBuyOrderRequiresPrice', true);
2323
+ if (createMarketBuyOrderRequiresPrice) {
2324
+ if (price !== undefined) {
2325
+ if (notional === undefined) {
2326
+ const amountString = this.numberToString(amount);
2327
+ const priceString = this.numberToString(price);
2328
+ notional = this.parseNumber(Precise.stringMul(amountString, priceString));
2184
2329
  }
2185
2330
  }
2186
- else {
2187
- notional = (notional === undefined) ? amount : notional;
2331
+ else if (notional === undefined) {
2332
+ throw new InvalidOrder(this.id + " createOrder () requires the price argument with market buy orders to calculate total order cost (amount to spend), where cost = amount * price. Supply a price argument to createOrder() call if you want the cost to be calculated for you from price and amount, or, alternatively, add .options['createMarketBuyOrderRequiresPrice'] = false and supply the total cost value in the 'amount' argument or in the 'notional' extra parameter (the exchange-specific behaviour)");
2188
2333
  }
2189
- request['notional'] = this.decimalToPrecision(notional, TRUNCATE, market['precision']['price'], this.precisionMode);
2190
2334
  }
2191
- else if (side === 'sell') {
2192
- request['size'] = this.amountToPrecision(symbol, amount);
2335
+ else {
2336
+ notional = (notional === undefined) ? amount : notional;
2193
2337
  }
2338
+ request['notional'] = this.decimalToPrecision(notional, TRUNCATE, market['precision']['price'], this.precisionMode);
2339
+ }
2340
+ else if (side === 'sell') {
2341
+ request['size'] = this.amountToPrecision(symbol, amount);
2194
2342
  }
2195
- }
2196
- else if (market['swap']) {
2197
- throw new NotSupported(this.id + ' createOrder() does not accept swap orders, only spot orders are allowed');
2198
2343
  }
2199
2344
  if (postOnly) {
2200
2345
  request['type'] = 'limit_maker';
@@ -2202,33 +2347,7 @@ export default class bitmart extends Exchange {
2202
2347
  if (ioc) {
2203
2348
  request['type'] = 'ioc';
2204
2349
  }
2205
- const [marginMode, query] = this.handleMarginModeAndParams('createOrder', params);
2206
- if (marginMode !== undefined) {
2207
- if (marginMode !== 'isolated') {
2208
- throw new NotSupported(this.id + ' only isolated margin is supported');
2209
- }
2210
- method = 'privatePostSpotV1MarginSubmitOrder';
2211
- }
2212
- const response = await this[method](this.extend(request, query));
2213
- //
2214
- // spot and margin
2215
- //
2216
- // {
2217
- // "code": 1000,
2218
- // "trace":"886fb6ae-456b-4654-b4e0-d681ac05cea1",
2219
- // "message": "OK",
2220
- // "data": {
2221
- // "order_id": 2707217580
2222
- // }
2223
- // }
2224
- //
2225
- const data = this.safeValue(response, 'data', {});
2226
- const order = this.parseOrder(data, market);
2227
- order['type'] = type;
2228
- order['side'] = side;
2229
- order['amount'] = amount;
2230
- order['price'] = price;
2231
- return order;
2350
+ return this.extend(request, params);
2232
2351
  }
2233
2352
  async cancelOrder(id, symbol = undefined, params = {}) {
2234
2353
  /**
@@ -4064,9 +4183,11 @@ export default class bitmart extends Exchange {
4064
4183
  if (api === 'private') {
4065
4184
  this.checkRequiredCredentials();
4066
4185
  const timestamp = this.milliseconds().toString();
4186
+ const brokerId = this.safeString(this.options, 'brokerId', 'CCXTxBitmart000');
4067
4187
  headers = {
4068
4188
  'X-BM-KEY': this.apiKey,
4069
4189
  'X-BM-TIMESTAMP': timestamp,
4190
+ 'X-BM-BROKER-ID': brokerId,
4070
4191
  'Content-Type': 'application/json',
4071
4192
  };
4072
4193
  if (!getOrDelete) {
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitmex.js';
2
- import { Int, OrderSide, OrderType, Trade, OHLCV, Order, Liquidation, OrderBook, Balances, Transaction, Ticker } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, Trade, OHLCV, Order, Liquidation, OrderBook, Balances, Transaction, Ticker, Tickers } from './base/types.js';
3
3
  /**
4
4
  * @class bitmex
5
5
  * @extends Exchange
@@ -47,7 +47,7 @@ export default class bitmex extends Exchange {
47
47
  parseTransactionStatus(status: any): string;
48
48
  parseTransaction(transaction: any, currency?: any): Transaction;
49
49
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
50
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
50
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
51
51
  parseTicker(ticker: any, market?: any): Ticker;
52
52
  parseOHLCV(ohlcv: any, market?: any): OHLCV;
53
53
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitopro.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitopro
5
5
  * @extends Exchange
@@ -10,7 +10,7 @@ export default class bitopro extends Exchange {
10
10
  fetchMarkets(params?: {}): Promise<any[]>;
11
11
  parseTicker(ticker: any, market?: any): Ticker;
12
12
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
13
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
13
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
14
14
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
15
15
  parseTrade(trade: any, market?: any): Trade;
16
16
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitpanda.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitpanda
5
5
  * @extends Exchange
@@ -18,7 +18,7 @@ export default class bitpanda extends Exchange {
18
18
  };
19
19
  parseTicker(ticker: any, market?: any): Ticker;
20
20
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
21
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
21
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
22
22
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
23
23
  parseOHLCV(ohlcv: any, market?: any): OHLCV;
24
24
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitrue.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitrue
5
5
  * @extends Exchange
@@ -28,7 +28,7 @@ export default class bitrue extends Exchange {
28
28
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
29
29
  parseOHLCV(ohlcv: any, market?: any): OHLCV;
30
30
  fetchBidsAsks(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
31
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
31
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
32
32
  parseTrade(trade: any, market?: any): Trade;
33
33
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
34
34
  parseOrderStatus(status: any): string;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitstamp.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitstamp
5
5
  * @extends Exchange
@@ -43,7 +43,7 @@ export default class bitstamp extends Exchange {
43
43
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
44
44
  parseTicker(ticker: any, market?: any): Ticker;
45
45
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
46
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
46
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
47
47
  getCurrencyIdFromTransaction(transaction: any): string;
48
48
  getMarketFromTrade(trade: any): any;
49
49
  parseTrade(trade: any, market?: any): Trade;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bittrex.js';
2
- import { Int, OrderSide, OrderType, OHLCV, Order, Trade, Balances, Transaction, Ticker, OrderBook } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, OHLCV, Order, Trade, Balances, Transaction, Ticker, OrderBook, Tickers } from './base/types.js';
3
3
  /**
4
4
  * @class bittrex
5
5
  * @extends Exchange
@@ -13,7 +13,7 @@ export default class bittrex extends Exchange {
13
13
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
14
14
  fetchCurrencies(params?: {}): Promise<{}>;
15
15
  parseTicker(ticker: any, market?: any): Ticker;
16
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
16
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
17
17
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
18
18
  fetchBidsAsks(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
19
19
  parseTrade(trade: any, market?: any): Trade;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitvavo.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitvavo
5
5
  * @extends Exchange
@@ -14,7 +14,7 @@ export default class bitvavo extends Exchange {
14
14
  fetchCurrencies(params?: {}): Promise<{}>;
15
15
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
16
16
  parseTicker(ticker: any, market?: any): Ticker;
17
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
17
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
18
18
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
19
19
  parseTrade(trade: any, market?: any): Trade;
20
20
  fetchTradingFees(params?: {}): Promise<{}>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/blockchaincom.js';
2
- import { Balances, Int, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class blockchaincom
5
5
  * @extends Exchange
@@ -12,7 +12,7 @@ export default class blockchaincom extends Exchange {
12
12
  fetchL2OrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
13
13
  parseTicker(ticker: any, market?: any): Ticker;
14
14
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
15
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
15
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
16
16
  parseOrderState(state: any): string;
17
17
  parseOrder(order: any, market?: any): Order;
18
18
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/btcalpha.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class btcalpha
5
5
  * @extends Exchange
@@ -7,7 +7,7 @@ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, T
7
7
  export default class btcalpha extends Exchange {
8
8
  describe(): any;
9
9
  fetchMarkets(params?: {}): Promise<any[]>;
10
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
10
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
11
11
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
12
12
  parseTicker(ticker: any, market?: any): Ticker;
13
13
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/btcturk.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class btcturk
5
5
  * @extends Exchange
@@ -11,7 +11,7 @@ export default class btcturk extends Exchange {
11
11
  fetchBalance(params?: {}): Promise<Balances>;
12
12
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
13
13
  parseTicker(ticker: any, market?: any): Ticker;
14
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
14
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
15
15
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
16
16
  parseTrade(trade: any, market?: any): Trade;
17
17
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
package/js/src/bybit.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bybit.js';
2
- import { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Transaction, Ticker, OrderBook } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, Trade, Order, OHLCV, FundingRateHistory, OpenInterest, OrderRequest, Balances, Transaction, Ticker, OrderBook, Tickers } from './base/types.js';
3
3
  /**
4
4
  * @class bybit
5
5
  * @extends Exchange
@@ -68,7 +68,7 @@ export default class bybit extends Exchange {
68
68
  fetchOptionMarkets(params: any): Promise<any[]>;
69
69
  parseTicker(ticker: any, market?: any): Ticker;
70
70
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
71
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
71
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
72
72
  parseOHLCV(ohlcv: any, market?: any): OHLCV;
73
73
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
74
74
  parseFundingRate(ticker: any, market?: any): {
package/js/src/cex.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/cex.js';
2
- import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade } from './base/types.js';
3
3
  /**
4
4
  * @class cex
5
5
  * @extends Exchange
@@ -15,7 +15,7 @@ export default class cex extends Exchange {
15
15
  parseOHLCV(ohlcv: any, market?: any): OHLCV;
16
16
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
17
17
  parseTicker(ticker: any, market?: any): Ticker;
18
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
18
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
19
19
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
20
20
  parseTrade(trade: any, market?: any): Trade;
21
21
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinbase.js';
2
- import { Int, OrderSide, OrderType, Order, Trade, OHLCV, Ticker, OrderBook, Transaction, Balances } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, Order, Trade, OHLCV, Ticker, OrderBook, Transaction, Balances, Tickers } from './base/types.js';
3
3
  /**
4
4
  * @class coinbase
5
5
  * @extends Exchange
@@ -57,7 +57,7 @@ export default class coinbase extends Exchange {
57
57
  fetchMarketsV3(params?: {}): Promise<any[]>;
58
58
  fetchCurrenciesFromCache(params?: {}): Promise<any>;
59
59
  fetchCurrencies(params?: {}): Promise<{}>;
60
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
60
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
61
61
  fetchTickersV2(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
62
62
  fetchTickersV3(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
63
63
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinbasepro.js';
2
- import { Int, OrderSide, OrderType, Trade, OHLCV, Order, Balances, Transaction, Ticker, OrderBook } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, Trade, OHLCV, Order, Balances, Transaction, Ticker, OrderBook, Tickers } from './base/types.js';
3
3
  /**
4
4
  * @class coinbasepro
5
5
  * @extends Exchange
@@ -19,7 +19,7 @@ export default class coinbasepro extends Exchange {
19
19
  fetchBalance(params?: {}): Promise<Balances>;
20
20
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
21
21
  parseTicker(ticker: any, market?: any): Ticker;
22
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
22
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
23
23
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
24
24
  parseTrade(trade: any, market?: any): Trade;
25
25
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinex.js';
2
- import { Balances, FundingHistory, FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, FundingHistory, FundingRateHistory, Int, OHLCV, Order, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class coinex
5
5
  * @extends Exchange
@@ -12,7 +12,7 @@ export default class coinex extends Exchange {
12
12
  fetchContractMarkets(params: any): Promise<any[]>;
13
13
  parseTicker(ticker: any, market?: any): Ticker;
14
14
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
15
- fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
15
+ fetchTickers(symbols?: string[], params?: {}): Promise<Tickers>;
16
16
  fetchTime(params?: {}): Promise<number>;
17
17
  fetchOrderBook(symbol: string, limit?: number, params?: {}): Promise<import("./base/types.js").OrderBook>;
18
18
  parseTrade(trade: any, market?: any): Trade;