Spaces:
Sleeping
Sleeping
Commit ·
06bce79
1
Parent(s): 1411904
chore: app.py 파일 변경 사항 반영
Browse files
app.py
CHANGED
|
@@ -45,9 +45,15 @@ def get_all_us_tickers():
|
|
| 45 |
break
|
| 46 |
for quote in quotes:
|
| 47 |
sym = quote.get("symbol", "")
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
offset += len(quotes)
|
| 52 |
total = result.get("total", 0)
|
| 53 |
if offset >= total:
|
|
|
|
| 45 |
break
|
| 46 |
for quote in quotes:
|
| 47 |
sym = quote.get("symbol", "")
|
| 48 |
+
if sym:
|
| 49 |
+
# [필터]
|
| 50 |
+
# 1. '-', '.', '$'가 포함된 티커 (우선주, 유닛 등) 제외
|
| 51 |
+
# 2. 티커가 5자이면서 마지막이 W(Warrant), R(Right), U(Unit)인 파생 종목 제외
|
| 52 |
+
is_special = any(c in sym for c in ["-", ".", "$"])
|
| 53 |
+
is_derivative = len(sym) == 5 and sym[-1] in ["W", "R", "U"]
|
| 54 |
+
|
| 55 |
+
if not (is_special or is_derivative):
|
| 56 |
+
symbols.append(sym)
|
| 57 |
offset += len(quotes)
|
| 58 |
total = result.get("total", 0)
|
| 59 |
if offset >= total:
|