diff --git a/scripts/fetch_market.py b/scripts/fetch_market.py index 1fb3ccb..40d9a51 100644 --- a/scripts/fetch_market.py +++ b/scripts/fetch_market.py @@ -23,13 +23,12 @@ def fetch_crypto(): continue price = data[coin_id]["usd"] change = data[coin_id].get("usd_24h_change", 0) or 0 - direction = "▲" if change >= 0 else "▼" items.append({ "type": "crypto", "symbol": names[coin_id], "icon": icon, "price": f"${price:,.2f}", - "change_pct": f"{direction} {abs(change):.2f}%", + "change_pct": f"{abs(change):.2f}%", "is_up": change >= 0, }) return items @@ -49,13 +48,11 @@ def fetch_cn_indices(): price = diff.get("f2", 0) change = diff.get("f4", 0) pct = diff.get("f3", 0) - direction = "▲" if change >= 0 else "▼" items.append({ "type": "cn_index", "symbol": name, "price": f"{price:.2f}", - "change": f"{direction} {abs(change):.2f}", - "change_pct": f"{direction} {abs(pct):.2f}%", + "change_pct": f"{abs(pct):.2f}%", "is_up": change >= 0, }) return items