def get_market_losers(*args, **kwargs): """ MOVED to iexfinance.stocks.get_market_losers """ import warnings warnings.warn(WNG_MSG, ("get_market_losers", "stocks.get_market_losers")) return stocks.get_market_losers(*args, **kwargs)
def get_losers(self): """ Get lower values: ticker price $ & % change volume Save to excel """ print("[SS]-[API] Getting losers...") losers_df = get_market_losers(token=self.api_key, output_format="pandas") return StockInfo(losers_df)
def data_parse(): data = get_market_gainers(token=iex_key) datax = get_market_losers(token=iex_key) datay = get_market_most_active(token=iex_key) symbol = [data[0]['symbol'], data[1]['symbol'], data[2]['symbol']] df = yf.download(symbol, period='6mo', interval='1d', group_by='ticker', auto_adjust=True) data1 = df[symbol[0]] data2 = df[symbol[1]] data3 = df[symbol[2]] return data, datax, datay, data1, data2, data3, symbol
def test_market_losers(self): li = get_market_losers() assert isinstance(li, pd.DataFrame) assert len(li) == pytest.approx(10, 1)
def test_market_losers(self): li = get_market_losers() assert len(li) == pytest.approx(21, 1)
def get_market_losers(*args, **kwargs): return stocks.get_market_losers(*args, **kwargs)
def get_market_losers(*args, **kwargs): import warnings warnings.warn(WNG_MSG % "get_market_losers") return stocks.get_market_losers(*args, **kwargs)