-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedgar-1
34 lines (26 loc) · 858 Bytes
/
edgar-1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import requests
import json
email="[email protected]"
website="https://www.linkedin.com/in/reginald-stuart-ii-01605775/"
headers = { "User-Agent": f"{website} {email}"}
def fetch_company_info(ticker):
"""Fetches company information from EDGAR API.
Args:
ticker: The ticker symbol of the company.
Returns:
A dictionary containing company information or None if not found.
"""
url = f"https://data.sec.gov/submissions/CIK{ticker}.json"
response = requests.get(url, headers=headers)
if response.status_code == 200:
data = response.json()
return data
else:
print(f"Error fetching data for {ticker}: {response.text}")
return None
# Example usage:
tickers = ["0000320193", "0001288776", "0000789019"]
for ticker in tickers:
company_info = fetch_company_info(ticker)
if company_info:
print(company_info)