class FTX::API::Markets
Public Instance Methods
get(market_name)
click to toggle source
# File lib/ftx/api/markets.rb, line 11 def get(market_name) send_request(:get, "/markets/#{market_name}", {}) end
historic(market_name, query = {})
click to toggle source
# File lib/ftx/api/markets.rb, line 19 def historic(market_name, query = {}) raise ArgumentError.new( "Resolution required as a window length in seconds. options: 15, 60, 300, 900, 3600, 14400, 86400, or any multiple of 86400 up to 30*86400") unless query.dig(:resolution) send_request(:get, "/markets/#{market_name}/candles", query) end
list()
click to toggle source
# File lib/ftx/api/markets.rb, line 7 def list send_request(:get, '/markets', {}) end
orderbook(market_name, depth: nil)
click to toggle source
# File lib/ftx/api/markets.rb, line 15 def orderbook(market_name, depth: nil) send_request(:get, "/markets/#{market_name}/orderbook", depth: depth) end