Class: Polygonio::Rest::Reference::Stocks
Defined Under Namespace
Classes: StockDividendsResponse, StockFinancialsParameters, StockFinancialsResponse, StockSplitsResponse
Instance Attribute Summary
#client
Instance Method Summary
collapse
#initialize
Instance Method Details
#dividends(symbol) ⇒ Object
43
44
45
46
|
# File 'lib/polygonio/rest/api/reference/stocks.rb', line 43
def dividends(symbol)
res = client.request.get("/v2/reference/dividends/#{symbol}")
StockDividendsResponse[res.body]
end
|
#financials(symbol, params = {}) ⇒ Object
61
62
63
64
65
66
|
# File 'lib/polygonio/rest/api/reference/stocks.rb', line 61
def financials(symbol, params = {})
params = StockFinancialsParameters[params]
res = client.request.get("/v2/reference/financials/#{symbol}", params.to_h)
StockFinancialsResponse[res.body]
end
|
#splits(symbol) ⇒ Object
22
23
24
25
|
# File 'lib/polygonio/rest/api/reference/stocks.rb', line 22
def splits(symbol)
res = client.request.get("/v2/reference/splits/#{symbol}")
StockSplitsResponse[res.body]
end
|