how can i get a list of all U.S. stocks?

Options
rice
rice Newcomer

If I want to get a list of all U.S. stocks, how should I do it? I tried using:

cond = 'IN(TR.ExchangeCountryCode,US)'
each_req = "SCREEN(U(IN(Equity(active,public)))/*UNV:Public*/, " + cond + ", NOT_IN(TR.InstrumentTypeCode,BONDFUT,BONDSPREAD,CEF,ETF,ETFA,ETFB,ETFC,ETFE,ETFM,ETFO,ETFX,ETMF,FU&N,GROWUNT,HDG,INS,OPF,OPTRTS,PAIDSUBRTS,PREFERRED,PRF,RTS,SUBSRTS),CURN=USD)"
fields = ["TR.OrganizationID", "TR.CompanyName", "TR.ExchangeName", "TR.IsPrimaryInstrument", "TR.ISIN", "TR.InstrumentType", "TR.ExchangeCountry"]
df_stock = ld.get_data(each_req, fields)

Is this the correct way to do it?

Answers