{"id":6392,"date":"2024-02-16T13:37:35","date_gmt":"2024-02-16T12:37:35","guid":{"rendered":"https:\/\/eodhd.com\/financial-apis\/?p=6392"},"modified":"2024-09-04T10:43:35","modified_gmt":"2024-09-04T08:43:35","slug":"r-library-for-financial-data-by-eodhd","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd","title":{"rendered":"R Library for Financial Data"},"content":{"rendered":"\n<p><strong>Important!<\/strong>\u00a0Since we have introduced a <a href=\"https:\/\/eodhd.com\/financial-apis\/r-library-v-2-for-financial-data-by-eodhd-2024\">new version of the R library for EODHD functions<\/a>, the current library is no longer supported on CRAN and has been replaced by the new library (eodhdR2). The current library is still available via <a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-R-Financial-Library\">our GitHub<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>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&#8217;re a budding data analyst or a professional trader, EODHD&#8217;s R library provides a versatile environment for handling vast financial data, creating visualizations, and conducting sophisticated analyses.<\/p>\n\n\n\n<p>In this quick guide, we will show you how to install the library and use its most popular functions. <\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Sign up &amp; Get Data<\/span><\/a><\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-installation-and-examples\">Installation and examples<\/h2>\n\n\n\n<p>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 convinient. You can download R from <a href=\"https:\/\/cran.r-project.org\/mirrors.html\" target=\"_blank\" rel=\"noreferrer noopener\">CRAN<\/a>&nbsp;and RStudio from <a href=\"https:\/\/www.rstudio.com\/products\/rstudio\/download\/\" target=\"_blank\" rel=\"noreferrer noopener\">RStudio&#8217;s official website<\/a>. Following guide will be based on RStudio.<\/p>\n\n\n\n<p>Required Environment:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>R version from 4.3.1 to latest<\/li>\n\n\n\n<li>R Studio<\/li>\n<\/ul>\n\n\n\n<p>Feel free to visit our <a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-R-Financial-Library\" target=\"_blank\" rel=\"noreferrer noopener\">Github page<\/a> to subscribe to receive notifications about future updates for R library.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-r-library-installation-process\">R library installation process <\/h3>\n\n\n\n<p><strong>1.<\/strong> <strong>Installing the library.<\/strong> Type the following command and hit Enter:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">install.packages(\"eodhd\")<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>See the screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1918\" height=\"879\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/02\/Screenshot_41.png\" alt=\"\" class=\"wp-image-6569\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>2.<\/strong> <strong>Library Import.<\/strong> Next, let&#8217;s import EODHD library for accessing EODHD API&#8217;s functions:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">library(\"eodhd\")<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>See the screenshot:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1042\" height=\"402\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/Screenshot_3.png\" alt=\"\" class=\"wp-image-6394\"\/><\/figure>\n\n\n\n<p>R Financial Library is installed now. Next, we are going to activate EODHD&#8217;s API key to get an access to data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-api-access-activation-free-and-payed-options\">API access activation: free and payed options<\/h3>\n\n\n\n<p class=\"bordered_paragraph\">1. You can start with \u201c<strong>DEMO<\/strong>\u201d API key to test the data for a few tickers only: <a href=\"https:\/\/eodhd.com\/financial-apis\/\" target=\"_blank\" rel=\"noreferrer noopener\">AAPL.US<\/a>,&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/TSLA.US\" target=\"_blank\" rel=\"noreferrer noopener\">TSLA.US&nbsp;<\/a>,&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/VTI.US\" target=\"_blank\" rel=\"noreferrer noopener\">VTI.US<\/a>,&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/AMZN.US\" target=\"_blank\" rel=\"noreferrer noopener\">AMZN.US<\/a>,&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/BTC-USD.CC\" target=\"_blank\" rel=\"noreferrer noopener\">BTC-USD<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/eodhistoricaldata.com\/financial-summary\/EURUSD.FOREX\" target=\"_blank\" rel=\"noreferrer noopener\">EUR-USD<\/a>. For these tickers, <a href=\"https:\/\/eodhd.com\/financial-apis\/\">all of our APIs<\/a>, including <a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/new-real-time-data-api-websockets\/\" target=\"_blank\" rel=\"noreferrer noopener\">Real-Time Data<\/a>, are availible without limitations.<br>2. Register<strong> for the free plan<\/strong> to receive your API key (limited to 20 API calls per day) with access to <a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/api-for-historical-data-and-volumes\/\" target=\"_blank\" rel=\"noreferrer noopener\">End-Of-Day Historical Stock Market Data API<\/a>&nbsp;for any ticker, but within the past year only. Plus a <a href=\"https:\/\/eodhistoricaldata.com\/financial-apis\/exchanges-api-list-of-tickers-and-trading-hours\/#Get_List_of_Tickers_Exchange_Symbols\" target=\"_blank\" rel=\"noreferrer noopener\">List of tickers per Exchange<\/a> is availible.<br>3. We recommend exploring <a href=\"https:\/\/eodhd.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\">our plans<\/a>, <strong>starting from $19.99<\/strong>, to access the necessary type of API without limitations.<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Sign up &amp; Get Data<\/span><\/a><\/p>\n\n\n\n<p>Once you have EODHD API key, you can set it in an additional file, for example &#8220;key.R&#8221;:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">api_key &lt;- 'demo'<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>To implement the &#8220;key.R&#8221; file in your code:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">source(\"key.R\")\nprint(api_key)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Or set the type as an argument for the function:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">api_token='demo'<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Having implemented an active API key, we are ready to call for data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-information-about-a-function\">Information about a function<\/h3>\n\n\n\n<p>To access all information about a specific function, you can use the help command:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">help(get_eod_historical_stock_market_data)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>See the example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1896\" height=\"937\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/02\/Screenshot_4.png\" alt=\"\" class=\"wp-image-6597\"\/><\/figure>\n\n\n\n<p>Scroll down to the end of this guide to see all availible functions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-example-end-of-the-day-historical-stock-market-data\">Example: End of the day historical stock market data<\/h3>\n\n\n\n<p>Lets call for End of the day historical stock market data:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">get_eod_historical_stock_market_data(\n    api_token = \"demo\",\n    symbol = \"AAPL\",\n    from_date = NULL,\n    to_date = NULL,\n    period = \"d\",\n    order = \"a\"\n)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>See the example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1898\" height=\"878\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/02\/Screenshot_42.png\" alt=\"\" class=\"wp-image-6570\"\/><\/figure>\n\n\n\n<p>The function will return the following JSON respond:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"352\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/02\/Screenshot_43.png\" alt=\"\" class=\"wp-image-6572\" style=\"width:840px;height:auto\"\/><\/figure>\n\n\n\n<p>All the parameters for this function are listed and described <a href=\"https:\/\/eodhd.com\/financial-apis\/api-for-historical-data-and-volumes\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-list-of-the-available-functions\">List of the available functions<\/h2>\n\n\n\n<p>Below is the list of functions to retrieve various data, including code examples and links to documentation containing descriptions of all parameters:<\/p>\n\n\n\n<figure class=\"wp-block-table\">\n    <table class=\"has-fixed-layout\">\n        <thead>\n            <tr>\n                <th class=\"has-text-align-left\" data-align=\"left\" style=\"width: 30%; font-size: 14px;\">Function &#038; description<\/th>\n                <th class=\"has-text-align-left\" data-align=\"left\" style=\"width: 70%; font-size: 12px;\">Code examples<\/th>\n            <\/tr>\n        <\/thead>\n        <tbody>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Live (Delayed) Stock Prices and Macroeconomic Data (<a href=\"https:\/\/eodhd.com\/financial-apis\/live-realtime-stocks-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_live_stock_prices &lt;- function(api_token, ticker, s = NULL)<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Bonds Fundamentals (<a href=\"https:\/\/eodhd.com\/financial-apis\/bonds-fundamentals-and-historical-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_bonds_fundamentals_data( api_token &lt;- \"demo\", isin &lt;- \"DE000CB83CF0\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Intraday Historical Data (<a href=\"https:\/\/eodhd.com\/financial-apis\/intraday-historical-data-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_intraday_historical_data( api_token &lt;- \"YOUR_API_TOKEN\", interval &lt;- \"5m\", from_unix_time &lt;- \"1627896900\", to_unix_time &lt;- \"1630575300\", symbol &lt;- \"AAPL.MX\")<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Historical Dividends (<a href=\"https:\/\/eodhd.com\/financial-apis\/api-splits-dividends\/#Historical_Dividends_API\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_historical_dividends_data( api_token &lt;- \"demo\", ticker &lt;- \"AAPL.US\", date_from &lt;- \"2017-09-10\", date_to &lt;- \"2017-09-12\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Historical Splits (<a href=\"https:\/\/eodhd.com\/financial-apis\/api-splits-dividends\/#Historical_Splits_API\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_historical_splits_data( api_token &lt;- \"demo\",  ticker &lt;- \"AAPL.US\",  date_from &lt;- \"2017-09-10\", date_to &lt;- \"2017-09-12\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Bulk API for EOD, Splits and Dividends (<a href=\"https:\/\/eodhd.com\/financial-apis\/bulk-api-eod-splits-dividends\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_bulk_eod_splits_dividends_data( api_token = \"demo\", country = 'US', type = 'splits', date = \"2010-09-21\", symbols = \"MSFT\", filter = \"extended\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Calendar. Upcoming Earnings, Trends, IPOs and Splits (<a href=\"https:\/\/eodhd.com\/financial-apis\/calendar-upcoming-earnings-ipos-and-splits\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_upcoming_earnings_data( api_token &lt;- \"demo\", from_date &lt;- \"2017-09-10\", to_date &lt;- \"2017-09-12\", symbols &lt;- \"AAPL\" )<br>get_earning_trends_data(  api_token = \"demo\",  symbols = \"AAPL.US\" ) # for Earnings trends<\/code><br><code>get_upcoming_IPOs_data( api_token &lt;- \"YOUR_API_TOKEN\", from_date &lt;- \"2017-09-10\", to_date &lt;- \"2017-09-12\" ) # for upcoming IPOs<\/code><br><code>get_upcoming_splits_data( api_token &lt;- \"YOUR_API_TOKEN\", from_date &lt;- \"2017-09-10\", to_date &lt;- \"2017-09-12\" ) # for upcoming splits<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Economic Events (<a href=\"https:\/\/eodhd.com\/financial-apis\/economic-events-data-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_economic_events_data( api_token &lt;- \"demo\", date_from &lt;- \"2017-09-10\", date_to &lt;- \"2017-09-12\", country &lt;- \"US\", comparison &lt;- \"qoq\", offset &lt;- \"0\", limit &lt;- \"50\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Stock Market and Financial News (<a href=\"https:\/\/eodhd.com\/financial-apis\/stock-market-financial-news-api\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">financial_news( api_token &lt;- \"demo\", s &lt;- \"balance sheet\", t &lt;- NULL, from_date &lt;- \"2017-09-10\", to_date &lt;- \"2017-09-12\", limit &lt;- \"50\", offset &lt;- \"100\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">End of the Day Historical Stock Market Data (<a href=\"https:\/\/eodhd.com\/financial-apis\/api-for-historical-data-and-volumes\/\">do<\/a><a href=\"https:\/\/eodhd.com\/financial-apis\/api-for-historical-data-and-volumes\/\" target=\"_blank\" rel=\"noreferrer noopener\">c<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_eod_historical_stock_market_data &lt;- function( api_token, symbol, from_date = NULL,<br>to_date = NULL, period = 'd', order = 'a' )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">List of supported Exchanges (<a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-list-of-tickers-and-trading-hours\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_list_of_exchanges( api_token &lt;- \"demo\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Insider Transactions (<a href=\"https:\/\/eodhd.com\/financial-apis\/insider-transactions-api\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_insider_transactions_data( api_token &lt;- \"demo\", date_from &lt;- \"2017-09-10\", date_to &lt;- \"2017-09-12\", code &lt;- \"AAPL.US\", limit &lt;- \"150\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Macro Indicators (<a href=\"https:\/\/eodhd.com\/financial-apis\/macroeconomics-data-and-macro-indicators-api\/\" target=\"_blank\" rel=\"noreferrer noopener\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_macro_indicators_data( api_token &lt;- \"YOUR_API_TOKEN\", country &lt;- \"USA\", indicator &lt;- \"gdp_current_usd\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Exchanges API. Trading Hours, Stock Market Holidays, Symbols Change History (<a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-trading-hours-and-stock-market-holidays\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_details_trading_hours_stock_market_holidays( api_token &lt;- \"YOUR_API_TOKEN\", code &lt;- \"US\", from_date &lt;- \"2017-09-10\", to_date &lt;- \"2017-09-12\") <\/code><br><code class=\"\">symbol_change_history(api_token &lt;- \"YOUR_API_TOKEN\", from_date &lt;- \"2023-01-01\", to_date &lt;- \"2023-12-31\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Stock Market Screener (<a href=\"https:\/\/eodhd.com\/financial-apis\/stock-market-screener-api\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">stock_market_screener( api_token &lt;- \"YOUR_API_TOKEN\",  sort &lt;- \"market_capitalization.desc\", filters &lt;- NULL, limit &lt;- \"1\", signals &lt;- \"bookvalue_neg\", offset &lt;- \"50\" )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Technical Indicator (<a href=\"https:\/\/eodhd.com\/financial-apis\/technical-indicators-api\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_technical_indicator_data( api_token &lt;- \"demo\", ticker &lt;- \"AAPL.US\", func &lt;- \"slope\", period &lt;- 100 )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Historical Market Capitalization (<a href=\"https:\/\/eodhd.com\/financial-apis\/historical-market-capitalization-api\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_historical_market_capitalization_data &lt;- function( api_token, ticker,<br>from_date = NULL,<br>to_date = NULL )<\/code><\/pre><\/td>\n            <\/tr>\n            <tr>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 14px;\">Fundamental Data: Stocks, ETFs, Mutual Funds, Indices and Cryptocurrencies (<a href=\"https:\/\/eodhd.com\/financial-apis\/stock-etfs-fundamental-data-feeds\/\">doc<\/a>)<\/td>\n                <td class=\"has-text-align-left\" data-align=\"left\" style=\"font-size: 12px;\"><pre class=\"wp-block-code\"><code class=\"\">get_fundamentals_data( api_token &lt;- \"demo\", ticker &lt;- \"AAPL.US\" )<\/code><\/pre><\/td>\n            <\/tr>\n        <\/tbody>\n    <\/table>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-direct-eodhd-request-call-in-r-enviroment\">Direct EODHD request call in R enviroment<\/h2>\n\n\n\n<p>In the following example, we use direct EODHD API request without pre-installed library and it&#8217;s functions. Plus this time, we request result as .csv file.<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">api.token &lt;- \"YOUR_API_KEY_HERE\"\nsymbol &lt;- \"AAPL.US\"\nticker.link &lt;- paste(\"http:\/\/nonsecure.eodhd.com\/api\/eod\/\", symbol, \"?api_token=\", api.token, \"&amp;period=m&amp;order=d\", sep=\"\")\ndata &lt;- read.csv(url(ticker.link))\nhead(data)<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>If you run the code in&nbsp;<a href=\"https:\/\/www.rstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">RStudio<\/a>&nbsp;(or any other software for R), you will get the following output:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"597\" height=\"142\" src=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/02\/r-output.png\" alt=\"\" class=\"wp-image-6571\"\/><\/figure>\n<\/div>\n\n\n<p>Experience is similair to Yahoo Finance, only instead of:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-black-color has-cyan-bluish-gray-background-color has-text-color has-background has-link-color wp-elements-9f26d2335716b8a6e74a463e9c4032fd\"><code class=\"\"><strong>http:\/\/ichart.finance.yahoo.com\/table.csv\u2026..<\/strong><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>we do:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code has-black-color has-cyan-bluish-gray-background-color has-text-color has-background has-link-color wp-elements-0000cdb658b1ef33f7e93b5fd0ab2cee\"><code class=\"\"><strong>http:\/\/nonsecure.eodhd.com\/api\/table.csv<\/strong><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Don&#8217;t forget to add your API key an additional parameter.<\/p>\n\n\n\n<p>We recommend to use&nbsp;<strong>HTTP<\/strong>&nbsp;instead of&nbsp;<strong>HTTPS<\/strong>&nbsp;for R language.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-more-on-eodhd-api\">More on EODHD API<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Documentation for all types of EODHD API is <a href=\"https:\/\/eodhd.com\/financial-apis\/\">here<\/a><\/li>\n\n\n\n<li>Academy section with useful materials on data analysis and trading is <a href=\"https:\/\/eodhd.com\/financial-academy\/\">here<\/a><\/li>\n\n\n\n<li>Python, PHP, Curl EODHD Libraries are <a href=\"https:\/\/eodhd.com\/financial-apis\/category\/excel-python-php-laravel-java-matlab-examples\/\">here<\/a><\/li>\n\n\n\n<li>Our Github is <a href=\"https:\/\/github.com\/EodHistoricalData\/EODHD-APIs-R-Financial-Library\">here<\/a><\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Sign up &amp; Get Data<\/span><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important!\u00a0Since we have introduced a new version of the R library for EODHD functions, the current library is no longer supported on CRAN and has been replaced by the new library (eodhdR2). The current library is still available via our GitHub. R is an open-source programming language that has gained immense popularity in the data [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":4485,"comment_status":"closed","ping_status":"closed","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":[],"coding-language":[],"ready-to-go-solution":[],"qualification":[],"financial-apis-category":[],"financial-apis-manuals":[],"class_list":["post-6392","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-excel-python-php-laravel-java-matlab-examples","has_thumb"],"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 for Financial Data | EODHD APIs Documentation<\/title>\n<meta name=\"description\" content=\"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.\" \/>\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-for-financial-data-by-eodhd\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"R Library for Financial Data\" \/>\n<meta property=\"og:description\" content=\"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\" \/>\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-02-16T12:37:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-04T08:43:35+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=\"GlebEODHD\" \/>\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=\"GlebEODHD\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 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-for-financial-data-by-eodhd#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\"},\"author\":{\"name\":\"GlebEODHD\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/a08d0c5b2afbd8fabeef1e976f1cd85d\"},\"headline\":\"R Library for Financial Data\",\"datePublished\":\"2024-02-16T12:37:35+00:00\",\"dateModified\":\"2024-09-04T08:43:35+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\"},\"wordCount\":768,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#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-for-financial-data-by-eodhd\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\",\"name\":\"R Library for Financial Data | EODHD APIs Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png\",\"datePublished\":\"2024-02-16T12:37:35+00:00\",\"dateModified\":\"2024-09-04T08:43:35+00:00\",\"description\":\"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#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-for-financial-data-by-eodhd#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-apis\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"R Library for Financial Data\"}]},{\"@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\/a08d0c5b2afbd8fabeef1e976f1cd85d\",\"name\":\"GlebEODHD\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g\",\"caption\":\"GlebEODHD\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"R Library for Financial Data | EODHD APIs Documentation","description":"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.","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-for-financial-data-by-eodhd","og_locale":"en_US","og_type":"article","og_title":"R Library for Financial Data","og_description":"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.","og_url":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd","og_site_name":"Stock Price Data, Financial and Stock Market API","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2024-02-16T12:37:35+00:00","article_modified_time":"2024-09-04T08:43:35+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":"GlebEODHD","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"GlebEODHD","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd"},"author":{"name":"GlebEODHD","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/a08d0c5b2afbd8fabeef1e976f1cd85d"},"headline":"R Library for Financial Data","datePublished":"2024-02-16T12:37:35+00:00","dateModified":"2024-09-04T08:43:35+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd"},"wordCount":768,"publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#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-for-financial-data-by-eodhd","url":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd","name":"R Library for Financial Data | EODHD APIs Documentation","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2017\/07\/R-Language-Stock-API-Example.png","datePublished":"2024-02-16T12:37:35+00:00","dateModified":"2024-09-04T08:43:35+00:00","description":"Learn how to set up your environment, install the EODHD APIs R Language Financial Library, and access real-time and historical data.","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/r-library-for-financial-data-by-eodhd#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-for-financial-data-by-eodhd#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-apis"},{"@type":"ListItem","position":2,"name":"R Library for Financial Data"}]},{"@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\/a08d0c5b2afbd8fabeef1e976f1cd85d","name":"GlebEODHD","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1e7c24fd2fa413c9bbd20948dc2d4beb0104893a2e2363b2b10c21e43ac78a3?s=96&d=mm&r=g","caption":"GlebEODHD"}}]}},"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-1F6","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/6392","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\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/comments?post=6392"}],"version-history":[{"count":46,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/6392\/revisions"}],"predecessor-version":[{"id":7212,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/6392\/revisions\/7212"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media\/4485"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media?parent=6392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/categories?post=6392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/tags?post=6392"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/coding-language?post=6392"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/ready-to-go-solution?post=6392"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/qualification?post=6392"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/financial-apis-category?post=6392"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/financial-apis-manuals?post=6392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}