Sha256: cfcfb337005b95339e0622031b3d4872e04492b28971140967089728248e1f9d

Contents?: true

Size: 289 Bytes

Versions: 1

Compression:

Stored size: 289 Bytes

Contents

class Utils
  def self.get_bchxrp_price
    # fetch bch/xrp price from coin market cap
    response = RestClient.get('https://api.coinmarketcap.com/v2/ticker/1831/?convert=XRP')
    hash = JSON.parse (response.body)
    return hash['data']['quotes']['XRP']['price'].to_f.round(4)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
SimBot-0.1.1 lib/utils.rb