Module: BitflyerApi::Methods::Public

Included in:
Client
Defined in:
lib/bitflyer_api/methods/public.rb

Instance Method Summary collapse

Instance Method Details

#board(product_code:) ⇒ Object



9
10
11
12
13
# File 'lib/bitflyer_api/methods/public.rb', line 9

def board(product_code:)
  query = prepare_query(product_code: product_code)
  res = conn.get("/v1/board", query)
  res.body
end

#board_state(product_code:) ⇒ Object



33
34
35
36
37
# File 'lib/bitflyer_api/methods/public.rb', line 33

def board_state(product_code:)
  query = prepare_query(product_code: product_code)
  res = conn.get("/v1/getboardstate", query)
  res.body
end

#chat(from_date: nil) ⇒ Object



44
45
46
47
48
49
# File 'lib/bitflyer_api/methods/public.rb', line 44

def chat(from_date: nil)
  query = prepare_query(from_date: from_date)

  res = conn.get("/v1/getchats", query)
  res.body
end

#executions(product_code:, count: 100, before: nil, after: nil) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/bitflyer_api/methods/public.rb', line 21

def executions(product_code:, count: 100, before: nil, after: nil)
  query = prepare_query(
    product_code: product_code,
    count: count,
    before: before,
    after: after,
  )

  res = conn.get("/v1/executions", query)
  res.body
end

#healthObject



39
40
41
42
# File 'lib/bitflyer_api/methods/public.rb', line 39

def health
  res = conn.get("/v1/gethealth")
  res.body
end

#marketObject



4
5
6
7
# File 'lib/bitflyer_api/methods/public.rb', line 4

def market
  res = conn.get("/v1/markets")
  res.body
end

#ticker(product_code:) ⇒ Object



15
16
17
18
19
# File 'lib/bitflyer_api/methods/public.rb', line 15

def ticker(product_code:)
  query = prepare_query(product_code: product_code)
  res = conn.get("/v1/ticker", query)
  res.body
end