ccxt 4.0.84 → 4.0.85

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/README.md CHANGED
@@ -215,13 +215,13 @@ console.log(version, Object.keys(exchanges));
215
215
 
216
216
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
217
217
 
218
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.84/dist/ccxt.browser.js
219
- * unpkg: https://unpkg.com/ccxt@4.0.84/dist/ccxt.browser.js
218
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.0.85/dist/ccxt.browser.js
219
+ * unpkg: https://unpkg.com/ccxt@4.0.85/dist/ccxt.browser.js
220
220
 
221
221
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
222
222
 
223
223
  ```HTML
224
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.84/dist/ccxt.browser.js"></script>
224
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.0.85/dist/ccxt.browser.js"></script>
225
225
  ```
226
226
 
227
227
  Creates a global `ccxt` object:
@@ -155037,41 +155037,47 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
155037
155037
  }
155038
155038
  parseTicker(ticker, market = undefined) {
155039
155039
  //
155040
- // {
155041
- // "symbol":"620f2019-33c0-423b-8a9d-cde4d7f8ef7f/0c3a106d-bde3-4c13-a26e-3fd2394529e5",
155042
- // "baseCurrency":"620f2019-33c0-423b-8a9d-cde4d7f8ef7f",
155043
- // "quoteCurrency":"0c3a106d-bde3-4c13-a26e-3fd2394529e5",
155044
- // "volume24h":"76411867.852585600000000000",
155045
- // "volume7d":"637809926.759451100000000000",
155046
- // "change24h":"2.5300",
155047
- // "change7d":"5.1300",
155048
- // "lastPrice":"4426.9"
155049
- // }
155040
+ // {
155041
+ // symbol: '92151d82-df98-4d88-9a4d-284fa9eca49f/0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155042
+ // baseCurrency: '92151d82-df98-4d88-9a4d-284fa9eca49f',
155043
+ // quoteCurrency: '0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155044
+ // volume24h: '165723597.189022176000000000',
155045
+ // volume7d: '934505768.625109571000000000',
155046
+ // change24h: '0.0200',
155047
+ // change7d: '-6.4200',
155048
+ // amount24h: '6438.457663100000000000',
155049
+ // amount7d: '35657.785013800000000000',
155050
+ // lastPrice: '25779.16',
155051
+ // lastQuantity: '0.248403300000000000',
155052
+ // bestBid: '25778.74',
155053
+ // bestBidQuantity: '0.6520232',
155054
+ // bestAsk: '25779.17',
155055
+ // bestAskQuantity: '0.4956043',
155056
+ // updateTimestamp: '1693965231406'
155057
+ // }
155050
155058
  //
155051
155059
  const marketId = this.safeString(ticker, 'symbol');
155052
- const symbol = this.safeSymbol(marketId, market);
155053
155060
  const last = this.safeString(ticker, 'lastPrice');
155054
- const change = this.safeString(ticker, 'change24h');
155055
- const timestamp = this.nonce();
155061
+ const timestamp = this.safeInteger(ticker, 'updateTimestamp');
155056
155062
  return this.safeTicker({
155057
- 'symbol': symbol,
155063
+ 'symbol': this.safeSymbol(marketId, market),
155058
155064
  'timestamp': timestamp,
155059
155065
  'datetime': this.iso8601(timestamp),
155060
- 'low': this.safeString(ticker, 'low'),
155061
- 'high': this.safeString(ticker, 'high'),
155062
- 'bid': undefined,
155063
- 'bidVolume': undefined,
155064
- 'ask': undefined,
155065
- 'askVolume': undefined,
155066
+ 'low': undefined,
155067
+ 'high': undefined,
155068
+ 'bid': this.safeString(ticker, 'bestBid'),
155069
+ 'bidVolume': this.safeString(ticker, 'bestBidQuantity'),
155070
+ 'ask': this.safeString(ticker, 'bestAsk'),
155071
+ 'askVolume': this.safeString(ticker, 'bestAskQuantity'),
155066
155072
  'vwap': undefined,
155067
155073
  'open': undefined,
155068
155074
  'close': last,
155069
155075
  'last': last,
155070
155076
  'previousClose': undefined,
155071
- 'change': change,
155072
- 'percentage': undefined,
155077
+ 'change': undefined,
155078
+ 'percentage': this.safeString(ticker, 'change24h'),
155073
155079
  'average': undefined,
155074
- 'baseVolume': undefined,
155080
+ 'baseVolume': this.safeString(ticker, 'amount24h'),
155075
155081
  'quoteVolume': this.safeString(ticker, 'volume24h'),
155076
155082
  'info': ticker,
155077
155083
  }, market);
@@ -155093,16 +155099,24 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
155093
155099
  };
155094
155100
  const response = await this.publicGetTickerBaseQuote(this.extend(request, params));
155095
155101
  //
155096
- // {
155097
- // "symbol":"620f2019-33c0-423b-8a9d-cde4d7f8ef7f/0c3a106d-bde3-4c13-a26e-3fd2394529e5",
155098
- // "baseCurrency":"620f2019-33c0-423b-8a9d-cde4d7f8ef7f",
155099
- // "quoteCurrency":"0c3a106d-bde3-4c13-a26e-3fd2394529e5",
155100
- // "volume24h":"76411867.852585600000000000",
155101
- // "volume7d":"637809926.759451100000000000",
155102
- // "change24h":"2.5300",
155103
- // "change7d":"5.1300",
155104
- // "lastPrice":"4426.9"
155105
- // }
155102
+ // {
155103
+ // symbol: '92151d82-df98-4d88-9a4d-284fa9eca49f/0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155104
+ // baseCurrency: '92151d82-df98-4d88-9a4d-284fa9eca49f',
155105
+ // quoteCurrency: '0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155106
+ // volume24h: '165723597.189022176000000000',
155107
+ // volume7d: '934505768.625109571000000000',
155108
+ // change24h: '0.0200',
155109
+ // change7d: '-6.4200',
155110
+ // amount24h: '6438.457663100000000000',
155111
+ // amount7d: '35657.785013800000000000',
155112
+ // lastPrice: '25779.16',
155113
+ // lastQuantity: '0.248403300000000000',
155114
+ // bestBid: '25778.74',
155115
+ // bestBidQuantity: '0.6520232',
155116
+ // bestAsk: '25779.17',
155117
+ // bestAskQuantity: '0.4956043',
155118
+ // updateTimestamp: '1693965231406'
155119
+ // }
155106
155120
  //
155107
155121
  return this.parseTicker(response, market);
155108
155122
  }
@@ -155118,18 +155132,26 @@ class latoken extends _abstract_latoken_js__WEBPACK_IMPORTED_MODULE_0__/* ["defa
155118
155132
  await this.loadMarkets();
155119
155133
  const response = await this.publicGetTicker(params);
155120
155134
  //
155121
- // [
155122
- // {
155123
- // "symbol":"DASH/BTC",
155124
- // "baseCurrency":"ed75c263-4ab9-494b-8426-031dab1c7cc1",
155125
- // "quoteCurrency":"92151d82-df98-4d88-9a4d-284fa9eca49f",
155126
- // "volume24h":"1.977753278000000000",
155127
- // "volume7d":"18.964342670000000000",
155128
- // "change24h":"-1.4800",
155129
- // "change7d":"-5.5200",
155130
- // "lastPrice":"0.003066"
155131
- // },
155132
- // ]
155135
+ // [
155136
+ // {
155137
+ // symbol: '92151d82-df98-4d88-9a4d-284fa9eca49f/0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155138
+ // baseCurrency: '92151d82-df98-4d88-9a4d-284fa9eca49f',
155139
+ // quoteCurrency: '0c3a106d-bde3-4c13-a26e-3fd2394529e5',
155140
+ // volume24h: '165723597.189022176000000000',
155141
+ // volume7d: '934505768.625109571000000000',
155142
+ // change24h: '0.0200',
155143
+ // change7d: '-6.4200',
155144
+ // amount24h: '6438.457663100000000000',
155145
+ // amount7d: '35657.785013800000000000',
155146
+ // lastPrice: '25779.16',
155147
+ // lastQuantity: '0.248403300000000000',
155148
+ // bestBid: '25778.74',
155149
+ // bestBidQuantity: '0.6520232',
155150
+ // bestAsk: '25779.17',
155151
+ // bestAskQuantity: '0.4956043',
155152
+ // updateTimestamp: '1693965231406'
155153
+ // }
155154
+ // ]
155133
155155
  //
155134
155156
  return this.parseTickers(response, symbols);
155135
155157
  }
@@ -195796,7 +195818,17 @@ class binance extends _binance_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
195796
195818
  client.resolve(result, messageHash);
195797
195819
  if (event === 'bookTicker') {
195798
195820
  // watch bookTickers
195799
- client.resolve([result], '!' + 'bookTicker@arr');
195821
+ client.resolve(result, '!' + 'bookTicker@arr');
195822
+ const messageHashes = this.findMessageHashes(client, 'tickers::');
195823
+ for (let i = 0; i < messageHashes.length; i++) {
195824
+ const messageHash = messageHashes[i];
195825
+ const parts = messageHash.split('::');
195826
+ const symbolsString = parts[1];
195827
+ const symbols = symbolsString.split(',');
195828
+ if (this.inArray(symbol, symbols)) {
195829
+ client.resolve(result, messageHash);
195830
+ }
195831
+ }
195800
195832
  }
195801
195833
  }
195802
195834
  handleTickers(client, message) {
@@ -273642,7 +273674,7 @@ SOFTWARE.
273642
273674
 
273643
273675
  //-----------------------------------------------------------------------------
273644
273676
  // this is updated by vss.js when building
273645
- const version = '4.0.84';
273677
+ const version = '4.0.85';
273646
273678
  _src_base_Exchange_js__WEBPACK_IMPORTED_MODULE_0__/* .Exchange.ccxtVersion */ .e.ccxtVersion = version;
273647
273679
  //-----------------------------------------------------------------------------
273648
273680