@icgio/icg-utils 1.7.49 → 1.7.51

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.
@@ -312,6 +312,17 @@ let get_crypto_rates = (cb, pair_or_pairs_or_cur_curs, type, source = 'coingecko
312
312
  }
313
313
  get_crypto_rates(cb, curs, type, source)
314
314
  })
315
+ } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'KLC')) {
316
+ let curs = _.without(pair_or_pairs_or_cur_curs, 'KLC')
317
+ needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=KLC_USDT&depth=100').then((res) => {
318
+ const { asks, bids } = res.body.data
319
+ let rate = (parseFloat(asks[0].price) + parseFloat(bids[0].price)) / 2
320
+ result.KLC = {
321
+ USD: rate,
322
+ USDT: rate,
323
+ }
324
+ get_crypto_rates(cb, curs, type, source)
325
+ })
315
326
  } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'MEGODS')) {
316
327
  let curs = _.without(pair_or_pairs_or_cur_curs, 'MEGODS')
317
328
  needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=MEGODS_USDT&depth=100').then((res) => {
@@ -323,6 +334,17 @@ let get_crypto_rates = (cb, pair_or_pairs_or_cur_curs, type, source = 'coingecko
323
334
  }
324
335
  get_crypto_rates(cb, curs, type, source)
325
336
  })
337
+ } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'SDP')) {
338
+ let curs = _.without(pair_or_pairs_or_cur_curs, 'SDP')
339
+ needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=SDP_USDT&depth=100').then((res) => {
340
+ const { asks, bids } = res.body.data
341
+ let rate = (parseFloat(asks[0].price) + parseFloat(bids[0].price)) / 2
342
+ result.SDP = {
343
+ USD: rate,
344
+ USDT: rate,
345
+ }
346
+ get_crypto_rates(cb, curs, type, source)
347
+ })
326
348
  } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'TIN')) {
327
349
  let curs = _.without(pair_or_pairs_or_cur_curs, 'TIN')
328
350
  needle('get', 'https://www.mexc.com/open/api/v2/market/depth?symbol=TIN_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.49",
3
+ "version": "1.7.51",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {