@icgio/icg-utils 1.7.44 → 1.7.45

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.
@@ -279,6 +279,28 @@ let get_crypto_rates = (cb, pair_or_pairs_or_cur_curs, type, source = 'coingecko
279
279
  }
280
280
  get_crypto_rates(cb, curs, type, source)
281
281
  })
282
+ } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'GLW')) {
283
+ let curs = _.without(pair_or_pairs_or_cur_curs, 'GLW')
284
+ needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=GLW_USDT&depth=100').then((res) => {
285
+ const { asks, bids } = res.body.data
286
+ let rate = (parseFloat(asks[0].price) + parseFloat(bids[0].price)) / 2
287
+ result.GLW = {
288
+ USD: rate,
289
+ USDT: rate,
290
+ }
291
+ get_crypto_rates(cb, curs, type, source)
292
+ })
293
+ } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'UCF')) {
294
+ let curs = _.without(pair_or_pairs_or_cur_curs, 'UCF')
295
+ needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=UCF_USDT&depth=100').then((res) => {
296
+ const { asks, bids } = res.body.data
297
+ let rate = (parseFloat(asks[0].price) + parseFloat(bids[0].price)) / 2
298
+ result.UCF = {
299
+ USD: rate,
300
+ USDT: rate,
301
+ }
302
+ get_crypto_rates(cb, curs, type, source)
303
+ })
282
304
  } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'WPAY')) {
283
305
  let curs = _.without(pair_or_pairs_or_cur_curs, 'WPAY')
284
306
  needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=WPAY_USDT&depth=100').then((res) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.7.44",
3
+ "version": "1.7.45",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {