class FtxExchangeApi::PublicApi

Public Instance Methods

markets(market_name = nil) click to toggle source
# File lib/ftx_exchange_api/public_api.rb, line 9
def markets(market_name = nil)
  if market_name
    send_request(:get, "/markets/#{market_name}", {})
  else
    send_request(:get, '/markets', {})
  end
end
orderbook(market_name, depth: nil) click to toggle source
# File lib/ftx_exchange_api/public_api.rb, line 17
def orderbook(market_name, depth: nil)
  send_request(:get, "/markets/#{market_name}/orderbook", depth: depth)
end

Protected Instance Methods

send_request(method, path, query) click to toggle source
Calls superclass method FtxExchangeApi::BaseApi#send_request
# File lib/ftx_exchange_api/public_api.rb, line 23
def send_request(method, path, query)
  super(method, path, {}, query.reject{|_k, v| v == nil })
end