Class: Brapi::Resources::Quote
- Inherits:
-
Brapi::Resource
- Object
- Brapi::Resource
- Brapi::Resources::Quote
- Defined in:
- lib/brapi/resources/quote.rb
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 inherited from Brapi::Resource
Constructor Details
This class inherits a constructor from Brapi::Resource
Instance Method Details
#list(**params) ⇒ Object
GET /api/quote/list
16 17 18 19 |
# File 'lib/brapi/resources/quote.rb', line 16 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
9 10 11 12 13 |
# File 'lib/brapi/resources/quote.rb', line 9 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 |