tarioch / beancounttools

Beancount Tools
MIT License
79 stars 23 forks source link

Quick help on IBKR importer #99

Closed kaiwei closed 1 year ago

kaiwei commented 1 year ago

Hi,

Thanks for this very useful framework. I'm unfortunately quite new to python and am trying to get the ibkr importer customized for my setup. I had already tried to refer to the documentation but do not see this answered there (maybe because it is too basic). Essentially, I have 4 quick questions below:

  1. I see this account (sample) in the code. How can I change it to the specific ones per my setup. Is it via the configuration file and if yes, is the below the right way for that?
    def getFeeAccount(self, account: str):
        return f"Expenses:{account}:Fees"
CONFIG = [
    apply_hooks(ibkrimp.Importer({
        'getFeeAccount'   : 'Expenses:Financial:Commissions:IBKR',
        }), [PredictPostings()]),
]
  1. How do I customize the location of the ibkr.yaml file instead of the import directory? E.g. "~.config\beancount"

  2. Does this importer also account for cash withdrawals and transfers in various currencies?

  3. What are the specific fields needed for the Flex Web queries when putting together a customized report for this importer? Does the order of the fields matter?

Thank you so much for the kind guidance!

tarioch commented 1 year ago

Hi,

Let me try to answer your questions

  1. At the moment you have to extend the importer to adjust it, if you want I can adjust it so it reads those values from the config
  2. the way I set up the importers you can have the file wherever you want, it's basically the "trigger" file for the import (like with other imports, it would be a csv file that you downloaded)
  3. no, it doesn't support that at the moment
  4. order is not relevant, I don't have the exact list, you can look into https://github.com/tarioch/beancounttools/blob/master/src/tariochbctools/importers/ibkr/importer.py for what is needed, I'll see if I can document it a bit better
kaiwei commented 1 year ago

Thanks! (3) is probably a dealbreaker though so I don't want to take up your time on this but thanks!!