Class: Brapi::Resources::Quote
- Inherits:
-
Brapi::Resource
- Object
- Brapi::Resource
- Brapi::Resources::Quote
- Includes:
- Paginated
- Defined in:
- lib/brapi/resources/quote.rb
Constant Summary
Constants included from Paginated
Instance Attribute Summary
Attributes inherited from Brapi::Resource
Instance Method Summary collapse
-
#list(**params) ⇒ Object
GET /api/quote/list.
-
#retrieve(tickers, **params) ⇒ Object
GET /api/quote/tickers.
Methods included from Paginated
Methods inherited from Brapi::Resource
Constructor Details
This class inherits a constructor from Brapi::Resource
Instance Method Details
#list(**params) ⇒ Object
GET /api/quote/list
25 26 27 28 |
# File 'lib/brapi/resources/quote.rb', line 25 def list(**params) raw = get("/api/quote/list", params: params) Brapi::Models::QuoteListResponse.from_h(raw) end |
#retrieve(tickers, **params) ⇒ Object
GET /api/quote/tickers
18 19 20 21 22 |
# File 'lib/brapi/resources/quote.rb', line 18 def retrieve(tickers, **params) tickers_str = Array(tickers).join(",") raw = get("/api/quote/#{CGI.escape(tickers_str)}", params: params) Brapi::Models::QuoteRetrieveResponse.from_h(raw) end |