It’s been a while since I looked at this, but IIRC, you’re right in that you’ll have to write a bit of python code. There isn’t a built in function, and what Fava does is the closest reference.
But it should be minor: for each account in the realization, you’ll want to sum up inventories of all its children, and then call convert to convert them to the main currency. Which IIRC is exactly what Fava does. On Tuesday, July 29, 2025 at 5:57:59 PM UTC-7 [email protected] wrote: > Hello, sorry if this a trivial question. > > In Python, I am struggling to get the tree of all accounts and their final > balance or position for the main currency, including the open account > without any attached posting, such as the intermediate nodes whose balances > are expected to be the sum of their subaccount balances. > > Realization only provides it for accounts with postings, Claude nor > ChaGPT don’t help to solve this (probably not enough source code available > for beancount v3), and looking at fava code, it seems they are > re-calculating the positions. > > Is it possible to get it from the core data structure or do we have to use > bean-query? > > Claude > -- You received this message because you are subscribed to the Google Groups "Beancount" 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/beancount/73ba817a-b788-491d-a14e-bfe0d290a964n%40googlegroups.com.
