Skip to content

Instantly share code, notes, and snippets.

@ChristopherNickels
Last active December 24, 2019 17:43
Show Gist options
  • Select an option

  • Save ChristopherNickels/0afc6ad1648c715bde31eabcdd3cb007 to your computer and use it in GitHub Desktop.

Select an option

Save ChristopherNickels/0afc6ad1648c715bde31eabcdd3cb007 to your computer and use it in GitHub Desktop.
This file was used to create a txt file of every company's cash flow statement
"""
@authors: Christopher, Lorenzo
"""
import requests
import json
from utils import companies
def get_cash_flow(company):
resp = requests.get(f"https://financialmodelingprep.com/api/v3/financials/cash-flow-statement/{company}")
resp = resp.json()
file = open(f"cash-flow-{company}.txt", "w")
json.dump(resp, file, indent=2)
file.close()
for company in companies:
get_cash_flow(company)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment