{% extends "base.html" %} {% block title %}{{ _("Crypto") }} · Wealth Dashboard{% endblock %} {% block heading %}{{ _("Crypto") }}{% endblock %} {% block lede %}

{{ _("Every coin you hold, at today's price, with the wallet's value over time. Coins arrive from Kraken or from a row typed in by hand with the code as its ISIN — CRYPTO:BTC — and are priced from Yahoo like everything else.") }}

{% endblock %} {% block content %} {% if not coins %}

{{ _("No coins yet.") }}

{{ _("Connect Kraken under Settings, or add a buy by hand on a broker account with CRYPTO:BTC as the ISIN.") }}

{% else %} {% if coins | length > 1 %}
{% for c in coins %} {{ c.code }} {% endfor %}
{% endif %}
{{ _("Wallet") }}
{% if coin.value is not none %}{{ money(coin.value, coin.price_currency) }}{% else %}—{% endif %}
{{ qty(coin.quantity) }} {{ coin.code }} · {{ coin.accounts | unique | join(', ') }}
{{ _f("{code} price", code=coin.code) }}
{% if coin.price %}{{ money(coin.price, coin.price_currency) }}{% else %}—{% endif %}
{% if coin.price %}{{ coin.symbol }} · {{ d(coin.price_as_of) }}{% else %}{{ _("no price yet — it arrives with the next price refresh") }}{% endif %}
{{ _("Cost basis") }}
{{ money(coin.cost_basis, coin.currency) }}
{% if coin.avg_cost %}{{ _f("avg {price} per {code}", price=money(coin.avg_cost, coin.currency), code=coin.code) }}{% else %}{{ _("what the coins still held cost, fees included") }}{% endif %} {%- if coin.net_invested is not none and (coin.net_invested - coin.cost_basis) | abs > 0.5 %} · {{ _f("net invested {amount}", amount=money(coin.net_invested, coin.currency)) }}{% endif %}
{{ _("Unrealised gain") }}
{% if coin.gain is not none %}{{ money(coin.gain, coin.price_currency) }}{% else %}—{% endif %}
{% if coin.gain_pct is not none %}{{ '%+.1f' | format(coin.gain_pct) }} %{% else %}—{% endif %}

{{ _("Price chart") }}

{{ _("Loading…") }}
{% for r, label in (("1m", "1M"), ("3m", "3M"), ("1y", "1Y"), ("5y", "5Y"), ("max", _("All"))) %} {% endfor %}

{{ _("Price: Yahoo's daily close of the pair, in the base currency. Wallet: that price times the units held on each day, from the rows below — so a purchase shows as a step up and a sale as a step down.") }}

{{ _("Latest rows") }}

{{ _("every row, and corrections") }} →
{% for r in rows %} {% endfor %}
{{ _("Date") }}{{ _("Kind") }}{{ _("Account") }}{{ _("Description") }} {{ _("Quantity") }}{{ _("Price") }}{{ _("Amount") }}
{{ d(r.txn_date) }} {{ kind_label(r.kind) }} {{ r.account_name }} {{ r.description[:60] }} {{ qty(r.quantity) if r.quantity is not none else '—' }} {{ qty(r.price) if r.price else '—' }} {{ money(r.amount, r.currency) }}
{% endif %} {% endblock %} {% block scripts %} {% if coins %} {% endif %} {% endblock %}