# Using the correct hledger commodity format

**URL:** <https://forum.plaintextaccounting.org/t/using-the-correct-hledger-commodity-format/953>\
**Category:** General\
**Created:** [November 23, 2026, 2:27am UTC](https://forum.plaintextaccounting.org/t/using-the-correct-hledger-commodity-format/953 "2026-11-23T02:27:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hnvy](https://avatars.discourse-cdn.com/v4/letter/h/838e76/32.png) [@hnvy](https://forum.plaintextaccounting.org/u/hnvy)\
**Post date:** [November 23, 2026, 2:27am UTC](https://forum.plaintextaccounting.org/t/using-the-correct-hledger-commodity-format/953/1 "2026-11-23T02:27:16Z")

</div>

Hi

Recently had a discussion with another user about how commodities should be formatted in hledger.

According to this section of the [hledger manual](https://hledger.org/1.52/hledger.html#commodity), I should write them out as:

```auto
commodity "1 000.00" EUR

```

However, it seems that this does not reflect the current behaviour (as noted by this user):

Example file:

```auto
commodity 1 000.00 EUR

2026-10-21 (c0) foo|test1
    assets:bankA 1337.00 EUR
    assets:bankB -1337.00 EUR

2026-10-21 (c1) foo|test2
    assets:bankA 0.135 EUR
    assets:bankB -0.135 EUR

2026-10-21 (c2) foo|test3
    assets:bankA -0.135 EUR
    assets:bankB 0.135 EUR

```

- With no commodity set --\> `hl bs` shows `1337.000 EUR`
- With `commodity 1 000.00 EUR` (as in example file): `1 337.00 EUR`
- With `commodity "1 000.00 EUR"`: `1337.000 EUR` (reverting to default?)
- With `commodity "1 000.00" EUR`: `Error: test.journal:1:22: unexpected 'E'; expecting '+', '-', ';', end of input, newline, or number`

Note: When changing tx c0 to ` assets:bankA 1 337.00 EUR` (as usually in my ledgers), the bad outputs have `1 337.000 EUR` (as in my previous comment).

So, what is the expected syntax?

1. `1 000.00 EUR ; No quotes `
2. `"1 000.00 EUR" ; Quotes around all`
3. `"1 000.00" EUR ; Quotes around numbers only`

---

<div class="post-metadata">

**Author:** ![simonmic](https://yyz1.discourse-cdn.com/flex003/user_avatar/forum.plaintextaccounting.org/simonmic/32/1_2.png) [@simonmic](https://forum.plaintextaccounting.org/u/simonmic)\
**Post date:** [November 23, 2026, 4:50am UTC](https://forum.plaintextaccounting.org/t/using-the-correct-hledger-commodity-format/953/2 "2026-11-23T04:50:48Z")

</div>

The quotes are used only around commodity symbols with unusual characters. Never around the amount's quantity. Maybe the doc is confusing ?
