I may not fully understand this, but does *bal -G* work? If you have the details in ledger, and you're looking for gains at a particular time, this should work; no?
*Igbanam* On Thu, Oct 2, 2025 at 5:03 AM Pranshu Goyal <[email protected]> wrote: > I'm trying to write a script to calculate capital gains. For this I intend > to get a csv register report on some accounts with lot prices data, and > then do the capital gains calculation in the script. But the csv report > with such a query doesn't give me lot prices data: > > > ledger csv stocks --lot-prices > > It only outputs the number of units bought or sold. I also tried looking > into format strings > <https://ledger-cli.org/doc/ledger3.html#Format-Strings-1> but found no > option to get lots data. Am I missing something or the feature isn't there? > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Ledger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion visit > https://groups.google.com/d/msgid/ledger-cli/5ce280cd-88f8-44e2-8d82-1e59119dd942n%40googlegroups.com > <https://groups.google.com/d/msgid/ledger-cli/5ce280cd-88f8-44e2-8d82-1e59119dd942n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion visit https://groups.google.com/d/msgid/ledger-cli/CAOmRJrcyzkLXZEfdHn5ScDnSBMpRuDF1uVgpb9qWFMBsVamoLg%40mail.gmail.com.
