-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
110 lines (83 loc) · 6.33 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
---
title: "intrinoR"
author: "Bruce C. Schardt"
date: "7/2/2019"
output: md_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## intrinoR
An R language wrapper for the [INTRINO](https://intrino.com) market data Api.
You will need an account and api keys, [signup](https://intrinio.com/signup) for a free starter account.
## Installation
To install as a dependancy into your project at the R REPL command prompt
```r
install.github("schardtbc/intrinoR")
```
then in your .env or .Renviron file add the following keys
```
INTRINO_BASE_URL = "https://api-v2.intrinio.com"
INTRINO_PRODUCTION_KEY = "your production key here"
INTRINO_SANDBOX_KEY = " your sandbox key here"
INTRINO_API_VERSION = "v2"
# use production and snadbox keys from your intrino account
# make sure the .env file is in your .gitignore file
# do not hard code the keys into your application code
# do not upload the keys to github.
# you can easily change the keys at intrino.com if they become compromised
```
[Api documentation](https://docs.intrinio.com/documentation/api_v2/getting_started) documentation.
## Usage Example
```{r}
library(intrinoR)
useSandbox()
# useProduction()
res <- getSecurityStockPrices("AAPL", opts = list(start_date = "2019-01-01"))
res
```
### Companies
| | Endpoint | function call |
|-----|:----------------------------------------------|:-------------------------------------------------------------------|
| [X] | /companies | [`getAllCompanies`](/doc/getAllCompanies.md) |
| [ ] | /companies/search | |
| [X] | /companies/{identifier} | [`getCompany`](/doc/getCompany.md) |
| [X] | /companies/{identifier}/securties | [`getCompanySecurities`](/doc/getCompanySecurities.md) |
| [X] | /companies/{identifier}/news | [`getCompanyNews`](/doc/getCompanyNews.md) |
| [X] | /company/{identifier}/fundamentals | [`getCompanyFundamentals`](/doc/getCompanyFundamentals.md) |
| [X] | /company/{identifier/filings} | [`getCompanyFilings`](/doc/getCompanyFilings.md) |
| [X] | /company/{identifier}/data_point/{tag}/number | [`getCompanyDataPointNumber`](/doc/getCompanyDataPointNumber.md) |
| [X] | /company/{identifier}/data_point/{tag}/text | [`getCompanyDataPointText`](/doc/getCompanyDataPointText.md) |
| [X] | /company/{identifier}/historical_data/{tag} | [`getCompanyDataPointHistory`](/doc/getCompanyDataPointHistory.md) |
### Securities
| | Endpoint | function call |
|-----|:----------------------------------------------|:-------------------------------------------------------------------|
| [X] | /securities | [`getAllSecurities`](/doc/getAllSecurities.md) |
| [X] | /securities/{identifier} | [`getSecurityById`](/doc/getSecurityById.md) |
| [X] | /securities/{identifier}/prices | [`getSecurityStockPrices`](/doc/getSecurityStockPrices.md) |
| [X] | /securities/{identifier}/prices/realtime | [`getSecurityRealtimePrice`](/doc/getSecurityRealtimePrice.md) |
| [X] | /securities/{identifier}/prices/intraday | [`getSecurityIntradayPrices`](/doc/getSecurityIntradayPrices.md) |
| [X] | /securities/{identifier}/dividends/latest | [`getSecurityDividendsLatest`](/doc/getSecurityDividendsLatest.md) |
| [X] | /securities/{identifier}/earnings/latest | [`getSecurityEarningsLatest`](/doc/getSecurityEarningsLatest.md) |
| [X] | /securities/{identifier}/zacks/analyst_ratings/snapshot | [`getSecurityZacksAnalystRatingsSnapshot`](/doc/getSecurityZacksAnalystRatingsSnapshot.md) |
| [X] | /securities/{identifier}/data_point/{tag}/number | [`getSecurityDataPointNumber`](/doc/getSecurityDataPointNumber.md) |
| [X] | /securities/{identifier}/data_point/{tag}/text | [`getSecurityDataPointText`](/doc/getSecurityDataPointText.md) |
| [X] | /securities/{identifier}/historical_data/{tag} | [`getSecurityDataPointHistory`](/doc/getSecurityDataPointHistory.md) |
### Fundamentals
| | Endpoint | function call |
|-----|:----------------------------------------------|:-------------------------------------------------------------------|
| [X] | /fundamentals/lookup/{identifier}/{statement_code}/{fiscal_year}/{fiscal_period} | [`lookupFundamental`](/doc/lookupFundamental.md) |
| [X] | /fundamentals/{id} | [`getFundamentalById`](/doc/getFundamentalById.md) |
| [X] | /fundamentals/{id}/standardized_financials | [`getStandardizedFinancials`](/doc/getStandardizedFinancials.md) |
| [X] | /fundamentals/{id}/standardized_financials | [`getStandardizedFinancialsTable`](/doc/getStandardizedFinancialsTable.md) |
| [X] | /fundamentals/{id}/reported_financials | [`getReportedFinancials`](/doc/getReportedFinancials.md) |
| [X] | /fundamentals/{id}/reported_financials | [`getReportedFinancialsTable`](/doc/getReportedFinancialsTable.md) |
### Indices
| | Endpoint | function call |
|-----|:-----------------------------------------------------|:--------------------------------------------------------------|
| [X] | /indices/stock_market | [`getAllStockMarketIndicies`](/doc/getAllStockMarketIndicies.md) |
| [X] | /indices/economic | [`getAllEconomicIndicies`](/doc/getAllEconomicIndicies.md) |
| [X] | /indices/sic | [`getAllSicIndicies`](/doc/getAllSicIndicies.md) |
| [X] | /indices/{type}/{identifier}/data_point/{tag}/number | [`getIndicesDataPointNumber`](/doc/getIndicesDataPointNumber.md) |
| [X] | /indices/{type}/{identifier}/data_point/{tag}/text | [`getIndicesDataPointText`](/doc/getIndicesDataPointText.md) |
| [X] | /indices/{type}/{identifier}/historical_data/{tag} | [`getIndicesDataPointHistory`](/doc/getIndicesDataPointHistory.md) |