Skip to content

Financial Modeling Prep API Client

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

tidy-finance/r-fmpapi

Repository files navigation

fmpapi

License: MIT

Overview

fmpapi is an R package that provides a simple interface to the Financial Modeling Prep (FMP) API. With this package, you can easily retrieve financial data such as company profiles, balance sheet statements, income statements, and cash flow statements. The package returns data as tidy data frames, with snake_case column names, making it easier to integrate into your data analysis workflows.

Installation

Currently, fmpapi is not on CRAN. You can install the development version from GitHub:

pak::pak("tidy-finance/r-fmpapi")

Setup

Before using the package, you need to set your Financial Modeling Prep API key. You can set it using the set_fmp_api_key() function, which saves the key to your .Renviron file for future use.

library(fmpapi)

set_fmp_api_key()

Usage

Fetching Company Profiles

You can retrieve a company’s profile by providing its stock symbol:

get_company_profile("AAPL")

Fetching Balance Sheet Statements

To retrieve the balance sheet statements for a company, use the get_balance_sheet_statements() function. You can specify whether to retrieve annual or quarterly data and the number of records.

get_balance_sheet_statements("AAPL", period = "annual", limit = 5)

Fetching Income Statements

The get_income_statements() function allows you to retrieve income statements for a specific stock symbol. You can specify the period and the limit of records to return.

get_income_statements("MSFT", period = "annual", limit = 5)

Fetching Cash Flow Statements

You can fetch cash flow statements using the get_cash_flow_statements() function, specifying the period and the number of records to retrieve.

get_cash_flow_statements("TSLA", period = "annual", limit = 5)

Contributing

Feel free to open issues or submit pull requests to improve the package. Contributions are welcome!

License

This package is licensed under the MIT License.

About

Financial Modeling Prep API Client

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages