Importing Python dicts?

2020-10-09 Thread Sam Bragg
Hi all, I'm completely new to beancount, but I want to use it to manage my trading/investing activities. I have already written a library to download transactions from my broker's API, which returns a list of dicts. I have looked at the beancount documentation and I can't even seem to get star

Re: Importing Python dicts?

2020-10-09 Thread Red S
You have the steps right. I'm trying to understand where you are stuck. You would simply write a new importer that didn't read from a file, but instead called your library, and converted the list of dicts into transactions. Have you looked at: ./examples/ingest/office/importers/utrade/utrade_csv

Re: Importing Python dicts?

2020-10-09 Thread Sam Bragg
Hi there, thanks very much for taking the time to reply. I hadn't seen that example, it seems to be along the lines of what I'm trying to do, so I'll see how far I can get. Have a great weekend, Sam On Friday, 9 October 2020 at 20:06:59 UTC+2 redst...@gmail.com wrote: > You have the steps rig

Re: Importing Python dicts?

2020-10-09 Thread Martin Blais
You can either write a custom script and just print out to stdout, or use the ingest framework. Here's an example of a custom standalone script that converts from Ameritrade: https://github.com/blais/ameritrade/blob/master/examples/ameritrade2beancount.py The ingest library only provides a framew

Re: How do I journal a mutual funds with average cost basis ?

2020-10-09 Thread Martin Blais
Declare those accounts with "NONE" booking method and use UNITS() or COST() of the position to extract meaningful values. On Wed, Oct 7, 2020 at 8:47 AM booster...@gmail.com < boosterhidro...@gmail.com> wrote: > Hi, > > Any workaround how to journal a mutual funds with average cost basis, > sinc