Knowing if a symbol is an ETF or a stock...

Obviously I can try to scrape websites for this info but that is brittle.

Query an ETF-only site. For example,

https://etfdb.com/etf/TSLA/#etf-ticker-profile has
upload_2020-9-17_19-31-4.png


But https://etfdb.com/etf/GUNR/#etf-ticker-profile has
upload_2020-9-17_19-31-16.png


This doesn't look too hard to determine ETF or not.
 
Update: NxCore has deprecated ETF classifications, so that field is always is 0. Confirmed by their support.

Given that I would rather classify too many symbols as ETF rather than too few, if I can't find an API source, I will go with a combination of name rules (thanks @guru) and scraping as suggested by @ph1l.
 
Last edited:
Back
Top