beanprice question

62 views
Skip to first unread message

Ivan Petrov

unread,
Jun 16, 2024, 9:35:15 AM (13 days ago) Jun 16
to Beancount
Hello everyone, I'm relatively new to PTA community and trying to deal with each part of beancount setup. I've managed to use great tool beanprice, but see one misbehaviour. 

bean-price -e 'USD:yahoo/ETH-USD' 
gives me
2024-06-15 price ETH-USD 3535.0425 USD
while i obviously want
2024-06-15 price ETH 3535.0425 USD

How can I setup beanprice to return me in a correct way?

Max Smirnov

unread,
Jun 20, 2024, 6:51:37 AM (9 days ago) Jun 20
to Beancount
Hi Ivan. I've faced a similar issue recently and I think I've got the answer. When using bean-price -e it does not know that how you've set up the commodity. E.g. I have Armenian Drams represented on my ledger as ARMD to not confuse with ARM stocks, but someone who does not have any stocks might set up ARM as Armenian Drams. So bean-price only fetches a ticker you've provided. In. order to get the result you expect, declare a commodity first

; ledger.bean
2024-06-20 commodity USDT
  price: "EUR:coinbase/USDT-EUR"

and then run bean-price against the ledger

> bean-price ledger.bean
2024-06-20 price USDT                             0.932545 EUR

воскресенье, 16 июня 2024 г. в 17:35:15 UTC+4, Ivan Petrov:

Ammar

unread,
Jun 20, 2024, 6:51:42 AM (9 days ago) Jun 20
to Beancount
You can add the commodity to your beancount file as:

* Commodities
2015-07-30 commodity ETH
  name: "Ether"
  price: " USD:yahoo/ETH-USD"

Then you can run something like this:
bean-price.exe -vv -i -s --update .\example.beancount
Reply all
Reply to author
Forward
0 new messages