ccxt 4.1.6 → 4.1.8

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 (56) hide show
  1. package/CHANGELOG.md +194 -0
  2. package/README.md +3 -3
  3. package/dist/ccxt.browser.js +142 -97
  4. package/dist/ccxt.browser.min.js +2 -2
  5. package/dist/cjs/ccxt.js +1 -1
  6. package/dist/cjs/src/binance.js +11 -11
  7. package/dist/cjs/src/bingx.js +2 -2
  8. package/dist/cjs/src/bitbns.js +3 -3
  9. package/dist/cjs/src/bitfinex2.js +5 -5
  10. package/dist/cjs/src/bitget.js +6 -6
  11. package/dist/cjs/src/bitmart.js +2 -0
  12. package/dist/cjs/src/bitmex.js +4 -4
  13. package/dist/cjs/src/bybit.js +7 -7
  14. package/dist/cjs/src/coinbase.js +5 -5
  15. package/dist/cjs/src/coinbasepro.js +3 -3
  16. package/dist/cjs/src/coinfalcon.js +3 -3
  17. package/dist/cjs/src/cryptocom.js +5 -5
  18. package/dist/cjs/src/gate.js +6 -6
  19. package/dist/cjs/src/huobi.js +4 -4
  20. package/dist/cjs/src/kraken.js +1 -1
  21. package/dist/cjs/src/krakenfutures.js +2 -2
  22. package/dist/cjs/src/kucoin.js +9 -9
  23. package/dist/cjs/src/kucoinfutures.js +6 -6
  24. package/dist/cjs/src/mexc.js +46 -3
  25. package/dist/cjs/src/okx.js +8 -8
  26. package/dist/cjs/src/poloniex.js +2 -2
  27. package/dist/cjs/src/pro/exmo.js +1 -1
  28. package/js/ccxt.d.ts +1 -1
  29. package/js/ccxt.js +1 -1
  30. package/js/src/abstract/bitmart.d.ts +1 -0
  31. package/js/src/abstract/mexc.d.ts +2 -0
  32. package/js/src/abstract/mexc3.d.ts +2 -0
  33. package/js/src/binance.js +11 -11
  34. package/js/src/bingx.js +2 -2
  35. package/js/src/bitbns.js +3 -3
  36. package/js/src/bitfinex2.js +5 -5
  37. package/js/src/bitget.js +6 -6
  38. package/js/src/bitmart.js +2 -0
  39. package/js/src/bitmex.js +4 -4
  40. package/js/src/bybit.js +7 -7
  41. package/js/src/coinbase.js +5 -5
  42. package/js/src/coinbasepro.js +3 -3
  43. package/js/src/coinfalcon.js +3 -3
  44. package/js/src/cryptocom.js +5 -5
  45. package/js/src/gate.js +6 -6
  46. package/js/src/huobi.js +4 -4
  47. package/js/src/kraken.js +1 -1
  48. package/js/src/krakenfutures.js +2 -2
  49. package/js/src/kucoin.js +9 -9
  50. package/js/src/kucoinfutures.js +6 -6
  51. package/js/src/mexc.d.ts +1 -1
  52. package/js/src/mexc.js +46 -3
  53. package/js/src/okx.js +8 -8
  54. package/js/src/poloniex.js +2 -2
  55. package/js/src/pro/exmo.js +1 -1
  56. package/package.json +1 -1
@@ -540,7 +540,7 @@ export default class kucoinfutures extends kucoin {
540
540
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
541
541
  * @param {int} [limit] the maximum amount of candles to fetch
542
542
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
543
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
543
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
544
544
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
545
545
  */
546
546
  await this.loadMarkets();
@@ -1428,7 +1428,7 @@ export default class kucoinfutures extends kucoin {
1428
1428
  * @param {int} [params.until] End time in ms
1429
1429
  * @param {string} [params.side] buy or sell
1430
1430
  * @param {string} [params.type] limit or market
1431
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1431
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1432
1432
  * @returns An [array of order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1433
1433
  */
1434
1434
  await this.loadMarkets();
@@ -1534,10 +1534,10 @@ export default class kucoinfutures extends kucoin {
1534
1534
  * @param {int} [params.till] end time in ms
1535
1535
  * @param {string} [params.side] buy or sell
1536
1536
  * @param {string} [params.type] limit, or market
1537
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1537
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1538
1538
  * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
1539
1539
  */
1540
- await this.loadMarkets;
1540
+ await this.loadMarkets();
1541
1541
  let paginate = false;
1542
1542
  [paginate, params] = this.handleOptionAndParams(params, 'fetchClosedOrders', 'paginate');
1543
1543
  if (paginate) {
@@ -1908,7 +1908,7 @@ export default class kucoinfutures extends kucoin {
1908
1908
  * @param {int} [limit] the maximum number of trades structures to retrieve
1909
1909
  * @param {object} [params] extra parameters specific to the kucoinfutures api endpoint
1910
1910
  * @param {int} [params.until] End time in ms
1911
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1911
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1912
1912
  * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
1913
1913
  */
1914
1914
  await this.loadMarkets();
@@ -2334,7 +2334,7 @@ export default class kucoinfutures extends kucoin {
2334
2334
  * @param {int} [since] not used by kucuoinfutures
2335
2335
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
2336
2336
  * @param {object} [params] extra parameters specific to the okx api endpoint
2337
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2337
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2338
2338
  * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
2339
2339
  */
2340
2340
  if (symbol === undefined) {
package/js/src/mexc.d.ts CHANGED
@@ -24,7 +24,7 @@ export default class mexc extends Exchange {
24
24
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Trade[]>;
25
25
  parseTrade(trade: any, market?: any): import("./base/types.js").Trade;
26
26
  syntheticTradeId(market?: any, timestamp?: any, side?: any, amount?: any, price?: any, orderType?: any, takerOrMaker?: any): string;
27
- fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").OHLCV[]>;
27
+ fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
28
28
  parseOHLCV(ohlcv: any, market?: any): number[];
29
29
  fetchTickers(symbols?: string[], params?: {}): Promise<import("./base/types.js").Dictionary<import("./base/types.js").Ticker>>;
30
30
  fetchTicker(symbol: string, params?: {}): Promise<import("./base/types.js").Ticker>;
package/js/src/mexc.js CHANGED
@@ -196,6 +196,8 @@ export default class mexc extends Exchange {
196
196
  'rebate/detail/kickback': 1,
197
197
  'rebate/referCode': 1,
198
198
  'rebate/affiliate/commission': 1,
199
+ 'rebate/affiliate/withdraw': 1,
200
+ 'rebate/affiliate/commission/detail': 1,
199
201
  'mxDeduct/enable': 1,
200
202
  'userDataStream': 1,
201
203
  },
@@ -1360,11 +1362,15 @@ export default class mexc extends Exchange {
1360
1362
  /**
1361
1363
  * @method
1362
1364
  * @name mexc3#fetchTrades
1365
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#recent-trades-list
1366
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#compressed-aggregate-trades-list
1367
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-contract-transaction-data
1363
1368
  * @description get the list of most recent trades for a particular symbol
1364
1369
  * @param {string} symbol unified symbol of the market to fetch trades for
1365
1370
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1366
1371
  * @param {int} [limit] the maximum amount of trades to fetch
1367
1372
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1373
+ * @param {int} [params.until] *spot only* *since must be defined* the latest time in ms to fetch entries for
1368
1374
  * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#public-trades}
1369
1375
  */
1370
1376
  await this.loadMarkets();
@@ -1375,11 +1381,21 @@ export default class mexc extends Exchange {
1375
1381
  if (limit !== undefined) {
1376
1382
  request['limit'] = limit;
1377
1383
  }
1378
- // if (since !== undefined) {
1379
- // request['startTime'] = since; bug in api, waiting for fix
1380
- // }
1381
1384
  let trades = undefined;
1382
1385
  if (market['spot']) {
1386
+ const until = this.safeIntegerN(params, ['endTime', 'until', 'till']);
1387
+ if (since !== undefined) {
1388
+ request['startTime'] = since;
1389
+ if (until === undefined) {
1390
+ throw new ArgumentsRequired(this.id + ' fetchTrades() requires an until parameter when since is provided');
1391
+ }
1392
+ }
1393
+ if (until !== undefined) {
1394
+ if (since === undefined) {
1395
+ throw new ArgumentsRequired(this.id + ' fetchTrades() requires a since parameter when until is provided');
1396
+ }
1397
+ request['endTime'] = until;
1398
+ }
1383
1399
  let method = this.safeString(this.options, 'fetchTradesMethod', 'spotPublicGetAggTrades');
1384
1400
  method = this.safeString(params, 'method', method); // AggTrades, HistoricalTrades, Trades
1385
1401
  trades = await this[method](this.extend(request, params));
@@ -1610,31 +1626,53 @@ export default class mexc extends Exchange {
1610
1626
  /**
1611
1627
  * @method
1612
1628
  * @name mexc3#fetchOHLCV
1629
+ * @see https://mexcdevelop.github.io/apidocs/spot_v3_en/#kline-candlestick-data
1630
+ * @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#k-line-data
1613
1631
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1614
1632
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1615
1633
  * @param {string} timeframe the length of time each candle represents
1616
1634
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
1617
1635
  * @param {int} [limit] the maximum amount of candles to fetch
1618
1636
  * @param {object} [params] extra parameters specific to the mexc3 api endpoint
1637
+ * @param {int} [params.until] timestamp in ms of the latest candle to fetch
1638
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
1619
1639
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
1620
1640
  */
1621
1641
  await this.loadMarkets();
1622
1642
  const market = this.market(symbol);
1643
+ const maxLimit = (market['spot']) ? 1000 : 2000;
1644
+ let paginate = false;
1645
+ [paginate, params] = this.handleOptionAndParams(params, 'fetchOHLCV', 'paginate', false);
1646
+ if (paginate) {
1647
+ return await this.fetchPaginatedCallDeterministic('fetchOHLCV', symbol, since, limit, timeframe, params, maxLimit);
1648
+ }
1623
1649
  const options = this.safeValue(this.options, 'timeframes', {});
1624
1650
  const timeframes = this.safeValue(options, market['type'], {});
1625
1651
  const timeframeValue = this.safeString(timeframes, timeframe);
1652
+ const duration = this.parseTimeframe(timeframe) * 1000;
1626
1653
  const request = {
1627
1654
  'symbol': market['id'],
1628
1655
  'interval': timeframeValue,
1629
1656
  };
1630
1657
  let candles = undefined;
1631
1658
  if (market['spot']) {
1659
+ const until = this.safeIntegerN(params, ['until', 'endTime', 'till']);
1632
1660
  if (since !== undefined) {
1633
1661
  request['startTime'] = since;
1662
+ if (until === undefined) {
1663
+ // we have to calculate it assuming we can get at most 2000 entries per request
1664
+ const end = this.sum(since, maxLimit * duration);
1665
+ const now = this.milliseconds();
1666
+ request['endTime'] = Math.min(end, now);
1667
+ }
1634
1668
  }
1635
1669
  if (limit !== undefined) {
1636
1670
  request['limit'] = limit;
1637
1671
  }
1672
+ if (until !== undefined) {
1673
+ params = this.omit(params, ['until', 'till']);
1674
+ request['endTime'] = until;
1675
+ }
1638
1676
  const response = await this.spotPublicGetKlines(this.extend(request, params));
1639
1677
  //
1640
1678
  // [
@@ -1653,9 +1691,14 @@ export default class mexc extends Exchange {
1653
1691
  candles = response;
1654
1692
  }
1655
1693
  else if (market['swap']) {
1694
+ const until = this.safeIntegerProductN(params, ['until', 'endTime', 'till'], 0.001);
1656
1695
  if (since !== undefined) {
1657
1696
  request['start'] = this.parseToInt(since / 1000);
1658
1697
  }
1698
+ if (until !== undefined) {
1699
+ params = this.omit(params, ['until', 'till']);
1700
+ request['end'] = until;
1701
+ }
1659
1702
  const priceType = this.safeString(params, 'price', 'default');
1660
1703
  params = this.omit(params, 'price');
1661
1704
  const method = this.getSupportedMapping(priceType, {
package/js/src/okx.js CHANGED
@@ -2054,7 +2054,7 @@ export default class okx extends Exchange {
2054
2054
  * @param {object} [params] extra parameters specific to the okx api endpoint
2055
2055
  * @param {string} [params.price] "mark" or "index" for mark price and index price candles
2056
2056
  * @param {int} [params.until] timestamp in ms of the latest candle to fetch
2057
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2057
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2058
2058
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
2059
2059
  */
2060
2060
  await this.loadMarkets();
@@ -2154,7 +2154,7 @@ export default class okx extends Exchange {
2154
2154
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
2155
2155
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure} to fetch
2156
2156
  * @param {object} [params] extra parameters specific to the okx api endpoint
2157
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2157
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
2158
2158
  * @returns {object[]} a list of [funding rate structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#funding-rate-history-structure}
2159
2159
  */
2160
2160
  if (symbol === undefined) {
@@ -3398,7 +3398,7 @@ export default class okx extends Exchange {
3398
3398
  * @param {bool} [params.stop] True if fetching trigger or conditional orders
3399
3399
  * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
3400
3400
  * @param {string} [params.algoId] Algo ID "'433845797218942976'"
3401
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3401
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3402
3402
  * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
3403
3403
  */
3404
3404
  await this.loadMarkets();
@@ -3730,7 +3730,7 @@ export default class okx extends Exchange {
3730
3730
  * @param {string} [params.ordType] "conditional", "oco", "trigger", "move_order_stop", "iceberg", or "twap"
3731
3731
  * @param {string} [params.algoId] Algo ID "'433845797218942976'"
3732
3732
  * @param {int} [params.until] timestamp in ms to fetch orders for
3733
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3733
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3734
3734
  * @returns {Order[]} a list of [order structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
3735
3735
  */
3736
3736
  await this.loadMarkets();
@@ -3899,7 +3899,7 @@ export default class okx extends Exchange {
3899
3899
  * @param {int} [limit] the maximum number of trades structures to retrieve
3900
3900
  * @param {object} [params] extra parameters specific to the okx api endpoint
3901
3901
  * @param {int} [params.until] Timestamp in ms of the latest time to retrieve trades for
3902
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3902
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3903
3903
  * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
3904
3904
  */
3905
3905
  await this.loadMarkets();
@@ -3993,7 +3993,7 @@ export default class okx extends Exchange {
3993
3993
  * @param {object} [params] extra parameters specific to the okx api endpoint
3994
3994
  * @param {string} [params.marginMode] 'cross' or 'isolated'
3995
3995
  * @param {int} [params.until] the latest time in ms to fetch entries for
3996
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3996
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
3997
3997
  * @returns {object} a [ledger structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#ledger-structure}
3998
3998
  */
3999
3999
  await this.loadMarkets();
@@ -4457,7 +4457,7 @@ export default class okx extends Exchange {
4457
4457
  * @param {int} [limit] the maximum number of deposits structures to retrieve
4458
4458
  * @param {object} [params] extra parameters specific to the okx api endpoint
4459
4459
  * @param {int} [params.until] the latest time in ms to fetch entries for
4460
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4460
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4461
4461
  * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4462
4462
  */
4463
4463
  await this.loadMarkets();
@@ -4563,7 +4563,7 @@ export default class okx extends Exchange {
4563
4563
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
4564
4564
  * @param {object} [params] extra parameters specific to the okx api endpoint
4565
4565
  * @param {int} [params.until] the latest time in ms to fetch entries for
4566
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4566
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4567
4567
  * @returns {object[]} a list of [transaction structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure}
4568
4568
  */
4569
4569
  await this.loadMarkets();
@@ -401,7 +401,7 @@ export default class poloniex extends Exchange {
401
401
  * @param {int} [limit] the maximum amount of candles to fetch
402
402
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
403
403
  * @param {int} [params.until] timestamp in ms
404
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
404
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
405
405
  * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
406
406
  */
407
407
  await this.loadMarkets();
@@ -963,7 +963,7 @@ export default class poloniex extends Exchange {
963
963
  * @param {int} [limit] the maximum number of trades structures to retrieve
964
964
  * @param {object} [params] extra parameters specific to the poloniex api endpoint
965
965
  * @param {int} [params.until] the latest time in ms to fetch entries for
966
- * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters] (ttps://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
966
+ * @param {boolean} [params.paginate] default false, when true will automatically paginate by calling this endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
967
967
  * @returns {Trade[]} a list of [trade structures]{@link https://github.com/ccxt/ccxt/wiki/Manual#trade-structure}
968
968
  */
969
969
  await this.loadMarkets();
@@ -516,7 +516,7 @@ export default class exmo extends exmoRest {
516
516
  const symbol = this.safeSymbol(marketId);
517
517
  const orderBook = this.safeValue(message, 'data', {});
518
518
  const messageHash = 'orderbook:' + symbol;
519
- const timestamp = this.safeNumber(message, 'ts');
519
+ const timestamp = this.safeInteger(message, 'ts');
520
520
  let storedOrderBook = this.safeValue(this.orderbooks, symbol);
521
521
  if (storedOrderBook === undefined) {
522
522
  storedOrderBook = this.orderBook({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.1.6",
3
+ "version": "4.1.8",
4
4
  "description": "A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 130+ exchanges",
5
5
  "unpkg": "dist/ccxt.browser.js",
6
6
  "type": "module",