perform_request: Perform a request to the Financial Modeling Prep API

View source: R/fmp_get.R

perform_requestR Documentation

Perform a request to the Financial Modeling Prep API

Description

This function sends a request to the Financial Modeling Prep (FMP) API based on the specified resource and additional query parameters. It constructs the request URL using the base API URL and the specified version, and it automatically includes the API key from the environment.

Usage

perform_request(
  resource,
  params,
  base_url = "https://financialmodelingprep.com/api/",
  api_version = "v3"
)

Arguments

resource

The specific API resource to be accessed, such as a stock symbol or financial endpoint.

params

Additional query parameters to be included in the API request.

base_url

The base URL for the FMP API. Defaults to "https://financialmodelingprep.com/api/".

api_version

The version of the FMP API to use. Defaults to "v3".

Value

A parsed JSON response from the FMP API.


fmpapi documentation built on April 3, 2025, 6:14 p.m.