GitHub
Crypto

Crypto

Ledgeline tracks coins the same way it tracks stocks. A coin is a commodity in your journal, an account that holds one shows up on Holdings → Stocks, and its price comes from Yahoo Finance. Charts, gains, the allocation pie and Performance all work, provided you set up each coin as described below.

Holdings → Stocks with bitcoin, ether, two stablecoins and two tokens

Setting up a coin

Declare each coin once, with type: crypto:

commodity 1.00000000 BTC   ; type: crypto
commodity 1.000000 ETH     ; type: crypto
commodity 1.000000 SOL     ; type: crypto
commodity 1.00 USDC        ; type: crypto

Ledgeline treats a $ ledger as US dollars. A base currency without a single ISO code (¥) gets no pair; Update prices then looks the coin up under its own symbol with a message to the user. Give such a coin a yahoo: tag naming its pair.

Untagged coins are priced as whatever Yahoo calls that symbol. On Yahoo Finance BTC, ETH and XRP are ETFs and USDC is a stock. An untagged commodity BTC is priced as the Grayscale Bitcoin Mini Trust ETF, about $27 a share, because you might hold that ETF. When a well-known coin symbol is priced as something that is not a coin, Update prices and the Holdings page say what it was priced as and how to fix it.

Tokens Yahoo lists under another ticker

Some tokens share a symbol with another token. Yahoo then adds a number to the ticker, for example UNI7083-USD for Uniswap or PEPE24478-USD for Pepe, and UNI-USD finds nothing. Search for the token on finance.yahoo.com and copy the ticker exactly as shown into a yahoo: tag. hledger needs a symbol with digits in it quoted, so it is simpler to keep a plain symbol and put the full ticker in the tag:

commodity 1.00 UNI   ; type: crypto, yahoo: UNI7083-USD

A yahoo: tag always wins. Each price Update prices writes names what Yahoo priced (“Uniswap USD”), so a ticker that points at a different token shows up. If a coin-tagged commodity’s ticker turns out to be a stock or an ETF, its price is not recorded at all, and the summary says what Yahoo answered.

The accounts

An account that holds a coin lands on Stocks without any tag, because a coin is a non-currency commodity. Name your wallets and exchanges however you like:

account assets:crypto:coinbase   ; type: A
account assets:crypto:cold       ; type: A

Buying, selling and moving coins are ordinary transactions:

2026-03-02 Buy bitcoin
    assets:crypto:coinbase      0.05000000 BTC @ $61,200.00
    expenses:fees:crypto             $15.00
    assets:bank:checking        $-3,075.00

2026-03-09 Move to cold storage
    assets:crypto:cold          0.04990000 BTC
    expenses:fees:crypto        0.00010000 BTC
    assets:crypto:coinbase     -0.05000000 BTC

A move between two of your own wallets changes nothing on Holdings: Ledgeline pools each coin across every account in scope. A network fee paid in the coin reduces what you hold.

On the Performance chart that fee counts as a loss, not as money you took out, and its share of the cost basis goes with it. A staking reward booked against an income account with staking in its name counts as return, not as money you put in. The words are a setting, Settings → Prices → Income that counts as investment return (see Holdings):

2026-04-01 Staking reward
    assets:crypto:coinbase      0.01 ETH @ $3,000.00
    income:staking

The reward’s @ value still joins the cost basis, so the holding’s all-time gain (value minus cost) leaves the reward out. A gain over a period counts it.

Stablecoins

USDT, USDC and similar coins are priced like any other coin, so a depeg shows up. They count as Crypto in the pie. To count one as cash instead, add assetclass: cash:

commodity 1.00 USDC   ; type: crypto, assetclass: cash

The account stays on the Stocks tab either way. It holds a commodity, not your base currency.

Prices, weekends and today’s quote

Not supported