fwiw I agree with Zoltan - with the exception of money market funds where 
`@ 1.00 USD` makes sense, it never makes sense to record the unit price in 
a transaction, as that is a derivative property of how much is actually 
paid.  Similar to eg Quicken where the default is 'automatically calculate 
price.'  Writing the unit price feels like a clear anti-pattern to me... 
unless I really wanted to track the rounding errors the bank is earning off 
me?  I have scripts that normalize and rewrite transactions and I hack the 
output to manually export `@@ total_price USD` everywhere.

On Sunday, February 8, 2026 at 2:47:37 PM UTC-5 Zoltan wrote:

> > For what you’re wanting, shouldn’t you be wanting to *avoid* using @@?
> What is the alternative way to solve what I'm looking for?
>
> AFAIK this does not balance out:
> 2025-01-01 * "Exchanged to GBP"
>   Assets:Bank:EUR  -117 EUR
>   Assets:Bank:GBP   100 GBP
>
> Thanks,
> Zoltan
>
> On Sunday, 8 February 2026 at 16:38:45 UTC+1 [email protected] wrote:
>
>> On 08/02/26 16:12, [email protected] wrote: 
>> > I may be wrong, but IIRC, there’s no way to do this through the API. 
>> > @@ is not very well supported. 
>> This is not true. `@@` is well supported. 
>>
>> However, it is treated as an input only syntax that is normalize upon 
>> parsing. Therefore, it is not expected to be represented as such in the 
>> data model that the built-in serialization supports. 
>>
>> I think this could be handled extending the serialization code. However, 
>> I see little chance for such a change to make it into beancount. 
>>
>> If you can live with using an external serialization library, you can 
>> look here https://github.com/dnicolodi/beangadgets/ It contains a 
>> version of `beancount.parser.printer` that supports writing the `@@` 
>> syntax (and other minor improvements). I use this code for my import 
>> scripts (I hope all the relevant local changes made it into the GitHub 
>> repository, please holler if it does not work as expected). 
>>
>> Cheers, 
>> Dan 
>>
>>

-- 
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/f0e4d0e5-d63f-4f8b-a19c-3d2687bb3696n%40googlegroups.com.

Reply via email to