gitwtfhub

wtf is finance-api-tool?

alinebm17/finance-api-tool — explained in plain English

Analysis updated 2026-05-18

142TypeScriptAudience · dataComplexity · 2/5Setup · moderate

TL;DR

A command line tool that downloads S&P 500 companies' financial statements and ESG scores and saves them as CSV or JSON files.

Mindmap

mindmap
  root((finance-api-tool))
    What it does
      Extracts S&P 500 data
      Financial statements
      ESG scores
      Ticker lists
    Tech stack
      TypeScript
      Node.js
      npm
    Use cases
      Financial research
      ESG analysis
      Academic projects
    Audience
      Researchers
      Data analysts
      Finance students
    Setup
      Clone repo
      npm install
      Add API keys

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Pull quarterly balance sheets, cash flow statements, and dividend data for S&P 500 companies for analysis

REASON 2

Collect monthly ESG scores for companies and their peer groups for sustainability research

REASON 3

Get an up to date list of S&P 500 ticker symbols as a JSON file

REASON 4

Build a spreadsheet or dataset of financial and sustainability metrics without manual data entry

What's in the stack?

TypeScriptNode.jsnpm

How it stacks up

alinebm17/finance-api-toolagutinbaigo28/trading-backtest-kitalinebm17/trade-backtesting-engine
Stars142142142
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatemoderatemoderate
Complexity2/54/53/5
Audiencedatadeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Full financial and FMP ESG data requires signing up for separate API keys.

Wtf does this do

finance-api-tool is a command line utility built as part of the developer's master's project. It pulls financial and ESG (environmental, social, and governance) data for the companies in the S&P 500 stock index and saves the results to files you can open later. The tool offers a few distinct extraction options. It can pull historical quarterly financial data for S&P 500 companies, including balance sheets, cash flow statements, financial ratios, and dividend records, and save that data as CSV files. It can also pull historical monthly sustainability data, meaning ESG scores for each company as well as ESG scores for their peer groups, again saved as CSV. A separate option extracts just the current list of S&P 500 company tickers and saves it as a JSON file. To use it, you clone the repository, run npm install to set up dependencies, and then run npm run start. This opens a menu where you choose which extraction to run: financial data from Discounting Cashflows, ESG data from Yahoo Finance, S&P 500 ticker lists, ESG data from FMP (Financial Modeling Prep), or quitting the program. Output files land in one of several output folders depending on which option you picked. Two of the five options need a paid or registered API key to return full results. Financial data from Discounting Cashflows and ESG data from FMP both require you to sign up with those services and add your key to a .env configuration file. Without a key you still get data, but a limited amount. The Yahoo Finance and tickers options do not need a key. This is a research and data collection tool rather than an app with a visual interface. It would suit someone doing financial analysis, an ESG research project, or a student working on something similar to the original master's project, who wants ready made scripts for gathering this kind of stock market data instead of writing scraping code from scratch. It is written in TypeScript and run from the command line with Node.

Yoink these prompts

Prompt 1
Help me set up finance-api-tool with npm and configure the .env file with a Discounting Cashflows API key
Prompt 2
Write a script that loads the CSV output from finance-api-tool into a pandas dataframe for analysis
Prompt 3
Explain the difference between the Discounting Cashflows and FMP ESG data options in finance-api-tool
Prompt 4
Show me how to schedule finance-api-tool to run monthly and archive each output file with a date stamp

Frequently asked questions

wtf is finance-api-tool?

A command line tool that downloads S&P 500 companies' financial statements and ESG scores and saves them as CSV or JSON files.

What language is finance-api-tool written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, npm.

How hard is finance-api-tool to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is finance-api-tool for?

Mainly data.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.