{% extends "base.html" %}{% from "_macros.html" import chart as svg_chart, empty, flash, fpnl, kpi, page_head, source_note %} {% block title %}History{% endblock %} {% block content %} {# web/fantasy_routes.py history_page: the alpha's History tab (web/layout.py). Your Ⓕ, every trade by hand and by the strategy you follow, Ⓕ through the run, and the leaderboard (fantasy/ledger.ranked: ROI x (trades / 10)^0.3). #} {% call page_head("History", "Every trade you have made, your fantasy bucks through the run, and the leaderboard. All amounts are F-bucks (Ⓕ), which have no monetary value: nothing here is real money, and no order ever reaches an exchange. One Ⓕ is sized 1:1 with the dollar stablecoins (e.g. USDT) traded on prediction markets, so stakes and prices match the real books.") %} Trade → · Leaderboard ↓{% endcall %} {{ flash(msg) }} {% if not ready %}
Fantasy trading hasn't been set up on this site yet.
Each point is after an order, with open trades at what they cost (so a trade moves it only by its fee); the last point, marked "now", values open trades at what they would sell for now.
{% else %}{{ empty("Your Ⓕ through the run shows here once you have traded by hand.") }}{% endif %}| Market | Side | Shares | Cost | Worth now | P&L | |
|---|---|---|---|---|---|---|
| {{ p.group_title or p.question }} {{ p.event_title or "" }} · {{ p.exchange|capitalize }} |
{{ p.side|upper }} | {{ "%g"|format(p.shares) }} | {{ "%.2f"|format(p.cost) }} | {{ "%.2f"|format(p.value) if p.value is not none else "–" }} | {{ fpnl(p.pnl) }} | Sell |
| Market | Side | Shares | Cost | Outcome | Payout | P&L | Settled |
|---|---|---|---|---|---|---|---|
| {{ p.group_title or p.question }} {{ p.event_title or "" }} · {{ p.exchange|capitalize }} |
{% if p.side %}{{ p.side|upper }}{% else %}–{% endif %} | {{ "%g"|format(p.shares) }} | {{ "%.2f"|format(p.cost) }} | {% if p.outcome is none %}{{ p.status }}{% else %}{{ "YES" if p.outcome else "NO" }}{% endif %} | {{ "%.2f"|format(p.payout) if p.payout is not none else "–" }} | {{ fpnl(p.pnl) if p.pnl is not none else "–" }} | {{ p.settled_at|fmt }} |
Each share of the winning side paid Ⓕ1 when the market resolved; P&L is the payout less what the shares cost (fees are in your orders).
{% else %}{{ empty("No settled trades yet. A trade by hand shows here once its market resolves and pays out.") }}{% endif %}| When | Market | Order | Filled | Avg price | Fee | Result |
|---|---|---|---|---|---|---|
| {{ o.created_at|fmt }} | {{ o.group_title or o.question or "–" }} | {{ (o.action or "")|capitalize }} {{ "%g"|format(o.shares_req) if o.shares_req is not none }} {{ (o.side or "")|upper }}{% if o.limit_price is not none %} at {{ "%.2f"|format(o.limit_price) }}{% endif %} | {{ "%g"|format(o.shares_filled) }} | {{ "%.3f"|format(o.avg_price) if o.avg_price is not none else "–" }} | {{ "%.2f"|format(o.fee) }} | {% if o.status == 'rejected' %}refused: {{ reasons.get(o.reject_reason, o.reject_reason) }}{% else %}{{ o.status }}{% endif %} |
| Event | Kind | Subject | Side | State | P&L |
|---|---|---|---|---|---|
| {{ r.event_name or r.event_key }} | {{ r.kind|kind }} | {{ r.subject }} | {% if r.side %}{{ r.side|upper }}{% else %}–{% endif %} | {{ r.state }} | {{ fpnl(r.pnl) if r.pnl is not none else "–" }} |
Paper trades the strategy made for you at the exchanges' recorded prices. Its positions, stage by stage →
{% elif profile %}{{ empty("The strategy you follow hasn't traded yet. It trades on race weekends.") }} {% else %}You don't follow a strategy. Pick one and it paper-trades for you on race weekends.
{% endif %}| # | Player | Score | ROI | Trades | P&L | By hand | Strategy |
|---|---|---|---|---|---|---|---|
| {{ r.rank if r.rank else "–" }} | {{ r.username }}{% if user and r.username == user.username %} you{% endif %} | {% if r.score is not none %}{{ "%.1f pts"|format(r.score * 100) }}{% else %}–{% endif %} | {{ "%.1f%%"|format(r.roi * 100) if r.roi is not none else "–" }} | {{ r.trades }} | {{ fpnl(r.pnl) }} | {{ fpnl(r.manual_pnl) }} | {{ fpnl(r.strategy_pnl) }} |
Points = 100 × ROI × (trades ÷ 10)0.3, shown to tenths, so ten times the trades doubles the boost at the same ROI, where ROI is P&L (by hand plus strategy) over the Ⓕ staked, and trades counts your filled orders plus the markets your strategy traded. A player needs {{ min_trades }} trades to be ranked; those with fewer are listed after, with "–" for rank. Only settled trades count here: open trades are never counted, and only you see yours, on your own positions. The demo accounts aren't listed.
{% else %}{{ empty("No players yet.") }}{% endif %}