
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
awesomebot-fmp
Advanced tools
This module is a node wrapper for the free [Financial Modeling Prep API](https://financialmodelingprep.com/developer/docs). This node application implements almost all aspects of the FMP API.
This module is a node wrapper for the free Financial Modeling Prep API. This node application implements almost all aspects of the FMP API.
The FMP API offers different types of data ranging from stock prices and historical data to financial statements and market performance. The complete API documentation is available here.
This API is perfect for someone who loves to dabble with financial data as a hobby and incorporate it into other projects.
I have no affiliation with FinancialModelingPrep and its web API development.
npm install --save financialmodelingprep
To use this module first create an account with FinancialModelingPrep and retrieve your API key.
const fmp = require('financialmodelingprep')(apikey)
// Simple Examples
// API route: /quote/AAPL
fmp.stock('aapl').quote().then(response => console.log(response));
//API route: /quote/AAPL,MSFT
fmp.stock(['AAPL', 'MSFT']).quote().then(response => console.log(response));
// API route: /stock/sectors-performance
fmp.market.sector_performance().then(response => console.log(response));
// API route: /quote/USDEUR
fmp.forex('USD', 'EUR').rate().then(response => console.log(response));
Keep in mind most of the web API breakdown and routes closely follow the structure of the node functions.
Accessed through fmp.stock({ticker}).{method_name}*
profile() // /profile
quote() // /quote
rating() // /company/rating
current_price() // /stock/real-time-price
history({start_date, end_date, limit, type} = {}) // /historical-price-full/{ticker}?{opts}
dividend_history({start_date, end_date, limit, type} = {}) // /historical-price-full/stock_dividend/{ticker}?{opts}
split_history({start_date, end_date, limit, type} = {}) // /historical-price-full/stock_split/{ticker}?{opts}
financial.income(period = 'annual') // /financials/income-statement
financial.balancesheet(period = 'annual') // /financials/balance-sheet-statement
financial.cashflow(period = 'annual') // /financials/cash-flow-statement
financial.metrics(period = 'annual') // /company-key-metrics
financial.growth(period = 'annual') // /financial-statement-growth
financial.ratios() // /financial-ratios
* The stock
parameter can either be pased as a string or an array of market tickers. These tickers can be found either by running search based on corporation name.
Accessed through fmp.market.{method_name}
most_active() // /stock/actives
most_gainer() // /stock/gainers
most_loser() // /stock/losers
sector_performance() // /stock/sectors-performance
trading_hours() // /is-the-market-open
index.list() // /symbol/available-indexes
index.quote(stock = 'all')* // /quote
index.history(stock, { start_date, end_date, data_type, limit } = {})* // /historical-price-full/index/{ticker}?{opts}
* The stock
parameter can either be pased as a string or an array of market tickers. These tickers can be found either by running search based on corporation name or through the list
function
Accessed through fmp.search()
search(keywords, limit = 10, exchange) // /search?{opts}
Accessed through `fmp.etf.{method_name}
stocknews() // /symbol/available-etfs
quote(stock = 'all') * // /quote
history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/etf/{ticker}?{opts}
dividend_history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/stock_dividend/{ticker}?{opts}
split_history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/stock_split/{ticker}?{opts}
* The stock
parameter can either be pased as a string or an array of market tickers. These tickers can be found either by running search based on corporation name or through the list
function
Accessed through fmp.mutualfund.{method_name}
stocknews() // /symbol/available-mutual-funds
quote(stock = 'all') * // /quote
history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/mutual_fund/{ticker}?{opts}
dividend_history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/stock_dividend/{ticker}?{opts}
split_history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/stock_split/{ticker}?{opts}
* The stock
parameter can either be pased as a string or an array of market tickers. These tickers can be found either by running search based on corporation name or through the list
function
Accessed through fmp.crypto.{method_name}
stocknews() // /symbol/available-cryptocurrencies
quote(stock = 'all') * // /quote
history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/crypto/{ticker}?{opts}
* The stock
parameter can either be pased as a string or an array of market tickers. Also, the parameter appends USD
to the crypto ticker passed to provide the value in US dollars so if you need to query data in a different currency I would suggest using the forex command and manually convert it to the desired currency.
Accessed through fmp.commodities.{method_name}
stocknews() // /symbol/available-commodities
quote(stock = 'all') * // /quote
history(stock, {start_date, end_date, data_type, limit} = {}) * // /historical-price-full/commodity/{ticker}?{opts}
* The stock
parameter can either be pased as a string or an array of market tickers. These tickers can be found either by running search based on corporation name or through the list
function
Accessed through fmp.forex({from_ticker}, {to_ticker}).{method_name}
rate() // /quote
history({ start_date, end_date, data_type, limit } = {}) // /historical-price-full/{ticker}?{opts}
Contributions are welcome! The purpose of this npm package is to create a node wrapper that closely aligns to the free financial API provided by Financial Modeling Prep. If there are any features that are vital and I may have forgotten, feel free to open an issue or complete it by opening a pull request.
Before you open any pull requests, make sure the code structure follows the function calls provided above and the test suite passes, which can be checked by running npm test
. If possible try to keep the coverage of your code at ~100% to ensure future regression stability.
FAQs
This module is a node wrapper for the free [Financial Modeling Prep API](https://financialmodelingprep.com/developer/docs). This node application implements almost all aspects of the FMP API.
The npm package awesomebot-fmp receives a total of 2 weekly downloads. As such, awesomebot-fmp popularity was classified as not popular.
We found that awesomebot-fmp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.