{"id":7150,"date":"2024-08-19T09:17:24","date_gmt":"2024-08-19T07:17:24","guid":{"rendered":"https:\/\/eodhd.com\/financial-apis\/?p=7150"},"modified":"2025-09-15T16:55:20","modified_gmt":"2025-09-15T14:55:20","slug":"r-library-v-2-for-financial-data-by-eodhd-2024","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024","title":{"rendered":"R Library v.2 for Financial Data (2024)"},"content":{"rendered":"\n<p class=\"docs-content__text wp-block-paragraph\">In addition to our previous official <a href=\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\">R library<\/a> we are proud to present to you second version of a library (eodhdR2) made by independent developer <a href=\"https:\/\/msperlin.com\">Prof. Marcelo S. Perlin<\/a>.<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">R is an open-source programming language that has gained immense popularity in the data science community for its robust statistical capabilities and visualization tools. Whether you\u2019re a budding data analyst or a professional trader, EODHD\u2019s R library provides a versatile environment for handling vast financial data, creating visualizations, and conducting sophisticated analyses.<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">In this quick guide, we will show you how to install the latest library and use its most popular functions.<\/p>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-installation-and-examples\">Installation and examples<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#installation-and-examples\"><\/a><\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">First things first, ensure you have R and RStudio installed on your machine. RStudio is an integrated development environment (IDE) that makes working with R more convenient. The suggested steps are:<\/p>\n\n\n\n<ol class=\"docs-content__list docs-content__list--ordered wp-block-list\">\n<li>Install the latest R version for your platform (Windows\/Mac\/Linux) from&nbsp;<a href=\"https:\/\/cran.r-project.org\/\">https:\/\/cran.r-project.org\/<\/a><\/li>\n\n\n\n<li>Install the latest RStudio from&nbsp;<a href=\"https:\/\/posit.co\/products\/open-source\/rstudio\/\">https:\/\/posit.co\/products\/open-source\/rstudio\/<\/a>. Alternatively, you can also use R with Microsoft\u2019s&nbsp;<a href=\"https:\/\/code.visualstudio.com\/\">vscode<\/a>.<\/li>\n<\/ol>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Feel free to visit our&nbsp;<a href=\"https:\/\/github.com\/EodHistoricalData\/R-Library-for-financial-data-2024\">Github page<\/a>&nbsp;to subscribe to receive notifications about future updates for he R library.<\/p>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-r-library-installation-process\">R library installation process<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#r-library-installation-process\"><\/a><\/h2>\n\n\n\n<ol class=\"docs-content__list docs-content__list--ordered wp-block-list\">\n<li>To install the library, open RStudio, and copy and paste the following command in the prompt (bottom left of screen), and hit Enter:<\/li>\n<\/ol>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"># stable version available at CRAN\ninstall.package(\"eodhdR2\")\n\n# development version\nif (!require(devtools)) install.packages(\"devtools\")\ndevtools::install_github(\"EodHistoricalData\/R-Library-for-financial-data-2024\")<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">This command will install all dependencies of the package. This might take a while depending on your internet connection and hardware.<\/p>\n\n\n\n<ol class=\"docs-content__list docs-content__list--ordered wp-block-list\" start=\"2\">\n<li>Next, let\u2019s import&nbsp;eodhdR2&nbsp;library for accessing its functions:<\/li>\n<\/ol>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code>library(eodhdR2)<\/code><\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">If you are able to execute the previous code without error, then the package was installed correctly and you\u2019re good to go. The next step is activating the API with a valid token, and executing the code examples.<\/p>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-activating-the-api\">Activating the API<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#activating-the-api\"><\/a><\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">If you haven\u2019t done so, register a new account at&nbsp;<a href=\"https:\/\/eodhd.com\/\">https:\/\/eodhd.com\/<\/a>. Once you done that, head out to&nbsp;<a href=\"https:\/\/eodhd.com\/cp\/dashboard\">https:\/\/eodhd.com\/cp\/dashboard<\/a>&nbsp;and search for your unique API Token. This token is attached to your data subscription. If you only subscribed to fundamentals, it will not work for other types of data. We recommend exploring our plans, starting from $19.99, to access the necessary type of API without limitations.<\/p>\n\n\n\n<figure class=\"docs-content__image wp-block-image size-large is-resized is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"412\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-1024x412.png\" alt=\"API tocken EODHD\" class=\"wp-image-7162\"  srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-1024x412.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-300x121.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-768x309.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-60x24.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM-150x60.png 150w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Screenshot-2024-08-19-at-9.50.36\u202fAM.png 1164w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">While using&nbsp;eodhdR2, all authentications are managed with function&nbsp;eodhdR2::set_token():<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb3-1\"><\/a># set your own token<\/code>\n<code>eodhdR2::set_token(\"YOUR_TOKEN\")<\/code><\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Alternatively, EODHD offers a DEMO API key to test the data for a few tickers only: AAPL.US, TSLA.US , VTI.US, AMZN.US, BTC-USD and EUR-USD. We recommend you test your access to the API with the demo token:<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb4-1\"><\/a>token &lt;- eodhdR2::get_demo_token() <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb4-2\"><\/a>eodhdR2::set_token(token)<\/code><\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">\u2714 eodhd API token set<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">\u2139 Account name: API Documentation 2 (supportlevel1@eodhistoricaldata.com)<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">\u2139 Quota: 88838 | 10000000<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">\u2139 Subscription: demo<\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">\u2716 You are using a **DEMONSTRATION** token for testing pourposes, with limited access to the data repositories. See &lt;https:\/\/eodhd.com\/&gt; for registration and, after finding your token, use it with function eodhdR2::set_token(&#8220;TOKEN&#8221;).<\/p>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-getting-help\">Getting Help<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#getting-help\"><\/a><\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">To access all information about a specific function, you can use the help command: <\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb10-1\"><\/a>help(get_prices)<\/code><\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Example of help for function get_prices():<\/p>\n\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"509\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/example-help.png\" alt=\"Example of help for function get_prices()\" class=\"wp-image-7163\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/example-help.png 750w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/example-help-300x204.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/example-help-60x41.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/example-help-150x102.png 150w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-list-of-the-available-functions\">List of the available functions<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#list-of-the-available-functions\"><\/a><\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">For testing all functions, except, get_exchanges() and get_ticker(), you can use the demo token. Make sure to register it in your R session before executing the code. The instruction are available in previous section <strong>Activating the API<\/strong>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_demo_token<\/strong>: Returns the demo token<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb11-1\"><\/a>library(eodhdR2) <a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb11-2\"><\/a> <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb11-3\"><\/a>get_demo_token()<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_dividends<\/strong>: Returns dividend history for a given ticker and exchange.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code>divs &lt;- get_dividends(\"AAPL\", \"US\") <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb12-2\"><\/a>head(divs)<\/code>\n\n<\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_exchanges<\/strong>: Returns the list of available exchanges. Be aware you need a&nbsp;non-demo&nbsp;token for this function.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb13-1\"><\/a>exchanges &lt;- get_exchanges() <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb13-2\"><\/a>head(exchanges)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_fundamentals<\/strong>: imports fundamental data from eodhd.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb14-1\"><\/a>l_fun &lt;- get_fundamentals(\"AAPL\", \"US\") <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb14-2\"><\/a>names(l_fun)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_prices<\/strong>: Imports daily adjusted\/unadjusted prices trading volumes from eodhd.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code>prices &lt;- get_prices(\"AAPL\", \"US\") <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb15-2\"><\/a>head(prices)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_splits<\/strong>: retrieves split data from eodhd.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code>splits &lt;- get_splits(\"AAPL\", \"US\") <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb16-2\"><\/a>head(splits)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>get_tickers<\/strong>: retrieves a list of tickers for a particular exchange. Be aware you need a&nbsp;non-demo&nbsp;token for this function.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb17-1\"><\/a>US_tickers &lt;- get_tickers(\"US\") <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb17-2\"><\/a>head(US_tickers)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>parse_financials<\/strong>: organizes financial data imported using&nbsp;get_fundamentals(). The output is a dataframe in the long\/wide format.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><code>l_fun &lt;- get_fundamentals(\"AAPL\", \"US\") <a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb18-2\"><\/a> <\/code>\n<code><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb18-3\"><\/a>df_fin &lt;- parse_financials(l_fun) <a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb18-4\"><\/a>head(df_fin)<\/code><\/code><\/pre>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><strong>set_token<\/strong>: authenticates R session with eodhd by setting a token in registry<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"><a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb19-1\"><\/a>demo_token &lt;- get_demo_token()\n<a href=\"file:\/\/\/Users\/aleksandrpletnev\/Downloads\/07-pkg-eodhd2R\/eodhdR2-documentation-to-website.html#cb19-2\"><\/a>set_token(demo_token)<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"docs-content__heading docs-content__heading--h2 wp-block-heading\" id=\"h-testing-for-aapl-ticker\">Testing for AAPL ticker<\/h2>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">These are examples of using eodhdR2 for APPLE INC (AAPL), which trades on the US exchange. These requests are done with &#8220;demo&#8221; token.<\/p>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-retrieving-financial-prices\"><strong>Retrieving Financial Prices<\/strong><\/h3>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">ticker &lt;- \"AAPL\" # AAPL is the ticker for APPLE INC\nexchange &lt;- \"US\" # AAPL is traded in the US market\n\n# fetch prices from eodhd price endpoint\ndf_prices &lt;- eodhdR2::get_prices(ticker, exchange)<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><em>\u2500\u2500 retrieving price data for ticker AAPL|US\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500<br>! Quota status: 89475|10000000, refreshing in 3.72 hours<br>\u2139 cache file &#8216;\/tmp\/RtmpyEk3VW\/eodhdR2-cache\/AAPL_US_eodhd_prices.rds&#8217; saved<br>\u2714 got 11008 rows of prices<br>\u2139 got daily data from 1980-12-12 to 2024-08-13<\/em><\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"># check the result\ndplyr::glimpse(df_prices)<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"570\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2.png\" alt=\"Response example (AAPL)\" class=\"wp-image-7177\"  srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2.png 1608w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-300x106.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-1024x363.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-768x272.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-1536x544.png 1536w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-60x21.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/request_example-2-150x53.png 150w\" sizes=\"(max-width: 1608px) 100vw, 1608px\" \/><\/figure>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Now, let\u2019s use&nbsp;ggplot2&nbsp;to make a plot of the price series for the past five years:<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">library(ggplot2)\n\nfirst_date &lt;- Sys.Date() - 5*365 # last  5 years\nlast_date &lt;- Sys.Date()\n\ndf_prices &lt;- df_prices |&gt;\n  dplyr::filter(\n    date &gt;= first_date,\n    date &lt;= last_date\n    )\n\np &lt;- ggplot(df_prices, aes(y = adjusted_close, x = date)) + \n  geom_line() + \n  theme_light() + \n  labs(title = \"Adjusted Prices of AAPL\",\n       subtitle = \"Prices are adjusted to splits, dividends and other corporate events\",\n       x = \"Data\",\n       y = \"Adjusted Prices\",\n       caption = \"Data obtained with package eodhdR2\")\n\np<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1.png\" alt=\"Adjusted prices of AAPL\" class=\"wp-image-7178\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1.png 1344w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1-300x214.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1-1024x731.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1-768x549.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1-60x43.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-5-1-150x107.png 150w\" sizes=\"(max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-retrieving-dividends\"><strong>Retrieving Dividends<\/strong><\/h3>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">We can also import the dividend history of APPLE INC.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">ticker &lt;- \"AAPL\" # AAPL is the ticker for APPLE INC\nexchange &lt;- \"US\" # AAPL is traded in the US market\n\n# fetch data from the dividends endpoint and filter for dates\ndf_div &lt;- eodhdR2::get_dividends(ticker, exchange) |&gt;\n  dplyr::filter(\n    date &gt;= first_date,\n    date &lt;= last_date\n    )<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><em>\u2500\u2500 retrieving dividends for ticker AAPL|US\u2500\u2500<br>! Quota status: 89478|10000000, refreshing in 3.72 hours<br>\u2139 cache file &#8216;\/tmp\/RtmpyEk3VW\/eodhdR2-cache\/AAPL_US_eodhd_dividends.rds&#8217; saved<br>\u2714 got 84 rows of dividend data<\/em><\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"># check the data\ndplyr::glimpse(df_div)<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1580\" height=\"576\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2.png\" alt=\"Response example (AAPL) 2\" class=\"wp-image-7179\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2.png 1580w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-300x109.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-1024x373.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-768x280.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-1536x560.png 1536w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-60x22.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/response-example-AAPL-2-150x55.png 150w\" sizes=\"(max-width: 1580px) 100vw, 1580px\" \/><\/figure>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Again, lets plot the dividend history since 2019-08-15:<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">library(ggplot2)\n\np &lt;- ggplot(df_div, aes(y = value, x = date)) + \n  geom_point(size = 2) + \n  theme_light() + \n  labs(title = \"Adjusted Dividends of AAPL\",\n       x = \"Data\",\n       y = \"Adjusted Dividends\")\n\np<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1344\" height=\"960\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1.png\" alt=\"Adjusted dividends for AAPL\" class=\"wp-image-7180\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1.png 1344w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1-300x214.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1-1024x731.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1-768x549.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1-60x43.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/unnamed-chunk-7-1-150x107.png 150w\" sizes=\"(max-width: 1344px) 100vw, 1344px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-retrieving-fundamentals\"><strong>Retrieving Fundamentals<\/strong><\/h3>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">We can use the same interface for fetching fundamental data from the EODHD endpoint.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">ticker &lt;- \"AAPL\" # AAPL is the ticker for APPLE INC\nexchange &lt;- \"US\" # AAPL is traded in the US market\n\n# fetch the data\nl_fun &lt;- eodhdR2::get_fundamentals(ticker, exchange)<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><em>\u2500\u2500 retrieving fundamentals for ticker AAPL|US\u2500\u2500<br>! Quota status: 89480|10000000, refreshing in 3.72 hours<br>\u2714 querying API<br>\u2714 got 13 elements in raw list<\/em><\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"># results is a list, lets check its content\nnames(l_fun)<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\">[1] &#8220;General&#8221; &#8220;Highlights&#8221; &#8220;Valuation&#8221; <\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">[4] &#8220;SharesStats&#8221; &#8220;Technicals&#8221; &#8220;SplitsDividends&#8221; <\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">[7] &#8220;AnalystRatings&#8221; &#8220;Holders&#8221; &#8220;InsiderTransactions&#8221; <\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">[10] &#8220;ESGScores&#8221; &#8220;outstandingShares&#8221; &#8220;Earnings&#8221; <\/p>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">[13] &#8220;Financials&#8221;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-parsing-financials\">Parsing financials<\/h3>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">We can also use package eodhdR2 for parsing (organizing) the financial data from the raw output.<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">type_table &lt;- \"long\" # lets produce a long table\n\n# l_fun is the output of eodhdR2::get_fundamentals()\nlong_financials &lt;- eodhdR2::parse_financials(l_fun, type_table)<\/code><\/pre>\n<\/div>\n\n\n<p class=\"docs-content__text wp-block-paragraph\"><em>\u2500\u2500 Parsing financial data for Apple Inc | AAPL \u2500\u2500<br>\u2139 parsing Balance_Sheet data<br>\u2139 quarterly<br>\u2139 yearly<br>\u2139 parsing Cash_Flow data<br>\u2139 quarterly<br>\u2139 yearly<br>\u2139 parsing Income_Statement data<br>\u2139 quarterly<br>\u2139 yearly<br>\u2714 got 67680 rows of financial data (long format)<\/em><\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\"># check contents\nhead(long_financials)<\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1604\" height=\"512\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials.png\" alt=\"Parsing financials\" class=\"wp-image-7181\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials.png 1604w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-300x96.png 300w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-1024x327.png 1024w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-768x245.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-1536x490.png 1536w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-60x19.png 60w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/Parsing-financials-150x48.png 150w\" sizes=\"(max-width: 1604px) 100vw, 1604px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"docs-content__heading docs-content__heading--h3 wp-block-heading\" id=\"h-the-last-quarterly-balance-sheet-of-aapl\">The last quarterly Balance Sheet of AAPL<\/h3>\n\n\n\n<p class=\"docs-content__text wp-block-paragraph\">Now that we have the financial data, let\u2019s build a simple report of the last quarterly balance sheet of AAPL:<\/p>\n\n\n<div class=\"code-block\">\n<pre class=\"docs-content__code-block wp-block-code\"><code class=\"\">quarterly_bs &lt;- long_financials |&gt;\n  dplyr::filter(\n    frequency == 'quarterly',\n    type_financial == \"Balance_Sheet\"\n  )\n\nlast_date &lt;- max(quarterly_bs$date)\n\nlast_bs &lt;- quarterly_bs |&gt;\n  dplyr::filter(date == last_date)\n\nlast_bs |&gt; \n  dplyr::select(date, name, value) |&gt;\n  na.omit() |&gt;\n  gt::gt() |&gt;\n  gt::tab_header(\n    title = paste0(\"Balance Sheet of AAPL (\", last_date,\")\"),\n    subtitle = paste0(\"Data from eodhd (Values in Thousands USD)\")\n  ) |&gt;\n  gt::fmt_currency(value, scale_by = 1\/1000)  <\/code><\/pre>\n<\/div>\n\n\n<figure class=\"docs-content__image wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"1534\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL.png\" alt=\"Balance sheet (AAPL)\" class=\"wp-image-7182\" srcset=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL.png 918w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL-180x300.png 180w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL-613x1024.png 613w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL-768x1283.png 768w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL-36x60.png 36w, https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/08\/balance-sheet-AAPL-90x150.png 90w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In addition to our previous official R library we are proud to present to you second version of a library (eodhdR2) made by independent developer Prof. Marcelo S. Perlin. R is an open-source programming language that has gained immense popularity in the data science community for its robust statistical capabilities and visualization tools. Whether you\u2019re [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":4485,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[],"class_list":["post-7150","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-python-php-laravel-java-matlab-examples"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.6 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>R Library v.2 for Financial Data (2024) |<\/title>\n<meta name=\"description\" content=\"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R Library v.2 for Financial Data (2024)\" \/>\n<meta property=\"og:description\" content=\"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\" \/>\n<meta property=\"og:site_name\" content=\"Stock Price Data, Financial and Stock Market API\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2024-08-19T07:17:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-15T14:55:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\" \/>\n\t<meta property=\"og:image:width\" content=\"270\" \/>\n\t<meta property=\"og:image:height\" content=\"270\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"a.pletnev\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"a.pletnev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\"},\"author\":{\"name\":\"a.pletnev\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/ed3193541c25b73e823a83bdcdb09b5d\"},\"headline\":\"R Library v.2 for Financial Data (2024)\",\"datePublished\":\"2024-08-19T07:17:24+00:00\",\"dateModified\":\"2025-09-15T14:55:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\"},\"wordCount\":935,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\",\"articleSection\":[\"5. Developer Tools &amp; Examples\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\",\"name\":\"R Library v.2 for Financial Data (2024) |\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\",\"datePublished\":\"2024-08-19T07:17:24+00:00\",\"dateModified\":\"2025-09-15T14:55:20+00:00\",\"description\":\"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\",\"width\":270,\"height\":270,\"caption\":\"R Language Stock API Example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-apis\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R Library v.2 for Financial Data (2024)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"name\":\"Historical Stock Prices and Fundamental Financial Data APIs | EODHD\",\"description\":\"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/ed3193541c25b73e823a83bdcdb09b5d\",\"name\":\"a.pletnev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/020e454749b61223b72b1bf96e7978ccdd1e39b04585b29698da3767a193a57d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/020e454749b61223b72b1bf96e7978ccdd1e39b04585b29698da3767a193a57d?s=96&d=mm&r=g\",\"caption\":\"a.pletnev\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R Library v.2 for Financial Data (2024) |","description":"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024","og_locale":"en_US","og_type":"article","og_title":"R Library v.2 for Financial Data (2024)","og_description":"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.","og_url":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024","og_site_name":"Stock Price Data, Financial and Stock Market API","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2024-08-19T07:17:24+00:00","article_modified_time":"2025-09-15T14:55:20+00:00","og_image":[{"width":270,"height":270,"url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","type":"image\/png"}],"author":"a.pletnev","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"a.pletnev","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024"},"author":{"name":"a.pletnev","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/ed3193541c25b73e823a83bdcdb09b5d"},"headline":"R Library v.2 for Financial Data (2024)","datePublished":"2024-08-19T07:17:24+00:00","dateModified":"2025-09-15T14:55:20+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024"},"wordCount":935,"publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","articleSection":["5. Developer Tools &amp; Examples"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024","url":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024","name":"R Library v.2 for Financial Data (2024) |","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","datePublished":"2024-08-19T07:17:24+00:00","dateModified":"2025-09-15T14:55:20+00:00","description":"R Library v.2 for various financial data by EODHD: fundamental, stock prices, splits, exchanges.","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#primaryimage","url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","contentUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","width":270,"height":270,"caption":"R Language Stock API Example"},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-apis"},{"@type":"ListItem","position":2,"name":"R Library v.2 for Financial Data (2024)"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-apis\/#website","url":"https:\/\/eodhd.com\/financial-apis\/","name":"Historical Stock Prices and Fundamental Financial Data APIs | EODHD","description":"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API","publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-apis\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-apis\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/ed3193541c25b73e823a83bdcdb09b5d","name":"a.pletnev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/020e454749b61223b72b1bf96e7978ccdd1e39b04585b29698da3767a193a57d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/020e454749b61223b72b1bf96e7978ccdd1e39b04585b29698da3767a193a57d?s=96&d=mm&r=g","caption":"a.pletnev"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","jetpack_shortlink":"https:\/\/wp.me\/p8NjB1-1Rk","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/7150","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/comments?post=7150"}],"version-history":[{"count":15,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/7150\/revisions"}],"predecessor-version":[{"id":7209,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/7150\/revisions\/7209"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media?parent=7150"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/categories?post=7150"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/tags?post=7150"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}