Class: KrakenClient::Endpoints::Public
- Inherits:
-
Base
- Object
- Base
- KrakenClient::Endpoints::Public
show all
- Defined in:
- lib/kraken_client/endpoints/public.rb
Instance Attribute Summary
Attributes inherited from Base
#config, #options
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #request_manager
Instance Method Details
#data ⇒ Object
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/kraken_client/endpoints/public.rb', line 11
def data
{
:Time => :server_time,
:AssetPairs => :asset_pairs,
:Depth => :order_book,
:Ticker => :ticker,
:Trades => :trades,
:Spread => :spread,
:Assets => :assets,
}
end
|
5
6
7
8
9
|
# File 'lib/kraken_client/endpoints/public.rb', line 5
def perform(endpoint_name, args)
response = request_manager.call(url(endpoint_name), args)
hash = Hashie::Mash.new(JSON.parse(response.body))
hash[:result]
end
|