thanks, but still no success

I will probably log it like a bug in beanprice github

* Commodities
2000-01-01 commodity EUR
  name: "Euro"
  assets-class: "cash"
  price: "USD:yahoo/USD=X"

2000-01-01 commodity USD
  name: "US dollars"
  assets-class: "cash"
  price: "EUR:yahoo/EUR=X"

2000-01-01 price EUR 1 USD
2000-01-01 price USD 1 EUR

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-12-05 * "Buying something in US, paying with EU card "
    Assets:EU:Bank:Payment               -100 EUR
    Expenses:Misc                        200 USD @@ 100 EUR



PS C:\_code\py\test\beancount_tests> bean-price -vv --no-cache --update 
--update-rate daily 
c:\_code\py\test\beancount_tests\simpleSimulation\test_for_bean_price.bean
INFO    : Processing at date: 2023-03-02
INFO    : Loading 
"c:\_code\py\test\beancount_tests\simpleSimulation\test_for_bean_price.bean"
DEBUG   : -------- Currencies in primary list:
DEBUG   :                           USD /EUR
DEBUG   :                           EUR /USD
PS C:\_code\py\test\beancount_tests>

On Thursday, March 2, 2023 at 3:50:54 PM UTC+1 wbe...@gmail.com wrote:

> 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/2e193429-5443-41a6-9bb9-78451814a5fan%40googlegroups.com.

Reply via email to