It looks like your price spec in the commodity is wrong. You are showing price: "EUR:yahoo/USDEUR=X". It seems that it should be price: "EUR:yahoo/EUR=X"
On Tuesday, February 28, 2023 at 3:37:43 AM UTC-5 char...@gmail.com wrote: > Thank you for response, but I still didn't manage to make this working for > my file > > On Monday, February 27, 2023 at 8:02:24 PM UTC+1 wbe...@gmail.com wrote: > > Was doing a search for bean-price and noticed this thread did not have a > response. To get the historical rates you also need --update, not just > --update-rate. > > On Tuesday, February 7, 2023 at 4:51:49 PM UTC-5 char...@gmail.com wrote: > > Dear all, > > I just can't figure out how to make bean-price fetch historical prices > > I have the following mybean.bean > =================================================== > > * Commodities > 2000-01-01 commodity EUR > name: "Euro" > assets-class: "cash" > > 2000-01-01 commodity USD > name: "US dollars" > assets-class: "cash" > price: "EUR:yahoo/USDEUR=X" > > 2000-01-01 open Expenses:Misc > > * Asset accounts > 2000-01-01 open Assets:EU:Bank:Payment > 2000-01-01 open Assets:US:Bank:Payment > > > 2022-12-02 * "Buying something in Euro paying by European card" > Assets:EU:Bank:Payment -100 EUR > Expenses:Misc 100 EUR > > 2022-12-03 * "Buying something in USD, paying by USA card " > Assets:US:Bank:Payment -100 USD > Expenses:Misc 100 USD > > 2022-12-04 * "Buying in EU with US card, where the cost in euro is known" > Assets:US:Bank:Payment -100 USD > Expenses:Misc 50 EUR @@ 100 USD > > 2022-01-05 * "Buying something in US, paying with EU card " > Assets:EU:Bank:Payment -100 EUR > Expenses:Misc 200 USD @@ 100 EUR > > ====================================================== > > however bean-price fetches only current USD /EUR. > > But I would like to get exchange rate for every day starting from the > earliest transaction to the last one. > > ======================= > C:\_code\py\mybean>bean-price -vv --no-cache --update-rate daily > "C:\_code\py\mybean\experiments\simpleSimulation\test_for_bean_price.bean" > INFO : Processing at date: 2023-02-07 > INFO : Loading > "C:\_code\py\mybean\experiments\simpleSimulation\test_for_bean_price.bean" > DEBUG : Ignoring currency with no metadata: EUR > DEBUG : -------- Currencies in primary list: > DEBUG : USD /EUR > DEBUG : -------- Currencies held in assets: > DEBUG : EUR /USD > DEBUG : USD /EUR > DEBUG : -------- Currencies to fetch: > DEBUG : USD /EUR > DEBUG : Starting new HTTPS connection (1): query1.finance.yahoo.com:443 > DEBUG : https://query1.finance.yahoo.com:443 "GET > /v7/finance/quote?symbols=USDEUR%3DX&fields=symbol%2CregularMarketPrice%2CregularMarketTime&exchange=NYSE&lang=en-US&corsDomain= > finance.yahoo.com&.tsrc=finance HTTP/1.1" 200 661 > 2023-02-07 price USD 1 EUR > > C:\_code\py\mybean> > > ======================= > > So, is it possible to get historical rates? > > -- 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/9ca73bc4-db9c-4008-b519-dc2c72b0e163n%40googlegroups.com.