class Bitflyer::HTTP::Public::Client

Public Class Methods

new() click to toggle source
# File lib/bitflyer/http/public.rb, line 7
def initialize
  @connection = Connection.new(nil, nil)
end

Public Instance Methods

board(product_code: 'BTC_JPY') click to toggle source
# 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)) click to toggle source
# 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) click to toggle source
# 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() click to toggle source
# File lib/bitflyer/http/public.rb, line 11
def health
  @connection.get('/v1/gethealth').body
end
markets() click to toggle source
# File lib/bitflyer/http/public.rb, line 15
def markets
  @connection.get('/v1/markets').body
end
ticker(product_code: 'BTC_JPY') click to toggle source
# File lib/bitflyer/http/public.rb, line 23
def ticker(product_code: 'BTC_JPY')
  @connection.get('/v1/ticker', product_code: product_code).body
end