This page explains how to get a list of all stock and ETF symbols from Alpha Vantage. The dataset also includes details such as company name and IPO date, or delisting date for delisted stocks.
List of all symbols API URL
For a complete list of active symbols it is best to the the LISTING_STATUS
function. The URL is:
https://www.alphavantage.co/query?function=LISTING_STATUS&apikey=demo
This link also works with the demo API key (or you can use your own in the url parameter apikey
).
Output format and columns
The output is CSV (not JSON). The columns are:
symbol
name
= company or fund nameexchange
= e.g. 'NASDAQ', 'NYSE', 'NYSE ARCA', 'BATS'assetType
= 'Stock' or 'ETF'ipoDate
= date of IPO (when stock started trading)delistingDate
= none for active symbolsstatus
= always 'Active' for active symbols
The dataset includes both stocks and ETFs. You can filter it using the assetType
column, which is either 'Stock' or 'ETF'.
For stocks (not ETFs) you can find additional company characteristics such as market cap, dividend amount, or P/E ratio in the company overview dataset. There are also several datasets for detailed fundamental data.
Delisted symbols
The LISTING_STATUS
function has an optional parameter status
.
By default (if you don't include it in the URL), status=active
, returning actively listed symbols.
Alternatively you can use status=delisted
to get delisted symbols (stocks and ETFs no longer trading).
Active or delisted symbols at given date
Another optional parameter is date
. You can use it to get a snapshot of active or delisted symbols for a particular day in the past. The format is yyyy-mm-dd
. For example:
https://www.alphavantage.co/query?function=LISTING_STATUS&date=2014-07-10&state=delisted&apikey=demo
Alpha Vantage symbols with Python pandas
The code below gets Alpha Vantage symbols into a pandas DataFrame.
import pandas as pd
API_KEY = ... # Your AV API key
ACTIVE_CSV_URL = "https://www.alphavantage.co/query?function=LISTING_STATUS&apikey=demo"
symbols = pd.read_csv(ACTIVE_CSV_URL)
DELISTED_CSV_URL = "https://www.alphavantage.co/query?function=LISTING_STATUS&state=delisted&apikey={}"
delisted = pd.read_csv(DELISTED_CSV_URL.format(API_KEY))
Note: The active symbols dataset works with apikey=demo
. For delisted symbols you need your own API key (see how to get and use it).