mirror of
https://github.com/jaxperro/winning-wallet-finder.git
synced 2026-07-27 15:57:47 +00:00
portfolio: per-wallet missed totals in wallets[] (missed_n, missed_pnl)
The feed's missed[] is a 60-row window of 1,388 — cards need lifetime numbers server-side (same lesson as the copybot dash's wallet_pnl). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -599,7 +599,14 @@ def main():
|
||||
"won": v["won"], "lost": v["lost"], "ref": v.get("ref", 0),
|
||||
"sold": v.get("sold", 0), "class": v.get("class", "volume"),
|
||||
"invested": round(v["invested"], 2), "realized": round(v["realized"], 2),
|
||||
"conv_thr": conv_thr.get(v["wallet"], 1e12)}
|
||||
"conv_thr": conv_thr.get(v["wallet"], 1e12),
|
||||
# per-wallet missed totals over the FULL missed list —
|
||||
# the feed's missed[] is a 60-row window, so the cards
|
||||
# must get lifetime numbers server-side (2026-07-22,
|
||||
# same lesson as the copybot dash's wallet_pnl)
|
||||
"missed_n": sum(1 for m in missed if m["name"] == v["name"]),
|
||||
"missed_pnl": round(sum(hypo_pnl(m) for m in missed
|
||||
if m["name"] == v["name"]), 2)}
|
||||
for v in perW.values()],
|
||||
"current": [{"title": c.get("title", ""), "name": c["name"], "outcome": c.get("outcome", ""),
|
||||
"stake": c.get("stake"), "val": round(c["val"], 2), "pnl": round(c["pnl"], 2),
|
||||
|
||||
Reference in New Issue
Block a user