fmpc_get_url: GET Request for specific URL

Description Usage Arguments Details Value Examples

View source: R/setup.R

Description

FMP helper function that takes a URL, appends the API Token, makes a GET call, and parses the data

Usage

1
fmpc_get_url(URL, api_version = "3")

Arguments

URL

The URL to pull specific data from FMP Cloud. Search parameters should be included, but not the API key. Start with the URL after 'api/v3'

api_version

The API version of the URL. FMP is constantly updating their API and new URLs may be under anew version

Details

This function is a helper in most other fmpcloudr functions, so does not need to be used by the end user. That being said, FMP is always adding data with new URLs. If this package does not have a URL available on FMP, this function can be used to simplify the GET call. Pass the URL appearing after 'api/v3' with the search parameters entered, but do not include the API token

Value

list output of data set

Examples

1
2
3
4
5
6
7
8
## Not run: 
# Set the FMP Token. The DEMO token has VERY limited access.
fmpc_set_token('demo')

# Pull price history for Apple
AppleHist = fmpc_get_url('historical-price-full/AAPL?serietype=line&')

## End(Not run)

fmpcloudr documentation built on March 2, 2021, 1:06 a.m.