We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1909f0e + d338377 commit 7918a13Copy full SHA for 7918a13
alpaca_trade_api/polygon/rest.py
@@ -149,6 +149,13 @@ def news(self, symbol):
149
path = '/meta/symbols/{}/news'.format(symbol)
150
return NewsList(self.get(path))
151
152
+ def gainers_losers(self, direction="gainers"):
153
+ path = '/snapshot/locale/us/markets/stocks/{}'.format(direction)
154
+ return [
155
+ Ticker(ticker) for ticker in
156
+ self.get(path, version='v2')['tickers']
157
+ ]
158
+
159
def all_tickers(self):
160
path = '/snapshot/locale/us/markets/stocks/tickers'
161
return [
0 commit comments