class BtcExchangeInfo::Yunbi
Public Class Methods
btc(type)
click to toggle source
# File lib/btc_exchange_info/yunbi.rb, line 4 def btc(type) response = download_ticker return nil if response.nil? response["btccny"]["ticker"]["#{type}"].to_f end
url()
click to toggle source
# File lib/btc_exchange_info/yunbi.rb, line 10 def url "https://yunbi.com" end
Private Class Methods
download_ticker()
click to toggle source
# File lib/btc_exchange_info/yunbi.rb, line 16 def download_ticker response = RestClient.get "#{url}/api/v2/tickers" data = JSON.parse(response.body) rescue nil end