module Gemini::V1::TickerClient
Public Instance Methods
listen_ticker(pair="BTCUSD", &block)
click to toggle source
Call the specified block passing tickers, it uses websocket
@param pair [string] @param block [Block] The code to be executed when a new ticker is sent by the server @example:
client.listen_ticker do |tick| puts tick.inspect end
# File lib/gemini/v1/ticker.rb, line 22 def listen_ticker(pair="BTCUSD", &block) raise BlockMissingError unless block_given? register_channel pair: pair, channel: "ticker", &block end
ticker(symbol = "btcusd")
click to toggle source
Gives innermost bid and asks and information on the most recent trade, as well as high, low and volume of the last 24 hours.
@param symbol [string] The name of hthe symbol @return [Hash] @example:
client.ticker
# File lib/gemini/v1/ticker.rb, line 10 def ticker(symbol = "btcusd") get("pubticker/#{symbol}").body end