Bug 440745 - Update EUR/BTC price online does not work
Summary: Update EUR/BTC price online does not work
Status: REPORTED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (other bugs)
Version First Reported In: 5.1.2
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-08 15:15 UTC by Tony
Modified: 2021-08-08 15:17 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tony 2021-08-08 15:15:49 UTC
SUMMARY
KMyMoney does not retrieve the correct value of EUR/BTC when updating for a single date (which uses fx-rate.net).

STEPS TO REPRODUCE
1. Select the menu Tools => Update Stock and Currency Prices
2. Select the currency pair EUR > BTC
3. Click the button "Update Selected"

OBSERVED RESULT
Fetching URL https://fx-rate.net/EUR/BTC...
Identifier found: 'EUR/BTC'
Price found: '2.664' (2.664)
Date found: 'Sun Aug 8 2021'
Price for EUR > BTC updated (ID EUR BTC)

EXPECTED RESULT
Fetching URL https://fx-rate.net/EUR/BTC...
Identifier found: 'EUR/BTC'
Price found: '2.664e-5' (0.00002664)
Date found: 'Sun Aug 8 2021'
Price for EUR > BTC updated (ID EUR BTC)

SOFTWARE/OS VERSIONS
Windows: Windows 10 Home 20H2

ADDITIONAL INFORMATION
I am using KMyMoney version 5.1.2-772e77894.

For EUR/BTC, fx-rate.net returns a number in scientific notation. The regex configuration that extracts this number is ([,\d+\.]+). I made a simple change to ([,\d+\.e-]+), then re-ran the STEPS TO REPRODUCE and KMyMoney displayed "Price found: '2.664e-5' (2.664e-05)" in the output. However, KMyMoney did not use this value to update the price history of the currency.

Updating a range of prices also does not work (which uses stooq.com). I will submit a formal bug report if you want; however, it's easy to reproduce it.

Fixing these bugs will allow the tracking of cryptocurrencies in KMyMoney and would be a very useful capability.