class ItBitSDK::Market
Public Class Methods
new(symbol:)
click to toggle source
Calls superclass method
# File lib/it_bit_sdk/market.rb, line 8 def initialize(symbol:) super() @symbol = symbol end
Public Instance Methods
order_book()
click to toggle source
# File lib/it_bit_sdk/market.rb, line 19 def order_book response = send_request('get', "/markets/#{@symbol}/order_book") ::ItBitSDK::OrderBook.new(params: response) end
ticker()
click to toggle source
# File lib/it_bit_sdk/market.rb, line 14 def ticker response = send_request('get', "/markets/#{@symbol}/ticker") ::ItBitSDK::Ticker.new(params: response) end
trades(since)
click to toggle source
# File lib/it_bit_sdk/market.rb, line 24 def trades(since) response = send_request('get', "/markets/#{@symbol}/trades?since=#{since}") response['recentTrades'].collect { |trade| ::ItBitSDK::Trade.new(params: trade) } end