Class: Cryptos::Bitmex::Client
- Inherits:
-
Object
- Object
- Cryptos::Bitmex::Client
- Includes:
- HTTParty
- Defined in:
- lib/cryptos/bitmex/client.rb
Instance Method Summary collapse
- #get_instruments ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #stats ⇒ Object
Constructor Details
#initialize ⇒ Client
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_instruments ⇒ Object
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 |
#stats ⇒ Object
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 |