On Wednesday, December 23, 2020 at 11:03:44 AM UTC+7 [email protected] wrote:

> Short answer is: no, but that's quickly becoming a FAQ from crypto users.
> It could be designed, but that would be a new feature.
>

I only use Spec ID booking so I might be missing something but isn't moving 
lots just a small 5 or 6 line python script iterating over 
beancount.ops.holdings.get_final_holdings? Would this work or is it more 
complicated? I'm not sure that a plugin is simpler/clearer than just 
generating the transaction externally and then inserting it into the 
beancount file.

holdings = beancount.ops.holdings.get_final_holdings(entries, 
included_account_types=('Assets',))
print(f'{datetime.date.today()} * "ACATS" "Autogenerated lot transfer to 
new account"')
for h in filter(match, holdings):
   cost_date = None
   print(f' {h.account} -{h.number} {h.currency} {{ {cost_date}, 
{h.cost_number} {h.cost_currency} }}')
   print(f' {args.destination} {h.number} {h.currency} {{ {cost_date}, 
{h.cost_number} {h.cost_currency} }}') 

The only problem I see is that get_final_holdings returns a Holding tuple 
that doesn't include the acquisition date. But there's a note in the code 
saying the Holding tuple should go away and just be replaced by a Position, 
which would hold the acquisition date.

-- 
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 on the web visit 
https://groups.google.com/d/msgid/beancount/63666df8-52d7-4991-8b9c-c7c5320460ffn%40googlegroups.com.

Reply via email to