aboutsummaryrefslogtreecommitdiff
path: root/app.py
diff options
context:
space:
mode:
authorTyler <tyler@tylerhoang.xyz>2026-03-31 00:33:18 -0700
committerTyler <tyler@tylerhoang.xyz>2026-03-31 00:33:18 -0700
commit26e83497a1f07cb7cb4dfe4193a0edf6a1b2bd8b (patch)
tree868447bb544839657495f132d7605682118cfc70 /app.py
parent33ec0e8998a2088f76171e493cc207e8dd10ad5a (diff)
Map Yahoo Finance exchange codes to readable names
NYQ→NYSE, NMS/NGM/NCM→NASDAQ, ASE→AMEX, etc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'app.py')
-rw-r--r--app.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/app.py b/app.py
index f4c0ce8..cc1f077 100644
--- a/app.py
+++ b/app.py
@@ -136,7 +136,14 @@ with st.sidebar:
f"<span style='font-size:1.3rem;font-weight:700'>${price:,.2f}</span>",
unsafe_allow_html=True,
)
- st.caption(f"Exchange: {info.get('exchange', '—')}")
+ _EXCHANGE_NAMES = {
+ "NYQ": "NYSE", "NMS": "NASDAQ", "NGM": "NASDAQ",
+ "NCM": "NASDAQ", "ASE": "AMEX", "PCX": "NYSE Arca",
+ "BTS": "BATS", "TSX": "TSX", "LSE": "LSE",
+ }
+ raw_exchange = info.get("exchange", "")
+ exchange = _EXCHANGE_NAMES.get(raw_exchange, raw_exchange) or "—"
+ st.caption(f"Exchange: {exchange}")
st.caption(f"Currency: {info.get('currency', 'USD')}")
st.caption(f"Sector: {info.get('sector', '—')}")
employees = info.get("fullTimeEmployees")