Module: Bitfinex::RESTv2Ticker

Included in:
RESTv2
Defined in:
lib/rest/v2/ticker.rb

Instance Method Summary collapse

Instance Method Details

#ticker(*symbols) ⇒ Hash

Gives innermost bid and asks and information on the most recent trade, as well as high, low and volume of the last 24 hours.

@example:

client.ticker("tBTCUSD","tLTCUSD","fUSD")

Parameters:

  • symbols

    a list of symbols

Returns:

  • (Hash)


12
13
14
15
16
17
18
# File 'lib/rest/v2/ticker.rb', line 12

def ticker(*symbols)
  if symbols.size == 1
    get("ticker/#{symbols.first}").body
  else
    get("tickers", symbols: "#{symbols.flatten.join(",")}").body
  end
end