Class: Cryptos::Bitmex::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/cryptos/bitmex/client.rb

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



9
10
11
# File 'lib/cryptos/bitmex/client.rb', line 9

def initialize
  @options = {}
end

Instance Method Details

#get_instrumentsObject



13
14
15
16
17
18
19
# File 'lib/cryptos/bitmex/client.rb', line 13

def get_instruments
  execute '/instrument/active' do |response|
    response.to_a.map do |i|
      Hashie::Mash.new i
    end
  end
end

#statsObject



21
22
23
24
25
26
27
# File 'lib/cryptos/bitmex/client.rb', line 21

def stats
  execute '/stats' do |response|
    response.to_a.map do |s|
      Hashie::Mash.new s
    end
  end
end