Class: Rubyists::Domeapi::Polymarket::Markets
- Includes:
- Listable
- Defined in:
- lib/domeapi/polymarket/markets.rb
Overview
Markets API endpoints
Defined Under Namespace
Classes: Filter
Instance Attribute Summary
Attributes inherited from Endpoint
Instance Method Summary collapse
-
#price(token_id:, at_time: nil) ⇒ Hash
Fetch current or historical price for a market.
Methods included from Listable
Methods inherited from Endpoint
Constructor Details
This class inherits a constructor from Rubyists::Domeapi::Polymarket::Endpoint
Instance Method Details
#price(token_id:, at_time: nil) ⇒ Hash
Fetch current or historical price for a market
33 34 35 36 37 |
# File 'lib/domeapi/polymarket/markets.rb', line 33 def price(token_id:, at_time: nil) params = { token_id: token_id } params[:at_time] = at_time if at_time client.get('markets/get_market_price', params: params) end |