diff --git a/alpaca_trade_api/polygon/rest.py b/alpaca_trade_api/polygon/rest.py index 46606e8f..7c991307 100644 --- a/alpaca_trade_api/polygon/rest.py +++ b/alpaca_trade_api/polygon/rest.py @@ -149,6 +149,13 @@ def news(self, symbol): path = '/meta/symbols/{}/news'.format(symbol) return NewsList(self.get(path)) + def gainers_losers(self, direction="gainers"): + path = '/snapshot/locale/us/markets/stocks/{}'.format(direction) + return [ + Ticker(ticker) for ticker in + self.get(path, version='v2')['tickers'] + ] + def all_tickers(self): path = '/snapshot/locale/us/markets/stocks/tickers' return [