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.



7
8
9
# File 'lib/bitflyer/http/public.rb', line 7

def initialize
  @connection = Connection.new(nil, nil)
end

Instance Method Details

#board(product_code: 'BTC_JPY') ⇒ Object



19
20
21
# File 'lib/bitflyer/http/public.rb', line 19

def board(product_code: 'BTC_JPY')
  @connection.get('/v1/board', product_code: product_code).body
end

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



31
32
33
# File 'lib/bitflyer/http/public.rb', line 31

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

#executions(product_code: 'BTC_JPY') ⇒ Object



27
28
29
# File 'lib/bitflyer/http/public.rb', line 27

def executions(product_code: 'BTC_JPY')
  @connection.get('/v1/executions', product_code: product_code).body
end

#healthObject



11
12
13
# File 'lib/bitflyer/http/public.rb', line 11

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

#marketsObject



15
16
17
# File 'lib/bitflyer/http/public.rb', line 15

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

#ticker(product_code: 'BTC_JPY') ⇒ Object



23
24
25
# File 'lib/bitflyer/http/public.rb', line 23

def ticker(product_code: 'BTC_JPY')
  @connection.get('/v1/ticker', product_code: product_code).body
end