Class: FtxExchangeApi::PublicApi
- Inherits:
-
BaseApi
- Object
- BaseApi
- FtxExchangeApi::PublicApi
show all
- Defined in:
- lib/ftx_exchange_api/public_api.rb
Instance Attribute Summary
Attributes inherited from BaseApi
#config
Instance Method Summary
collapse
Methods inherited from BaseApi
#initialize
Instance Method Details
#markets(market_name = nil) ⇒ Object
9
10
11
12
13
14
15
|
# 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) ⇒ Object
17
18
19
|
# 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
|