Class: Bitmex::Stats

Inherits:
Base
  • Object
show all
Defined in:
lib/bitmex/stats.rb

Overview

Exchange statistics

Author:

  • Iulian Costan

Instance Attribute Summary

Attributes inherited from Base

#rest, #websocket

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Bitmex::Base

Instance Method Details

#currentArray

Get exchange-wide and per-series turnover and volume statistics

Returns:

  • (Array)

    the statistics



7
8
9
10
11
# File 'lib/bitmex/stats.rb', line 7

def current
  rest.get stats_path do |response|
    response_handler response
  end
end

#historyArray

Get historical exchange-wide and per-series turnover and volume statistics

Returns:

  • (Array)

    the history in XBT



15
16
17
18
19
# File 'lib/bitmex/stats.rb', line 15

def history
  rest.get stats_path(:history) do |response|
    response_handler response
  end
end

#history_usdArray

Get a summary of exchange statistics in USD

Returns:

  • (Array)

    the history in USD



23
24
25
26
27
# File 'lib/bitmex/stats.rb', line 23

def history_usd
  rest.get stats_path(:historyUSD) do |response|
    response_handler response
  end
end