Hi,

my pr just got merged into beanprice. So you can use this

pip install git+https://github.com/beancount/beanprice.git

and then specify the commodity like this

2000-01-01 commodity USD
  price: "CHF:ratesapi/USD-CHF"

if you want to use EUR as base (instead of CHF) then it would be

2000-01-01 commodity USD
  price: "EUR:ratesapi/USD-EUR"


similar for other base currencies.


It's using https://ratesapi.io/documentation/ for the lookup. Data is coming from

https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html

this should give you an idea which currency pairs you can use.


Regards,

Patrick


On 08.05.2021 15:30, Oon-Ee Ng wrote:
Currently exchangeratesapi. Am not really picky, just trying to automate the process rather than manually specifying flunctuations in my home currency.

On Sat, May 8, 2021 at 2:32 PM Patrick Ruckstuhl <patr...@ch.tario.org <mailto:patr...@ch.tario.org>> wrote:

    Yes, what I meant which price source (e.g. exchangeratesapi,
    alphabantage, ...) do you want to use?

    On May 8, 2021 2:56:00 AM GMT+02:00, Oon-Ee Ng
    <ngoonee.t...@gmail.com <mailto:ngoonee.t...@gmail.com>> wrote:

        Well I don't really suggest you accommodate my own currency
        since I may possibly be the only beancount user there. Really
        should be something we specify ourselves somewhere (no idea
        how that can be achieved).

        On Sat, May 8, 2021 at 8:01 AM Patrick Ruckstuhl
        <patr...@ch.tario.org <mailto:patr...@ch.tario.org>> wrote:

            Hi,

            Thanks for getting back on this. There is the link to pypi
            at the very top with the image but it makes sense to
            describe this as well.
            Sorry about the hardcoding to CHF, that's what I need and
            I haven't made this flexible everywhere. I noticed this
            when I started creating a pr for beanprice. I was thinking
            to move my price fetchers there and planning to fix it as
            part of the move. But I haven't heard back anything on my
            pr for almost a month, so I should probably enhance them
            in my repo. Which ones are you most interested?

            Regards,
            Patrick

            On May 8, 2021 1:44:56 AM GMT+02:00, Oon-Ee Ng
            <ngoonee.t...@gmail.com <mailto:ngoonee.t...@gmail.com>>
            wrote:

                Well it didn't show up on pypi with a search for
                'beancounttools', and the github page doesn't list
                this pypi package so I only found out about it from
                your email (thanks!)

                But... why is everything hardcoded to be CHF? Was so
                confused with the initial results I was getting.

                On Tue, Apr 27, 2021 at 2:53 PM 'Patrick Ruckstuhl'
                via Beancount <beancount@googlegroups.com
                <mailto:beancount@googlegroups.com>> wrote:

                    Hi,

                    what issues did you encounter when installing
                    beancounttools? Should be a simple


                    pip install tariochbctools


                    As for the config, probably it's tied to the way
                    you setup your commodities. The way I have mine
                    configured are like this

                    2019-01-01 commodity EUR
                       price: 
"CHF:tariochbctools.plugins.prices.exchangeratesapi/EUR"


                    So the symbol I use in beancount is EUR, but the
                    symbol for the price lookup might be something else


                    Regards,

                    Patrick

                    On 27.04.2021 05:17, Oon-Ee Ng wrote:
                    I've tried out
                    https://github.com/xuhcc/beancount-exchangerates
                    <https://github.com/xuhcc/beancount-exchangerates>
                    so far, and can't figure out installation for
                    https://github.com/tarioch/beancounttools
                    <https://github.com/tarioch/beancounttools>

                    Exchangerates gives me output looking like this:-

                    2021-04-27 price USD:CUR X.XXXX CUR

                    instead of (what I think is supposed to be) the
                    correct:-

                    2021-04-27 price USD     X.XXXX CUR

                    I don't recognise the above syntax, should I be
                    doing a simple sed to get it into the format I'm
                    already using (the 2nd one)? What does it even
                    mean? Would using beancounttools be 'better'?
-- 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
                    beancount+unsubscr...@googlegroups.com
                    <mailto:beancount+unsubscr...@googlegroups.com>.
                    To view this discussion on the web visit
                    
https://groups.google.com/d/msgid/beancount/CAGQ70evy9CBkxPQZL5dgV08YwnqiDF9Zr%3Dx%3DkZ%3Dujv5XoGBz6g%40mail.gmail.com
                    
<https://groups.google.com/d/msgid/beancount/CAGQ70evy9CBkxPQZL5dgV08YwnqiDF9Zr%3Dx%3DkZ%3Dujv5XoGBz6g%40mail.gmail.com?utm_medium=email&utm_source=footer>.
-- 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
                    beancount+unsubscr...@googlegroups.com
                    <mailto:beancount+unsubscr...@googlegroups.com>.
                    To view this discussion on the web visit
                    
https://groups.google.com/d/msgid/beancount/a2b2242c-55a8-da04-e7bd-5ebe6fa8be3b%40ch.tario.org
                    
<https://groups.google.com/d/msgid/beancount/a2b2242c-55a8-da04-e7bd-5ebe6fa8be3b%40ch.tario.org?utm_medium=email&utm_source=footer>.


--
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/d69baace-3915-2bb8-7c09-7e27e874e265%40ch.tario.org.

Reply via email to