Advertisement
RemcoE33

UNMINEABLE

Jul 11th, 2021
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. * Returns coin info from unmineable
  3. *
  4. * @param {"VET"} coin - Input coin.
  5. * @return {array} row with coin info.
  6. * @customfunction
  7. */
  8. function UNMINEABLE(coin){
  9.   const res = UrlFetchApp.fetch(`https://api.unminable.com/v3/coins/${coin.toUpperCase()}?winfo=1`)
  10.   const json = JSON.parse(res.getContentText())
  11.   return [[
  12.     json.coin.symbol,
  13.     json.coin.name,
  14.     json.coin.mining_fee,
  15.     json.coin.exchange,
  16.     json.coin.payment_info.fee,
  17.     json.coin.payment_info.minimum,
  18.     json.coin.payment_info.minimum_exchange,
  19.     json.coin.payment_info.precision,
  20.     json.reward.randomx.last_reward
  21.   ]]
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement