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') ⇒ 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.
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 |
#health ⇒ Object
9 10 11 |
# File 'lib/bitflyer/http/public.rb', line 9 def health @connection.get('gethealth').body end |
#markets ⇒ Object
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 |