Class: Bitflyer::HTTP::Public::Client
- Inherits:
-
Object
- Object
- Bitflyer::HTTP::Public::Client
- Defined in:
- lib/bitflyer/http/public.rb
Instance Method Summary collapse
- #board(product_code: 'BTC_JPY') ⇒ Object
- #chats(from_date: (Time.now - (5 * 24 * 60 * 60))) ⇒ Object
- #executions(product_code: 'BTC_JPY', count: nil, before: nil, after: nil) ⇒ Object
- #health ⇒ Object
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #markets ⇒ Object
- #ticker(product_code: 'BTC_JPY') ⇒ Object
Constructor Details
#initialize ⇒ Client
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
37 38 39 |
# File 'lib/bitflyer/http/public.rb', line 37 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', count: nil, before: nil, after: nil) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/bitflyer/http/public.rb', line 27 def executions(product_code: 'BTC_JPY', count: nil, before: nil, after: nil) query = { product_code: product_code, count: count, before: before, after: after }.delete_if { |_, v| v.nil? } @connection.get('/v1/executions', query).body end |
#health ⇒ Object
11 12 13 |
# File 'lib/bitflyer/http/public.rb', line 11 def health @connection.get('/v1/gethealth').body end |
#markets ⇒ Object
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 |