beancount / beanprice

Daily price quotes fetching library for plain-text accounting
GNU General Public License v2.0
69 stars 37 forks source link

Price rounding #65

Open antage opened 2 years ago

antage commented 2 years ago

I expect beanprice shouldn't rounding any price. Due to beanprice writes prices with dcontext the rounding may happen.

$ bean-price -e 'RUB:yahoo/VTBR.ME'
2021-11-10 price VTBR.ME                           0.05053 RUB
$ bean-price current.beancount | grep VTBR
2021-11-10 price VTBR                                 0.05 RUB

current.beancount has commodity definition:

1970-01-01 commodity VTBR
  price: "RUB:yahoo/VTBR.ME"
$ bean-doctor display_context current.beancount
...
RUB             : sign=1   integer_max=5   fractional_common=2   fractional_max=2   "-00000.00" "-00000.00"
...
__default__     : sign=0   integer_max=1   fractional_common=_   fractional_max=_   "0.*" "0.*"