Method: Kaesen::Lakebtc#ticker

Defined in:
lib/kaesen/lakebtc.rb

#tickerhash

Get ticker information.

Returns:

  • (hash)

    ticker ask: [BigDecimal] 最良売気配値bid: [BigDecimal] 最良買気配値last: [BigDecimal] 最近値(?用語要チェック), last price high: [BigDecimal] 高値low: [BigDecimal] 安値volume: [BigDecimal] 取引量ltimestamp: [int] ローカルタイムスタンプvwap: [BigDecimal] 過去24時間の加重平均



42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/kaesen/lakebtc.rb', line 42

def ticker
  h = get_ssl(@url_public + "/ticker") # the id of BTCJPY is 5.
  h = h["JPY"]
  {
    "ask"        => BigDecimal.new(h["ask"].to_s),
    "bid"        => BigDecimal.new(h["bid"].to_s),
    "last"       => BigDecimal.new(h["last"].to_s),
    # "high"
    # "low"
    # "volume"
    "ltimestamp" => Time.now.to_i,
    # "vwap"
  }
end