Class: Bitflyer::HTTP::Public::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/bitflyer/http/public.rb

Instance Method Summary collapse

Constructor Details

#initializeClient

Returns a new instance of Client.



5
6
7
# File 'lib/bitflyer/http/public.rb', line 5

def initialize
  @connection = Connection.new
end

Instance Method Details

#board(product_code = 'BTC_JPY') ⇒ Object



17
18
19
# File 'lib/bitflyer/http/public.rb', line 17

def board(product_code = 'BTC_JPY')
  @connection.get('board', { product_code: product_code }).body
end

#chats(from_date = (Time.now - 5 * 24 * 60 * 60)) ⇒ Object



29
30
31
# File 'lib/bitflyer/http/public.rb', line 29

def chats(from_date = (Time.now - 5 * 24 * 60 * 60))
  @connection.get('getchats', { from_date: from_date }).body
end

#executions(product_code = 'BTC_JPY') ⇒ Object



25
26
27
# File 'lib/bitflyer/http/public.rb', line 25

def executions(product_code = 'BTC_JPY')
  @connection.get('executions', { product_code: product_code }).body
end

#healthObject



9
10
11
# File 'lib/bitflyer/http/public.rb', line 9

def health
  @connection.get('gethealth').body
end

#marketsObject



13
14
15
# File 'lib/bitflyer/http/public.rb', line 13

def markets
  @connection.get('markets').body
end

#ticker(product_code = 'BTC_JPY') ⇒ Object



21
22
23
# File 'lib/bitflyer/http/public.rb', line 21

def ticker(product_code = 'BTC_JPY')
  @connection.get('ticker', { product_code: product_code }).body
end