Learn R Programming

yfR (version 1.1.0)

yf_get_dividends: Get Yahoo Finance Dividends from a single stock

Description

This function will use the json api to retrieve dividends from Yahoo finance.

Usage

yf_get_dividends(ticker, first_date = Sys.Date() - 365, last_date = Sys.Date())

Value

a tibble with dividends

Arguments

ticker

a single ticker symbol

first_date

The first date of query (Date or character as YYYY-MM-DD)

last_date

The last date of query (Date or character as YYYY-MM-DD)

Examples

Run this code
yf_get_dividends(ticker = "PETR4.SA")

Run the code above in your browser using DataLab