Get income statement
Tags: #trading #market_data
Author: Florent Ravenel

Input

Import libraries

1
import requests
2
import pandas as pd
Copied!

Variables

1
API_KEY = "demo"
2
COMPANY = "IBM"
Copied!

Model

Get income statement

1
response = requests.get(f'https://www.alphavantage.co/query?function=INCOME_STATEMENT&symbol={COMPANY}&apikey={API_KEY}')
2
data = response.json()
3
df = pd.DataFrame(data.get("annualReports"))
Copied!

Output

Display result

1
df
Copied!
Copy link
Edit on GitHub