mirror of
https://github.com/jaxperro/winning-wallet-finder.git
synced 2026-08-04 19:57:46 +00:00
full missed-row companion feeds (portfolio[_follow]_missed.json): wallet-card would-be totals now reconstructable row-by-row in the dash modal
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -117,7 +117,7 @@ python3 dashboard.py
|
||||
mkdir -p history && cp watch_skilled.json "history/watch_$(date '+%Y%m%d').json" 2>/dev/null
|
||||
echo "[daily] $(date '+%F %T') 7/7 publish (commit + push refreshed outputs)"
|
||||
PUBLISH="no changes"
|
||||
git add watch_skilled.json watch_sharps.json conviction_wallets.json dashboard.html portfolio.json portfolio_follow.json copybot.paper.json 2>/dev/null
|
||||
git add watch_skilled.json watch_sharps.json conviction_wallets.json dashboard.html portfolio.json portfolio_missed.json portfolio_follow.json portfolio_follow_missed.json copybot.paper.json 2>/dev/null
|
||||
if git diff --cached --quiet 2>/dev/null; then
|
||||
echo "[daily] no output changes to publish"
|
||||
elif git commit -q -m "live: daily refresh — skilled + sharp wallets [skip ci]"; then
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+13
-2
@@ -637,8 +637,8 @@ def main():
|
||||
return "won" if w else "lost"
|
||||
|
||||
missed.sort(key=lambda m: m.get("res_t") or 0, reverse=True)
|
||||
for m in missed[:60]:
|
||||
m["title"] = market_meta(m["cond"])["title"]
|
||||
for m in missed: # full enrichment: the companion file
|
||||
m["title"] = market_meta(m["cond"])["title"] # (disk-cached)
|
||||
m["pnl"] = hypo_pnl(m)
|
||||
wins = sum(1 for r in resolved if r.get("won"))
|
||||
refunds = sum(1 for r in resolved if r.get("refund"))
|
||||
@@ -710,6 +710,17 @@ def main():
|
||||
}
|
||||
json.dump(out, open(os.path.join(HERE, OUT) if not os.path.isabs(OUT) else OUT, "w"),
|
||||
separators=(",", ":"))
|
||||
# companion: the COMPLETE missed list (the feed's missed[] is a 60-row
|
||||
# window; wallet cards sum the full list server-side — this file lets
|
||||
# the dashboard's wallet modal show every row behind those totals)
|
||||
mfull = [{"title": m.get("title", ""), "name": m["name"],
|
||||
"won": _missed_won(m), "status": _missed_status(m),
|
||||
"stake": m.get("stake"), "capped": bool(m.get("capped")),
|
||||
"pnl": round(m["pnl"], 2),
|
||||
"date": m.get("exit_t") or m.get("res_t")} for m in missed]
|
||||
mf = (OUT[:-5] if OUT.endswith(".json") else OUT) + "_missed.json"
|
||||
json.dump(mfull, open(os.path.join(HERE, mf) if not os.path.isabs(mf)
|
||||
else mf, "w"), separators=(",", ":"))
|
||||
save_slug_cache()
|
||||
print(f"portfolio[{DAYS}d rolling]: equity ${equity:,.0f} ({(equity-BANK)/BANK*100:+.0f}%) | banked ${reserve:,.0f} "
|
||||
f"| realized ${realized:+,.0f} | fees ${fees_paid:,.0f} | next stake ${cur_stake():,.0f} "
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user