younginpiniti commited on
Commit
06bce79
·
1 Parent(s): 1411904

chore: app.py 파일 변경 사항 반영

Browse files
Files changed (1) hide show
  1. app.py +9 -3
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
- if sym and not any(c in sym for c in ["-", ".", "$"]):
50
- symbols.append(sym)
 
 
 
 
 
 
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: