@icgio/icg-utils 1.7.42 → 1.7.43

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.
@@ -247,6 +247,19 @@ let get_crypto_rates = (cb, pair_or_pairs_or_cur_curs, type, source = 'coingecko
247
247
  }
248
248
  get_crypto_rates_base(cb, curs, type)
249
249
  })
250
+ } else if (type === 'curs' && _.includes(pair_or_pairs_or_cur_curs, 'DMC')) {
251
+ let curs = _.without(pair_or_pairs_or_cur_curs, 'DMC')
252
+ needle('get', 'https://api.gateio.ws/api/v4/spot/order_book?currency_pair=DMC_USDT').then((res) => {
253
+ const { asks, bids } = res.body
254
+ let rate = (parseFloat(asks[0][0]) + parseFloat(bids[0][0])) / 2
255
+ result = {
256
+ DMC: {
257
+ USD: rate,
258
+ USDT: rate,
259
+ },
260
+ }
261
+ get_crypto_rates_base(cb, curs, type)
262
+ })
250
263
  } else {
251
264
  get_crypto_rates_base(cb, pair_or_pairs_or_cur_curs, type)
252
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.7.42",
3
+ "version": "1.7.43",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {