File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change
1
+ import requests
2
+ import json
3
+
4
+
5
+ website="https://www.linkedin.com/in/reginald-stuart-ii-01605775/"
6
+
7
+ headers = { "User-Agent": f"{website} {email}"}
8
+
9
+ def fetch_company_info(ticker):
10
+ """Fetches company information from EDGAR API.
11
+
12
+ Args:
13
+ ticker: The ticker symbol of the company.
14
+
15
+ Returns:
16
+ A dictionary containing company information or None if not found.
17
+ """
18
+
19
+ url = f"https://data.sec.gov/submissions/CIK{ticker}.json"
20
+ response = requests.get(url, headers=headers)
21
+
22
+ if response.status_code == 200:
23
+ data = response.json()
24
+ return data
25
+ else:
26
+ print(f"Error fetching data for {ticker}: {response.text}")
27
+ return None
28
+
29
+ # Example usage:
30
+ tickers = ["0000320193", "0001288776", "0000789019"]
31
+ for ticker in tickers:
32
+ company_info = fetch_company_info(ticker)
33
+ if company_info:
34
+ print(company_info)
You can’t perform that action at this time.
0 commit comments