R/rintrinio.R
gather_stock_time_series.Rd
Given the ticker, start date, and end date, return from the Intrinio API stock data for that time frame in either a dictionary or a pandas dataframe format.
gather_stock_time_series( api_key, ticker, start_date = "", end_date = "", allow_max_rows = FALSE )
api_key | character API key (sandbox or production) from Intrinio |
---|---|
ticker | character the ticker symbol you would like to get stock data for |
start_date | character optional the earliest date in the format of " e.g. "2019-12-31" to get data for |
end_date | character optional the most recent date in the format of " e.g. "2019-12-31" to get data for |
allow_max_rows | boolean optional if False, then only 100 rows will show in the output, otherwise up to 10000 rows will show (based on dates) |
a dataframe that contains stock data for the specified timeframe
gather_stock_time_series('OjhlMjhjNTBmY2IyMWJiMWE0MTExYjQwNWZmZTVkZWM1', 'AAPL', "2017-12-31", "2019-03-01")#> date intraperiod frequency open high low close volume #> 1 2019-03-01 FALSE daily 174.28 175.1500 172.8900 174.97 25886167 #> 2 2019-02-28 FALSE daily 174.32 174.9100 172.9200 173.15 28215416 #> 3 2019-02-27 FALSE daily 173.21 175.0000 172.7300 174.87 27835389 #> 4 2019-02-26 FALSE daily 173.71 175.3000 173.1732 174.33 17070211 #> 5 2019-02-25 FALSE daily 174.16 175.8700 173.9500 174.23 21873358 #> 6 2019-02-22 FALSE daily 171.58 173.0000 171.3800 172.97 18913154 #> 7 2019-02-21 FALSE daily 171.80 172.3700 170.3000 171.06 17249670 #> 8 2019-02-20 FALSE daily 171.19 173.3200 170.9900 172.03 26114362 #> 9 2019-02-19 FALSE daily 169.71 171.4400 169.4900 170.93 18972826 #> 10 2019-02-15 FALSE daily 171.25 171.7000 169.7500 170.42 24626814 #> 11 2019-02-14 FALSE daily 169.71 171.2615 169.3800 170.80 21835747 #> 12 2019-02-13 FALSE daily 171.39 172.4800 169.9200 170.18 22490233 #> 13 2019-02-12 FALSE daily 170.10 171.0000 169.7000 170.89 22283523 #> 14 2019-02-11 FALSE daily 171.05 171.2100 169.2500 169.43 20993425 #> 15 2019-02-08 FALSE daily 168.99 170.6600 168.4200 170.41 23819966 #> 16 2019-02-07 FALSE daily 172.40 173.9400 170.3400 170.94 31741690 #> 17 2019-02-06 FALSE daily 174.65 175.5700 172.8531 174.24 28239591 #> 18 2019-02-05 FALSE daily 172.86 175.0800 172.3501 174.18 36101628 #> 19 2019-02-04 FALSE daily 167.41 171.6550 167.2800 171.25 31495582 #> 20 2019-02-01 FALSE daily 166.96 168.9800 165.9300 166.52 32668138 #> 21 2019-01-31 FALSE daily 166.11 169.0000 164.5600 166.44 40739649 #> 22 2019-01-30 FALSE daily 163.25 166.1500 160.2300 165.25 61109780 #> 23 2019-01-29 FALSE daily 156.25 158.1300 154.1100 154.68 41587239 #> 24 2019-01-28 FALSE daily 155.79 156.3300 153.6600 156.30 26192058 #> 25 2019-01-25 FALSE daily 155.48 158.1300 154.3200 157.76 33547893 #> 26 2019-01-24 FALSE daily 154.11 154.4800 151.7400 152.70 25441549 #> 27 2019-01-23 FALSE daily 154.15 155.1400 151.7000 153.92 23130570 #> 28 2019-01-22 FALSE daily 156.41 156.7300 152.6200 153.30 30393970 #> 29 2019-01-18 FALSE daily 157.50 157.8800 155.9806 156.82 33751023 #> 30 2019-01-17 FALSE daily 154.20 157.6600 153.2600 155.86 29821160 #> 31 2019-01-16 FALSE daily 153.08 155.8800 153.0000 154.94 30569706 #> 32 2019-01-15 FALSE daily 150.27 153.3900 150.0500 153.07 28710324 #> 33 2019-01-14 FALSE daily 150.85 151.2700 149.2200 150.00 32439186 #> 34 2019-01-11 FALSE daily 152.88 153.7000 151.5100 152.29 27023241 #> 35 2019-01-10 FALSE daily 152.50 153.9700 150.8600 153.80 35780670 #> 36 2019-01-09 FALSE daily 151.29 154.5300 149.6300 153.31 45099081 #> 37 2019-01-08 FALSE daily 149.56 151.8200 148.5200 150.75 41025314 #> 38 2019-01-07 FALSE daily 148.70 148.8300 145.9000 147.93 54777764 #> 39 2019-01-04 FALSE daily 144.53 148.5499 143.8000 148.26 58607070 #> 40 2019-01-03 FALSE daily 143.98 145.7200 142.0000 142.19 91312195 #> 41 2019-01-02 FALSE daily 154.89 158.8500 154.2300 157.92 37039737 #> 42 2018-12-31 FALSE daily 158.53 159.3600 156.4800 157.74 35003466 #> 43 2018-12-28 FALSE daily 157.50 158.5200 154.5500 156.23 42291424 #> 44 2018-12-27 FALSE daily 155.84 156.7700 150.0700 156.15 53117065 #> 45 2018-12-26 FALSE daily 148.30 157.2300 146.7200 157.17 58582544 #> 46 2018-12-24 FALSE daily 148.15 151.5500 146.5900 146.83 37169232 #> 47 2018-12-21 FALSE daily 156.86 158.1600 149.6300 150.73 95744384 #> 48 2018-12-20 FALSE daily 160.40 162.1100 155.3000 156.83 64772960 #> 49 2018-12-19 FALSE daily 166.00 167.4500 159.0900 160.89 49047297 #> 50 2018-12-18 FALSE daily 165.38 167.5300 164.3900 166.07 33841518 #> 51 2018-12-17 FALSE daily 165.45 168.3500 162.7300 163.94 44287922 #> 52 2018-12-14 FALSE daily 169.00 169.0800 165.2800 165.48 40703710 #> 53 2018-12-13 FALSE daily 170.49 172.5700 169.5500 170.95 31897827 #> 54 2018-12-12 FALSE daily 170.40 171.9200 169.0200 169.10 35627674 #> 55 2018-12-11 FALSE daily 171.66 171.7900 167.0000 168.63 47281665 #> 56 2018-12-10 FALSE daily 165.00 170.0900 163.3300 169.60 62025994 #> 57 2018-12-07 FALSE daily 173.49 174.4900 168.3000 168.49 42281631 #> 58 2018-12-06 FALSE daily 171.76 174.7800 170.4200 174.72 43098410 #> 59 2018-12-04 FALSE daily 180.95 182.3899 176.2700 176.69 41344282 #> 60 2018-12-03 FALSE daily 184.46 184.9400 181.2100 184.82 40798002 #> 61 2018-11-30 FALSE daily 180.29 180.3300 177.0300 178.58 39531549 #> 62 2018-11-29 FALSE daily 182.66 182.8000 177.7000 179.55 41769992 #> 63 2018-11-28 FALSE daily 176.73 181.2900 174.9300 180.94 46062539 #> 64 2018-11-27 FALSE daily 171.51 174.7700 170.8800 174.24 41387377 #> 65 2018-11-26 FALSE daily 174.24 174.9500 170.2600 174.62 44998520 #> 66 2018-11-23 FALSE daily 174.94 176.5950 172.1000 172.29 23623972 #> 67 2018-11-21 FALSE daily 179.73 180.2700 176.5500 176.78 31124210 #> 68 2018-11-20 FALSE daily 178.37 181.4700 175.5100 176.98 67825247 #> 69 2018-11-19 FALSE daily 190.00 190.7000 184.9900 185.86 41920872 #> 70 2018-11-16 FALSE daily 190.50 194.9695 189.4600 193.53 36928253 #> 71 2018-11-15 FALSE daily 188.39 191.9700 186.9000 191.41 46478801 #> 72 2018-11-14 FALSE daily 193.90 194.4800 185.9300 186.80 60800957 #> 73 2018-11-13 FALSE daily 191.63 197.1800 191.4501 192.23 46882936 #> 74 2018-11-12 FALSE daily 199.00 199.8500 193.7900 194.17 51135518 #> 75 2018-11-09 FALSE daily 205.55 206.0100 202.2500 204.47 34365750 #> 76 2018-11-08 FALSE daily 209.98 210.1200 206.7500 208.49 25362636 #> 77 2018-11-07 FALSE daily 205.97 210.0600 204.1300 209.95 33424434 #> 78 2018-11-06 FALSE daily 201.92 204.7200 201.6900 203.77 31882881 #> 79 2018-11-05 FALSE daily 204.30 204.3900 198.1700 201.59 66163669 #> 80 2018-11-02 FALSE daily 209.55 213.6500 205.4300 207.48 91328654 #> 81 2018-11-01 FALSE daily 219.05 222.3600 216.8100 222.22 58323180 #> 82 2018-10-31 FALSE daily 216.88 220.4500 216.6200 218.86 38358933 #> 83 2018-10-30 FALSE daily 211.15 215.1800 209.2700 213.30 36659990 #> 84 2018-10-29 FALSE daily 219.19 219.6900 206.0900 212.24 45935520 #> 85 2018-10-26 FALSE daily 215.90 220.1900 212.6700 216.30 47258375 #> 86 2018-10-25 FALSE daily 217.71 221.3800 216.7500 219.80 29855768 #> 87 2018-10-24 FALSE daily 222.60 224.2300 214.5400 215.09 40925163 #> 88 2018-10-23 FALSE daily 215.83 223.2500 214.7000 222.73 38767846 #> 89 2018-10-22 FALSE daily 219.79 223.3600 218.9400 220.65 28792082 #> 90 2018-10-19 FALSE daily 218.06 221.2600 217.4300 219.31 33078726 #> 91 2018-10-18 FALSE daily 217.86 219.7400 213.0000 216.02 32581315 #> 92 2018-10-17 FALSE daily 222.30 222.6400 219.3400 221.19 22885397 #> 93 2018-10-16 FALSE daily 218.93 222.9900 216.7627 222.15 29183963 #> 94 2018-10-15 FALSE daily 221.16 221.8300 217.2700 217.36 30791007 #> 95 2018-10-12 FALSE daily 220.42 222.8800 216.8400 222.11 40337851 #> 96 2018-10-11 FALSE daily 214.52 219.5000 212.3200 214.45 53124392 #> 97 2018-10-10 FALSE daily 225.46 226.3500 216.0500 216.36 41990554 #> 98 2018-10-09 FALSE daily 223.64 227.2700 222.2462 226.87 26891029 #> 99 2018-10-08 FALSE daily 222.21 224.8000 220.2000 223.77 29663923 #> 100 2018-10-05 FALSE daily 227.96 228.4100 220.5800 224.29 33580463 #> adj_open adj_high adj_low adj_close adj_volume #> 1 172.0283 172.8871 170.6563 172.7094 25886167 #> 2 172.0678 172.6502 170.6859 170.9129 28215416 #> 3 170.9721 172.7390 170.4983 172.6107 27835389 #> 4 171.4657 173.0351 170.9358 172.0777 17070211 #> 5 171.9099 173.5978 171.7026 171.9790 21873358 #> 6 169.3632 170.7648 169.1658 170.7352 18913154 #> 7 169.5804 170.1430 168.0997 168.8499 17249670 #> 8 168.9782 171.0807 168.7808 169.8074 26114362 #> 9 167.5174 169.2250 167.3002 168.7216 18972826 #> 10 169.0375 169.4816 167.5568 168.2182 24626814 #> 11 167.5174 169.0488 167.1916 168.5933 21835747 #> 12 169.1756 170.2516 167.7246 167.9813 22490233 #> 13 167.9023 168.7907 167.5075 168.6821 22283523 #> 14 168.8400 168.9980 167.0633 167.2410 20993425 #> 15 166.8067 168.4551 166.2440 168.2083 23819966 #> 16 169.4459 170.9595 167.4212 168.0109 31741690 #> 17 171.6573 172.5616 169.8912 171.2543 28239591 #> 18 169.8980 172.0800 169.3968 171.1954 36101628 #> 19 164.5414 168.7136 164.4136 168.3156 31495582 #> 20 164.0991 166.0845 163.0867 163.6666 32668138 #> 21 163.2637 166.1041 161.7402 163.5880 40739649 #> 22 160.4527 163.3030 157.4844 162.4184 61109780 #> 23 153.5726 155.4204 151.4693 152.0295 41587239 #> 24 153.1205 153.6512 151.0270 153.6218 26192058 #> 25 152.8158 155.4204 151.6757 155.0567 33547893 #> 26 151.4693 151.8329 149.1399 150.0834 25441549 #> 27 151.5086 152.4816 149.1006 151.2825 23130570 #> 28 153.7299 154.0444 150.0048 150.6732 30393970 #> 29 154.8012 155.1747 153.3078 154.1328 33751023 #> 30 151.5577 154.9585 150.6338 153.1893 29821160 #> 31 150.4569 153.2090 150.3783 152.2851 30569706 #> 32 147.6951 150.7616 147.4789 150.4471 28710324 #> 33 148.2651 148.6779 146.6631 147.4297 32439186 #> 34 150.2604 151.0663 148.9138 149.6805 27023241 #> 35 149.8869 151.3317 148.2750 151.1646 35780670 #> 36 148.6976 151.8821 147.0660 150.6830 45099081 #> 37 146.9972 149.2185 145.9751 148.1669 41025314 #> 38 146.1520 146.2798 143.4000 145.3952 54777764 #> 39 142.0534 146.0045 141.3359 145.7195 58607070 #> 40 141.5129 143.2230 139.5668 139.7535 91312195 #> 41 152.2359 156.1281 151.5872 155.2140 37039737 #> 42 155.8135 156.6293 153.7987 155.0371 35003466 #> 43 154.8012 155.8037 151.9017 153.5530 42291424 #> 44 153.1696 154.0837 147.4985 153.4743 53117065 #> 45 145.7588 154.5358 144.2059 154.4768 58582544 #> 46 145.6114 148.9531 144.0781 144.3140 37169232 #> 47 154.1722 155.4499 147.0660 148.1472 95744384 #> 48 157.6515 159.3322 152.6389 154.1427 64772960 #> 49 163.1555 164.5807 156.3639 158.1331 49047297 #> 50 162.5462 164.6593 161.5731 163.2243 33841518 #> 51 162.6150 165.4653 159.9416 161.1308 44287922 #> 52 166.1041 166.1828 162.4479 162.6445 40703710 #> 53 167.5686 169.6130 166.6447 168.0207 31897827 #> 54 167.4801 168.9741 166.1238 166.2024 35627674 #> 55 168.7186 168.8463 164.1384 165.7405 47281665 #> 56 162.1727 167.1755 160.5313 166.6939 62025994 #> 57 170.5172 171.5001 165.4161 165.6029 42281631 #> 58 168.8168 171.7851 167.4998 171.7261 43098410 #> 59 177.8494 179.2646 173.2496 173.6624 41344282 #> 60 181.2992 181.7710 178.1049 181.6531 40798002 #> 61 177.2007 177.2400 173.9965 175.5200 39531549 #> 62 179.5301 179.6677 174.6551 176.4734 41769992 #> 63 173.7017 178.1835 171.9325 177.8395 46062539 #> 64 168.5711 171.7753 167.9519 171.2543 41387377 #> 65 171.2543 171.9522 167.3425 171.6278 44998520 #> 66 171.9424 173.5690 169.1510 169.3378 23623972 #> 67 176.6503 177.1810 173.5248 173.7508 31124210 #> 68 175.3136 178.3605 172.5026 173.9474 67825247 #> 69 186.7443 187.4323 181.8201 182.6752 41920872 #> 70 187.2357 191.6286 186.2135 190.2138 36928253 #> 71 185.1619 188.6805 183.6974 188.1301 46478801 #> 72 190.5775 191.1475 182.7440 183.5991 60800957 #> 73 188.3464 193.8013 188.1695 188.9361 46882936 #> 74 195.5901 196.4255 190.4694 190.8428 51135518 #> 75 202.0278 202.4800 198.7844 200.9663 34365750 #> 76 206.3819 206.5195 203.2073 204.9175 25362636 #> 77 201.7368 205.7427 199.9346 205.6350 33424434 #> 78 197.7700 200.5124 197.5447 199.5820 31882881 #> 79 200.1011 200.1892 194.0971 197.4468 66163669 #> 80 205.2432 209.2589 201.2079 203.2157 91328654 #> 81 214.5479 217.7899 212.3540 217.6528 58323180 #> 82 212.4225 215.9192 212.1679 214.3618 38358933 #> 83 206.8103 210.7575 204.9689 208.9161 36659990 #> 84 214.6850 215.1748 201.8543 207.8779 45935520 #> 85 211.4627 215.6645 208.2991 211.8544 47258375 #> 86 213.2355 216.8300 212.2952 215.2825 29855768 #> 87 218.0250 219.6215 210.1306 210.6693 40925163 #> 88 211.3941 218.6616 210.2873 218.1523 38767846 #> 89 215.2727 218.7693 214.4402 216.1150 28792082 #> 90 213.5783 216.7125 212.9612 214.8026 33078726 #> 91 213.3824 215.2237 208.6223 211.5802 32581315 #> 92 217.7311 218.0641 214.8320 216.6439 22885397 #> 93 214.4304 218.4069 212.3076 217.5842 29183963 #> 94 216.6146 217.2708 212.8045 212.8927 30791007 #> 95 215.8898 218.2992 212.3833 217.5450 40337851 #> 96 210.1110 214.9887 207.9562 210.0425 53124392 #> 97 220.8262 221.6979 211.6096 211.9132 41990554 #> 98 219.0436 222.5990 217.6784 222.2072 26891029 #> 99 217.6430 220.1797 215.6743 219.1709 29663923 #> 100 223.2748 223.7156 216.0465 219.6802 33580463