Prices
Prices record what one commodity is worth in terms of another on a given date. You manage them on the Prices page. Widgets use those prices (and optionally costs from transactions) when converting amounts into the commodity you chose for a page or widget.
How-to
Add a price
- Open Prices.
- Choose Add Price.
- Set Date, Commodity, Price Amount, and Price Commodity.
- Optionally choose Add another price to enter more prices for the same date.
- Choose Add.
Price Commodity cannot be the same as Commodity.
Edit a price
- Open Prices.
- Select the price row you want to change.
- Update the fields in Edit Price.
- Choose Save.
Delete a price
- Open Prices.
- Select the price row.
- In Edit Price, choose Delete.
- Confirm the deletion.
Choose Price Evaluation Time on a widget
- Open the widget's settings (on a dashboard in Edit mode, when the widget allows settings).
- Find Pricing.
- Set Price Evaluation Time to one of:
- As of each transaction's date
- As of today
- At the end of each period
- Fixed date (then pick the date)
- Save the widget settings.
Turn Infer market prices on or off
- Open the widget's settings.
- Under Pricing, turn Infer market prices on or off.
- Save the widget settings.
When it is on, missing market prices may be filled in from costs recorded on transactions. When a market price and an inferred price fall on the same day, the market price from Prices takes precedence.
Reference
Prices page
- Prices - Lists market prices grouped by date (newest dates first).
- Add Price - Opens the dialog to add one or more prices for a date.
- Each row shows
1 xthe commodity,=, the price amount, and the price commodity. Selecting a row opens Edit Price.
Add / Edit Price fields
- Date - The date this market price applies from.
- Commodity - The unit being priced.
- Price Amount - How many units of the price commodity equal one unit of the commodity.
- Price Commodity - The unit the price is expressed in.
Meaning: 1 x Commodity = Price Amount Price Commodity.
In add mode you can use Add another price for more rows on the same date. Edit mode edits a single price and offers Delete.
Price Evaluation Time
Shown under widget Pricing as Price Evaluation Time:
| Option | Meaning |
|---|---|
| As of each transaction's date | Convert each amount using the market price on that transaction's date. |
| As of today | Convert using the market prices in effect today (when the report is generated). |
| At the end of each period | Convert using the market price on the last day of the report period. For charts or reports with several subperiods, each subperiod uses its own end date. |
| Fixed date | Convert using the market price on the date you pick. |
Conversion uses the latest price on or before that valuation date. Amounts with no usable price stay in their original commodity.
For the underlying valuation modes, see Valuation date and --value in the hledger manual.
Infer market prices
- Infer market prices - Widget Pricing toggle. When on, costs from multicommodity transactions can supply market prices when no matching entry exists on Prices for that date.
See also --infer-market-prices in the hledger manual.
Transaction Cost fields
On a transaction posting, Cost records the exchange rate used in that transaction (what you paid or received), not a general market quote:
- Type
- No Cost - No cost on this posting.
- Unit Cost - Price per one unit of the posting's commodity.
- Total Cost - Total price for the whole posting amount.
- Amount - The cost quantity (shown when a cost type other than No Cost is selected).
- Commodity - The commodity the cost is in.
Amounts with a cost can show a cost hint (for example Unit Cost or Total Cost with the cost value).
For unit and total cost notation, see Costs in the hledger manual.
Explanation
Market prices and commodities
A commodity is the unit of an amount (a currency, shares, and so on). A market price answers: "On this date, what is one unit of commodity A worth in commodity B?"
Example: on 2026-03-01 you record that 1 x USD = 0.92 EUR. That does not move money between accounts. It only tells reports and widgets how to convert USD amounts into EUR when they need a single commodity.
You usually care about prices when you hold more than one commodity and want balances, net worth, or charts in one unit (often your default commodity).
How reports convert amounts using those prices is covered under Value reporting.
Market price vs transaction cost
These are related but not the same:
| Market price (Prices) | Transaction cost | |
|---|---|---|
| What it is | A dated quote: what one commodity is worth in another | The rate used on a specific posting when you exchange commodities |
| Where you set it | Prices page | Cost on a transaction posting |
| Typical use | Convert holdings for reports and widgets | Keep the transaction balanced when two commodities change hands |
Example: you buy 100 EUR and pay 108 USD.
- On the EUR posting you might set Unit Cost to
1.08USD (or Total Cost to108USD). That is what this purchase cost. - Separately on Prices, you might later record that EUR traded at
1.10USD. Reports that value "as of today" can show the holding at the newer market rate, while the transaction still keeps the original cost.
For conversions that use equity accounts of category Conversion, see Commodities and Double-entry bookkeeping. For more on recording and reporting costs, see Costs and Cost reporting in the hledger manual.
Price Evaluation Time, with an example
Market prices change over time. Price Evaluation Time chooses which day's price is used when a widget converts amounts.
Suppose you hold 100 USD, and you recorded these prices (USD priced in EUR):
| Date | Price |
|---|---|
| 2026-01-01 | 1 x USD = 0.90 EUR |
| 2026-02-15 | 1 x USD = 0.95 EUR |
| 2026-03-01 | 1 x USD = 0.92 EUR |
And you bought the 100 USD on 2026-01-10. Looking at that holding in EUR:
- As of each transaction's date - Uses the price on 2026-01-10. The latest price on or before that day is 0.90, so about 90 EUR.
- As of today - Uses today's latest price. If today is after 2026-03-01 and nothing newer exists, that is 0.92, so about 92 EUR.
- At the end of each period - Uses the price on the last day of the selected period. If the period ends 2026-02-28, the latest price on or before that day is 0.95, so about 95 EUR. On a multiperiod chart, January and February each get their own period-end price.
- Fixed date set to 2026-02-15 - Uses the price on that date: 0.95, so about 95 EUR.
Same holding, different evaluation times, different converted values. Pick the option that matches the question you are asking (historical rate at purchase, current value, period-end snapshot, or a specific day).
These map to hledger's valuation modes: then, end, now, and a fixed date. See also Finding market price and Valuation examples.
Infer market prices
Keeping every market price up to date by hand can be tedious. Infer market prices lets widgets treat costs on transactions as extra market prices when a suitable Prices entry is missing.
- Useful when you often record the real exchange rate as Unit Cost or Total Cost on conversions.
- Explicit prices on Prices still win on the same day.
- If conversion still fails, add a price on Prices, or check that the cost commodity matches what the widget is converting to.
For more on commodities and the default commodity used on pages, see Commodities.