Module: Bitfinex::RESTv2Stats

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

Instance Method Summary collapse

Instance Method Details

#stats(symbol = 'fUSD', key = 'funding.size', side = "long", section = "last", size = '1m', params = {}) ⇒ Array

Various statistics about the requested pair.

@example:

client.stats('fUSD', 'pos.size')

Parameters:

  • symbol (string) (defaults to: 'fUSD')

    The symbol you want information about.

  • key (string) (defaults to: 'funding.size')

    Allowed values: “funding.size”, “credits.size”, “credits.size.sym”, “pos.size”

  • side (string) (defaults to: "long")

    Available values: “long”, “short”

  • section (string) (defaults to: "last")

    Available values: “last”, “hist”

  • size (string) (defaults to: '1m')

    Available values: ‘1m’

  • params (defaults to: {})

    :sort [int32] if = 1 it sorts results returned with old > new

Returns:

  • (Array)


19
20
21
22
# File 'lib/rest/v2/stats.rb', line 19

def stats(symbol = 'fUSD', key = 'funding.size', side = "long", section = "last", size = '1m', params = {})
  check_params(params, %i{sort})
  get("stats1/#{key}:#{size}:#{symbol}:#{side}/#{section}").body
end