Class: BitFlyer::Api::PublicReader
- Defined in:
- lib/bit_flyer/api/public_reader.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#board(product_code = '') ⇒ Object
板情報.
-
#board_state(product_code = '') ⇒ Object
板の状態.
-
#chats(from_date = nil) ⇒ Object
チャット.
-
#executions(count = 100, before = nil, after = nil) ⇒ Object
約定履歴.
-
#health(product_code = '') ⇒ Object
取引所の状態 NORMAL: 取引所は稼動しています。 BUSY: 取引所に負荷がかかっている状態です。 VERY BUSY: 取引所の負荷が大きい状態です。 SUPER BUSY: 負荷が非常に大きい状態です。発注は失敗するか、遅れて処理される可能性があります。 NO ORDER: 発注が受付できない状態です。 STOP: 取引所は停止しています。発注は受付されません。.
-
#market ⇒ Object
マーケットの一覧.
-
#ticker(product_code = '') ⇒ Object
Ticker.
Instance Method Details
#board(product_code = '') ⇒ Object
板情報
22 23 24 25 26 27 28 |
# File 'lib/bit_flyer/api/public_reader.rb', line 22 def board(product_code = '') conn = connect params = {} params[:product_code] = product_code if product_code.present? response = conn.get '/v1/board', params response.body end |
#board_state(product_code = '') ⇒ Object
板の状態
health: 取引所の稼動状態です。以下のいずれかの値をとります。NORMAL: 取引所は稼動しています。BUSY: 取引所に負荷がかかっている状態です。VERY BUSY: 取引所の負荷が大きい状態です。SUPER BUSY: 負荷が非常に大きい状態です。発注は失敗するか、遅れて処理される可能性があります。NO ORDER: 発注が受付できない状態です。STOP: 取引所は停止しています。発注は受付されません。
state: 板の状態です。以下の値をとります。RUNNING: 通常稼働中CLOSED: 取引停止中STARTING: 再起動中PREOPEN: 板寄せ中CIRCUIT BREAK: サーキットブレイク発動中AWAITING SQ: Lightning Futures の取引終了後 SQ(清算値)の確定前MATURED: Lightning Futures の満期に到達data.rb: 板の状態について、付加情報を提供します。special_quotation: Lightning Futures の SQ(清算値)
70 71 72 73 74 75 76 |
# File 'lib/bit_flyer/api/public_reader.rb', line 70 def board_state(product_code = '') conn = connect params = {} params[:product_code] = product_code if product_code.present? response = conn.get '/v1/getboardstate', params response.body end |
#chats(from_date = nil) ⇒ Object
チャット
14 15 16 17 18 19 |
# File 'lib/bit_flyer/api/public_reader.rb', line 14 def chats(from_date = nil) conn = connect from_date = from_date.to_date unless from_date.nil? response = conn.get '/v1/getchats', {from_date: from_date} response.body end |
#executions(count = 100, before = nil, after = nil) ⇒ Object
約定履歴
40 41 42 43 44 45 46 47 48 |
# File 'lib/bit_flyer/api/public_reader.rb', line 40 def executions(count = 100, before = nil, after = nil) conn = connect params = {} params[:count] = count if count.present? params[:before] = before unless before.nil? params[:after] = after unless before.nil? response = conn.get '/v1/executions', params response.body end |
#health(product_code = '') ⇒ Object
取引所の状態NORMAL: 取引所は稼動しています。BUSY: 取引所に負荷がかかっている状態です。VERY BUSY: 取引所の負荷が大きい状態です。SUPER BUSY: 負荷が非常に大きい状態です。発注は失敗するか、遅れて処理される可能性があります。NO ORDER: 発注が受付できない状態です。STOP: 取引所は停止しています。発注は受付されません。
85 86 87 88 89 90 91 |
# File 'lib/bit_flyer/api/public_reader.rb', line 85 def health(product_code = '') conn = connect params = {} params[:product_code] = product_code if product_code.present? response = conn.get '/v1/gethealth', params response.body end |
#market ⇒ Object
マーケットの一覧
7 8 9 10 11 |
# File 'lib/bit_flyer/api/public_reader.rb', line 7 def market conn = connect response = conn.get '/v1/markets' response.body end |
#ticker(product_code = '') ⇒ Object
Ticker
31 32 33 34 35 36 37 |
# File 'lib/bit_flyer/api/public_reader.rb', line 31 def ticker(product_code = '') conn = connect params = {} params[:product_code] = product_code if product_code.present? response = conn.get '/v1/ticker', params response.body end |