Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion markets/scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ def active_gainers_loosers():
top5 = top5[top5["priceAge"] < 60 * 60 * 6] # exclude quotes where the market closed more than 6 hours ago
exclude_tickers = os.getenv("EXCLUDE_TICKERS", "").upper().split(",")
top5 = top5[~(top5["symbol"].isin(exclude_tickers))] # remove DQ stocks
top5 = top5[~(top5["currency"].isin(['GBp']) & (top5["regularMarketPrice"] < 10 * 100))] # exclude penny stocks less than 10 GBP
if sortField == "dayvolume":
top5 = top5[~(top5["currency"].isin(['GBp']) & (top5["regularMarketPrice"] < 10 * 100))] # exclude penny stocks less than 10 GBP
top5.drop_duplicates(subset=["longName"], inplace=True, keep="first")
top5 = top5.iloc[: min(len(top5), 5)]
top5.reset_index(drop=True, inplace=True)
Expand Down