Hi,

I also saw similar problem, so I now documented on how to reproduce it

https://github.com/beancount/beanprice/issues/116

Regards.

On Friday, May 30, 2025 at 5:10:05 PM UTC+2 Alen Šiljak wrote:

> Hi! I've set up beanprice to fetch prices and that seems to work. I've 
> also adapted some of my price sources to work with beancount. These are 
> publicly available as as-price-download on github/pypi.
>
> When running directly
> ```sh
> bean-price -e "AUD:pricedl.beanprice.yahoo/ASX:VHY"
> ```
> the price comes out as expected
> ```
> 2025-05-30 price ASX:VHY                             74.33 AUD
> ```
> But, when reading the metadata from the book
> ```
> bean-price -v ..\book.bean > ..\prices\prices.current.bean
> ```
> the prices are coming out like this:
> ```
> 2025-05-30 price BLV                    67.6500000000000000000000000000 USD
> 2025-05-30 price BND                    72.6350000000000000000000000000 USD
> 2025-05-29 price BRF                    14.5922000000000000000000000000 USD
> 2025-05-30 price BSV                    78.2699966430664062500000000000 USD
> 2025-05-30 price CEMB                   44.8699989318847656250000000000 USD
> 2025-05-30 price CQE_AX                 2.960000038146972656250000000 AUD
> ```
> These are from two different sources. Mine has 4 decimals, so likely using 
> a different API.
> Is there a way to limit the number of decimal places and/or to get rid of 
> the zeros?
> In the price source I've written, the price is Decimal type. So, the 
> output and the conversion to string happens somewhere in beanprice, I 
> assume?
>
> Somebody elsewhere suggested that this is due to the existing prices and 
> inference. I will try to experiment with one symbol.
>
> Any hints highly appreciated!
>

-- 
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/2e887b2f-988f-476a-922d-41224b33e1b3n%40googlegroups.com.

Reply via email to