1
0
Files
plaintextaccounting/quickref/index.md
2022-06-18 16:17:51 +01:00

981 lines
29 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<link href="quickref.css" rel="stylesheet">
<a href="https://en.wikipedia.org/wiki/Rosetta_Stone" style="float:right; margin:0 2em;"><img width=100 src="images/image00.jpg"></a>
# Syntax Quick Reference for the Ledger-Likes
The journal file formats of Ledger, hledger and Beancount, side by side. Last tested: 2016.\
See also:
separate [Ledger](quickref-ledger.html), [hledger](quickref-hledger.html), [Beancount](quickref-beancount.html) versions;
original [google sheet](https://docs.google.com/document/d/1L5OyRZ4nxQVjZJugyEyYi_H-229yaWV-yx0raAO1iog) version;
[plaintextaccounting.org](https://plaintextaccounting.org).
Contents:
- [Journal Format](#journal-format)
- [Basic example](#h.8v2r9qqwt9f8)
- [Comments](#h.1n05blr44u7c)
- [Basic transactions](#h.gij3l494xeth)
- [Dates](#h.xpr0dgy4pyj3)
- [Account names](#h.n4b87oz9ku6t)
- [Amounts](#h.n4b87oz9ku6t)
- [More transaction features](#h.9xaw86fvi6s6)
- [Prices](#h.d2g5xagy7h37)
- [Balance assertions](#h.mjrjnr996vfg)
- [Balance assignments](#h.mjrjnr996vfg)
- [Directives](#h.au5ysr0kfa)
- [account, open](#h.3v5cafffbbft)
- [close](#h.22qss13648tb)
- [commodity](#h.n9q16dsjsoye)
- [market price](#h.wya8r85tgqsx)
## Journal format
Things in square brackets are  optional. Some notes in the Ledger column are common to all.
<!-- table exported from google sheet -->
<table id="quickref3">
<tbody>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c10 c18">
</span>
</p>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c13">
Ledger<br>
<a href="https://www.ledger-cli.org/3.0/doc/ledger3.html#Journal-Format">https://www.ledger-cli.org/3.0/doc/ledger3.html#Journal-Format</a><br>
<a href="https://ricostacruz.com/cheatsheets/ledger.html">https://ricostacruz.com/cheatsheets/ledger.html</a>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c13">
hledger<br>
<a href="https://hledger.org/hledger.html#journal-format">https://hledger.org/hledger.html#journal-format</a>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c13">
Beancount<br>
<a href="https://beancount.github.io/docs/beancount_language_syntax.html">https://beancount.github.io/docs/beancount_language_syntax.html</a><br>
<a href="https://beancount.github.io/docs/beancount_cheat_sheet.html">https://beancount.github.io/docs/beancount_cheat_sheet.html</a>
</p>
<p class="c13 c25">
<span class="c10 c30">
</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.8v2r9qqwt9f8">
<span>
Basic example</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
; a comment<br>
<br>
2016/1/1 set opening balance<br>
&nbsp; &nbsp;assets:checking &nbsp; &nbsp; &nbsp; $500.00<br>
&nbsp; &nbsp;equity:opening balances<br>
<br>
2016/1/5 farmer&#39;s market<br>
&nbsp; &nbsp;expenses:groceries &nbsp; &nbsp; $50.00<br>
&nbsp; &nbsp;Assets:checking<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Comments, directives, and/or transactions in any order</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
; a comment<br>
<br>
2016/1/1 set opening balance<br>
&nbsp; &nbsp;assets:checking &nbsp; &nbsp; &nbsp; $500.00<br>
&nbsp; &nbsp;equity:opening balances<br>
<br>
2016/1/5 farmer&#39;s market<br>
&nbsp; &nbsp;expenses:groceries &nbsp; &nbsp; $50.00<br>
&nbsp; &nbsp;assets:checking</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
; a comment<br>
<br>
2016-01-01 open Assets:Checking<br>
2016-01-01 open Equity:Opening-Balances<br>
2016-01-01 open Expenses:Groceries<br>
<br>
2016-01-01 txn &quot;set opening balance&quot;<br>
&nbsp; &nbsp;Assets:Checking &nbsp; &nbsp; &nbsp; &nbsp; 500.00 USD<br>
&nbsp; &nbsp;Equity:Opening-Balances<br>
<br>
2016-01-05 txn &quot;farmer&#39;s market&quot;<br>
&nbsp; &nbsp;Expenses:Groceries &nbsp; &nbsp; 50 USD<br>
&nbsp; &nbsp;Assets:Checking<br>
<br>
</span>
<span class="c8">
All referenced accounts must have an open directive</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.1n05blr44u7c">
<span>
Comments</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
; comment<br>
# comment<br>
% comment<br>
| comment<br>
* comment and org-mode outline node<br>
<br>
</span>
<span class="c10 c8">
Non-comment lines may end with a comment<br>
Indented comments are attached to the preceding transaction or posting</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
; comment<br>
# comment<br>
* comment and org-mode outline node<br>
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
; comment<br>
Any unrecognised line is also a comment<br>
<br>
<br>
<br>
<br>
</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.gij3l494xeth">
<span>
Basic transactions</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
DATE [[PAYEE | ] DESCRIPTION]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c10 c8">
A transaction contains any number of indented postings (usually two), whose amounts must sum to zero<br>
At least two spaces required between account and amount<br>
One amount may be omitted<br>
</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
DATE [DESCRIPTION]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c10 c8">
Same</span>
</p>
<p class="c12 c25">
<span class="c10 c8">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
DATE txn [[&quot;PAYEE&quot;] &quot;DESCRIPTION&quot;]<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;AMOUNT<br>
&nbsp; &nbsp;ACCOUNT &nbsp; &nbsp;[AMOUNT]<br>
<br>
</span>
<span class="c10 c8">
DESCRIPTION must be in double quotes, can be multiline<br>
No need for two spaces between account and amount</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.xpr0dgy4pyj3">
<span>
Dates</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
MM-DD<br>
MM/DD<br>
MM.DD<br>
<br>
</span>
<span class="c8">
Other formats specified with</span>
<span class="c1">
&nbsp;--input-date-format </span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
MM-DD<br>
MM/DD<br>
MM.DD</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
YYYY-MM-DD<br>
YYYY/MM/DD<br>
YYYY.MM.DD<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Only YYYY-MM-DD with 8 digits is officially supported</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.n4b87oz9ku6t">
<span class="c0">
Account names</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
TOPACCT[:SUBACCT[:...]]<br>
<br>
Revenues:Salary<br>
liabilities:credit card:CITI 1234<br>
other assets:house<br>
<br>
</span>
<span class="c10 c8">
Account names begin with a letter<br>
May contain single spaces<br>
May contain subaccounts separated by :</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
TOPACCT[:SUBACCT[:...]]<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Same</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
TOPACCT[:SUBACCT[:...]]<br>
<br>
Income:Salary<br>
Liabilities:CreditCard:CITI-1234<br>
Assets:House<br>
<br>
</span>
<span class="c8">
Top level account must be one of Assets, Liabilities, Equity, Income, Expenses<br>
Each subaccount must be capitalised<br>
Letters, digits and hyphen are allowed (no spaces)</span>
<span class="c1">
&nbsp;</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.n4b87oz9ku6t-1">
<span class="c0">
Amounts</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
One of<br>
COMMODITY QUANTITY<br>
QUANTITY COMMODITY<br>
QUANTITY<br>
<br>
10<br>
$10.00<br>
1,000.0001 USD<br>
10 &quot;prepaid classes&quot;<br>
<br>
<br>
<br>
</span>
<span class="c8">
COMMODITY is a symbol, word or phrase; if it contains spaces or numbers, it must be in double quotes<br>
It can be on the left or right, with or without a separating space<br>
QUANTITY is a number with 0 or more decimal places<br>
Decimal point is </span>
<span class="c8 c24">
.</span>
<span class="c8">
<br>
Digits can be grouped into thousands by </span>
<span class="c8 c24">
,</span>
<span class="c10 c8">
<br>
Amount styles influence the standard display style for each commodity</span>
</p>
<p class="c12 c25">
<span class="c10 c8">
</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
One of<br>
COMMODITY QUANTITY<br>
QUANTITY COMMODITY<br>
QUANTITY<br>
<br>
10<br>
$10.00<br>
1,000.0001 USD<br>
10 &quot;prepaid classes&quot;<br>
1.000.000,01<br>
12,34,567.89<br>
<br>
</span>
<span class="c8">
Decimal point is </span>
<span class="c8 c24">
.</span>
<span class="c8">
&nbsp;or </span>
<span class="c8 c24">
,<br>
</span>
<span class="c8">
Digit group separator is </span>
<span class="c8 c24">
,</span>
<span class="c8">
&nbsp;or </span>
<span class="c8 c24">
.</span>
<span class="c10 c8">
<br>
Any digit grouping can be used, not just thousands</span>
</p>
<p class="c12 c25">
<span class="c10 c8">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
QUANTITY COMMODITY<br>
<br>
<br>
<br>
<br>
10USD<br>
1000.0001 USD<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c8">
COMMODITY is all capital letters, on the right, and required</span>
<span class="c2">
<br>
</span>
<span class="c8">
Decimal point is </span>
<span class="c8 c24">
.</span>
<span class="c8">
<br>
Digit group separator </span>
<span class="c8 c24">
,</span>
<span class="c10 c8">
&nbsp;is allowed and ignored</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.9xaw86fvi6s6">
<span class="c21">
More transaction</span>
<span>
&nbsp;</span>
<span class="c0">
features</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
DATE [FLAG] [(CODE)] DESCRIPTION<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;[AMOUNT [PRICE] [=BAL]]<br>
<br>
</span>
<span class="c10 c8">
FLAG (aka STATE) is empty, ! or * meaning uncleared, pending or cleared<br>
CODE is any string, in parentheses<br>
DESCRIPTION can be a payee name, narration, or both</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
DATE [FLAG] [(CODE)] DESCRIPTION<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp;AMOUNT [PRICE] [=BAL]</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
DATE [txn|FLAG] [[&quot;PAYEE&quot;] &quot;DESCRIPTION&quot;]<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp; &nbsp; &nbsp; AMOUNT [PRICE]<br>
&nbsp; &nbsp;...<br>
&nbsp; &nbsp;[FLAG] ACCOUNT &nbsp; &nbsp; &nbsp; AMOUNT [PRICE]<br>
<br>
</span>
<span class="c8">
The txn keyword may be replaced by a FLAG<br>
For just a payee, use &quot;PAYEE&quot; &quot;&quot;<br>
</span>
<span class="c1">
&nbsp;</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.d2g5xagy7h37">
<span class="c0">
Prices</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
One of<br>
@ UNITPRICE<br>
@@ TOTALPRICE<br>
and/or one of<br>
{LOTUNITPRICE}<br>
{=FIXEDLOTUNITPRICE}<br>
and/or<br>
[LOTDATE]<br>
<br>
</span>
<span class="c10 c8">
A UNITPRICE or TOTALPRICE also records a market price on this date<br>
A LOTDATE is written in square brackets</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
One of<br>
@ FIXEDUNITPRICE<br>
@@ FIXEDTOTALPRICE<br>
and/or<br>
{=FIXEDLOTUNITPRICE}<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
These do not record market prices<br>
The lot price syntax is ignored</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c2">
{LOTUNITPRICE[ / LOTDATE]}<br>
and/or one of<br>
@ UNITPRICE<br>
@@ TOTALPRICE<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Lot prices are remembered and form distinct commodities, other prices are not<br>
If there is both a lot price and a regular price, the latter records a market price</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.mjrjnr996vfg">
<span class="c0">
Balance assertions</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
= AMOUNT (after posting amount &amp; price)<br>
<br>
2016-03-10<br>
&nbsp; &nbsp;Expenses:Food &nbsp; &nbsp; &nbsp;$20<br>
&nbsp; &nbsp;Assets:Cash &nbsp; &nbsp; &nbsp; $-20 = $80<br>
<br>
</span>
<span class="c10 c8">
Asserts the balance in this commodity <br>
in this account, excluding subaccounts<br>
at this point in the parse order</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
= AMOUNT (after posting amount &amp; price)<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Asserts the balance in this commodity<br>
in this account, excluding subaccounts<br>
on this day. Same day events are processed in parse order</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c2">
DATE balance ACCOUNT AMOUNT<br>
<br>
2014-08-09 balance Assets:Cash 562.00 USD<br>
2014-08-09 balance Assets:Cash 210.00 CAD<br>
<br>
<br>
</span>
<span class="c8">
Asserts the balance in this commodity<br>
in this account, including subaccounts<br>
at the start of this day</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.mjrjnr996vfg-2">
Balance assignments
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
= AMOUNT (no preceding/inferred posting amount)<br>
<br>
2012-03-10 Adjustment<br>
&nbsp; &nbsp;Assets:Cash &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= $50<br>
&nbsp; &nbsp;Expenses:Misc
</p>
<p class="c12">
<span class="c2">
<br>
</span>
<span class="c8">
Sets the posting amount so as to make the balance assertion true. (The other amountless posting allows the transaction to balance)</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c1">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17 c25">
<span class="c1">
</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h4 class="c9" id="h.au5ysr0kfa">
<span class="c19">
Directives</span>
</h4>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
KEYWORD ARGS...<br>
&nbsp; &nbsp;[SUBDIRECTIVES]<br>
<br>
account</span>
</p>
<p class="c12">
<span class="c1">
alias<br>
apply<br>
assert<br>
bucket<br>
capture<br>
check<br>
comment<br>
commodity<br>
define<br>
end<br>
expr<br>
fixed<br>
include<br>
P</span>
</p>
<p class="c12">
<span class="c1">
payee<br>
tag<br>
test<br>
year<br>
<br>
Timeclock directives:<br>
i<br>
o<br>
b<br>
h</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
KEYWORD ARGS...<br>
<br>
<br>
account (alias for apply)<br>
alias<br>
apply<br>
comment<br>
D<br>
end<br>
include<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c1">
[DATE] KEYWORD ARGS...<br>
&nbsp; &nbsp;[SUBDIRECTIVES]<br>
<br>
DATE balance<br>
DATE close<br>
DATE commodity<br>
DATE document<br>
DATE event<br>
DATE note<br>
DATE open<br>
DATE pad<br>
DATE price<br>
DATE txn<br>
include<br>
option<br>
plugin<br>
poptag<br>
pushtag<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.3v5cafffbbft">
<span class="c0">
account, open</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
account ACCOUNT</span>
</p>
<p class="c12">
<span class="c2">
&nbsp; &nbsp; [SUBDIRECTIVES]<br>
<br>
account Revenues:Salary<br>
account Expenses:Food:Chicken<br>
&nbsp; &nbsp;note chicken food expenses<br>
&nbsp; &nbsp;alias food<br>
&nbsp; &nbsp;payee ^(KFC|Popeyes)$<br>
&nbsp; &nbsp;check commodity == &quot;$&quot;<br>
&nbsp; &nbsp;assert commodity == &quot;$&quot;<br>
&nbsp; &nbsp;eval print(&quot;Hello!&quot;)<br>
&nbsp; &nbsp;default<br>
<br>
</span>
<span class="c8">
Gives more error checking with </span>
<span class="c2">
--strict</span>
<span class="c8">
&nbsp;or </span>
<span class="c2">
--pedantic<br>
</span>
<span class="c10 c8">
Optional subdirectives do more stuff</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c1">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c2">
DATE open ACCOUNT [COMMODITY[,...]] [METHOD]<br>
<br>
2014-05-01 open Assets:Cash USD,CAD<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</span>
<span class="c10 c8">
Every account posted to needs an open directive with prior date</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.22qss13648tb">
<span class="c0">
close</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c1">
</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c1">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c1">
DATE close ACCOUNT</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.n9q16dsjsoye">
<span class="c0">
commodity</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
commodity COMMODITY<br>
<br>
commodity EUR<br>
commodity $<br>
&nbsp; note American Dollars<br>
&nbsp; format $1,000.00<br>
&nbsp; nomarket<br>
&nbsp; default<br>
<br>
</span>
<span class="c8">
Gives more error checking with </span>
<span class="c2">
--strict</span>
<span class="c8">
&nbsp;or </span>
<span class="c2">
--pedantic<br>
</span>
<span class="c8">
Optional subdirectives do more stuff</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12 c25">
<span class="c1">
</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c2">
DATE commodity COMMODITY<br>
&nbsp; &nbsp;[METADATA]<br>
<br>
1867-01-01 commodity CAD<br>
&nbsp; &nbsp;name: &quot;Canadian Dollar&quot;<br>
&nbsp; &nbsp;asset-class: &quot;cash&quot;<br>
<br>
<br>
<br>
</span>
<span class="c8 c10">
Attaches metadata to a commodity</span>
</p>
</td>
</tr>
<tr class="c11">
<td class="c16" colspan="1" rowspan="1">
<h5 class="c9" id="h.wya8r85tgqsx">
<span>
market price</span>
</h5>
</td>
<td class="c4" colspan="1" rowspan="1">
<p class="c12">
<span class="c1">
P DATE TIME COMMODITY UNITPRICE<br>
<br>
P 2004/06/21 02:18:02 AAPL $32.91<br>
P 2004/06/21 02:18:02 AU $400.00</span>
</p>
<p class="c12">
<span class="c2">
<br>
</span>
<span class="c10 c8">
Used by -V and -X<br>
Also set by transaction prices</span>
</p>
</td>
<td class="c15" colspan="1" rowspan="1">
<p class="c12">
<span class="c2">
P DATE [TIME] COMMODITY UNITPRICE<br>
<br>
P 2015/8/9 GBP $1.55<br>
<br>
<br>
</span>
<span class="c10 c8">
Used by -V<br>
A time is ignored</span>
</p>
</td>
<td class="c7" colspan="1" rowspan="1">
<p class="c17">
<span class="c2">
DATE price COMMODITY AMOUNT<br>
<br>
2014-07-09 price USD &nbsp;1.08 CAD<br>
<br>
<br>
</span>
<span class="c10 c8">
Also set by transaction prices</span>
</p>
</td>
</tr>
</tbody>
</table>