How can I use Python to get a list of all stock ticker symbols?

14 Replies, 1253 Views

If you’re looking to python get list of all stock ticker symbols, I’d suggest using the `requests` library to pull data from the SEC’s EDGAR database. They have a ton of free datasets, including ticker symbols.

Here’s a quick script:
```python
import requests
url = "https://www.sec.gov/files/company_tickers.json"
response = requests.get(url)
data = response.json()
print(data)
```
It’s a bit raw, but it’s free and reliable.

Messages In This Thread



Users browsing this thread: 1 Guest(s)