Reply to topic

Currency Quotes

User avatar ipwizard
KDE Developer
Posts
455
Karma
1
OS

Re: Currency Quotes

Mon Nov 27, 2017 8:44 pm
Did you make the change to kmymoneyrc without KMyMoney running? If yes, I am out of ideas why you see this error. The only place where Malformed URL shows in the KMyMoney source tree is when saving the KMyMoney data file has a problem. But that certainly is not the case here.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 42.2 64bit, KF5
tartarkde
Registered Member
Posts
3
Karma
0

Re: Currency Quotes

Mon Nov 27, 2017 11:34 pm
ipwizard wrote:Did you make the change to kmymoneyrc without KMyMoney running? If yes, I am out of ideas why you see this error. The only place where Malformed URL shows in the KMyMoney source tree is when saving the KMyMoney data file has a problem. But that certainly is not the case here.


Yes, I edited kmymoneyrc with KMyMoney closed :-\ thank you anyway for trying to find out what's going on!
alainpetit
Registered Member
Posts
10
Karma
0

Re: Currency Quotes

Sun Dec 03, 2017 2:07 pm
alainpetit wrote:@All:

Eureka, I've made a awesome discovery, and I have to share it with all here that were interested in this issue. Moving to Google Finance was good 99% of the time, but based on my own problems with ETH currency, I couldn't find a one solution to suit all. Until now ... I've found a little unknown currency tracker that works with ALL currency and crypto :

Code: Select all
Kmymoney Settings
URL : https://fx-rate.net/%1/%2
Symbol : href="https:\/\/fx-rate.net\/([^\/]+\/[^\/]+)
Price : 1\s[^=]+\s=<\/span><br\s\/>\s([^\s]+)
Date : updated\s\d+:\d+:\d+\(\w+\)\s(\d{1,2}\/\d{2}\/\d{4})
Date Format : %d/%m/%y
Skip Stripped HTML : CHECKED


@All :
Alrigth new minor problem, now that BTC is coming increasingly high .. fx-rate started displaying CAD to BTC price as 7.2482e-5 Bitcoin (scientific notation), which kinda screw the REGEX reading for that particular pair ... however everything else in KMyMoney seems to be based on BTC to CAD. Nonetheless, are there anyone REGEX wizard here that alter the Price : part of REGEX to support scientific notation ?

EDIT : Also Question 2 - how can I change the currency to 4 decimal digits precision ?
User avatar ipwizard
KDE Developer
Posts
455
Karma
1
OS

Re: Currency Quotes

Sun Dec 03, 2017 2:22 pm
Answer 1: Having a price in a scientific notation is (currently) not supported. I doubt that we can change the value from the scientific to normal representation using a regex.

Answer 2: Do you mean the precision of the currency or the price?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 42.2 64bit, KF5
alainpetit
Registered Member
Posts
10
Karma
0

Re: Currency Quotes

Mon Dec 04, 2017 12:56 pm
ipwizard wrote:Answer 1: Having a price in a scientific notation is (currently) not supported. I doubt that we can change the value from the scientific to normal representation using a regex.

Answer 2: Do you mean the precision of the currency or the price?


hum, Question 2 : I meant the price but after further look .. it is 4 digit, and configurable in the general options. My bad.

But now that you mention about the precision of the currency, a minor annoyance I'm encountering is that my bitcoin accounts are displaying only 2 digit. is this customizable somewhere ?
User avatar ipwizard
KDE Developer
Posts
455
Karma
1
OS

Re: Currency Quotes

Mon Dec 04, 2017 3:08 pm
Not via the UI. You can try to modify that directly in your data file. Make sure to have a backup of it before you fiddle around. Search for the following line:
Code: Select all
<CURRENCY symbol="BTC" saf="100" type="3" id="BTC" rounding-method="0" name="Bitcoin" scf="100" pp="4"/>
Change saf (Smallest Account Fraction) and scf (Smallest Cash Fraction) to e.g. 10000 to get 4 digits of precision. Don't change anything else. Do that while KMyMoney is not running.

Here's a bit of documentation regarding the file formats provided/used by KMyMoney.

What would be a good default for saf and scf for Bitcoins? We can certainly adjust the source for future users.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 42.2 64bit, KF5
theravet
Registered Member
Posts
1
Karma
0

Re: Currency Quotes

Wed Dec 06, 2017 3:46 pm
Very interesting discussion! I just registered to be a part of it! ;)

I have some cryptocurrencies that are not very popular (like MONA or OK). I'd like to add them to my KMyMoney as an investment. It works perfect for BTC with the Google Finance settings that you provided. But the only website I found listing all of the crypto prices is Coingecko.
Unfortunately I cannot find the right regex to extract price and date.
Can anybody help me?

URL is https://www.coingecko.com/de/munze/%1 (or /en/coins/%1 for english users).

Thank you very much in advance!!! o)

 
Reply to topic

Bookmarks



Who is online

Registered users: alfredod, Baidu [Spider], Bing [Bot], boudewijn, Capitain_Jack, capslock, Exabot [Bot], formyfriday, gerdeg, Google [Bot], gui-m, La Ninje, Majestic-12 [Bot], Sogou [Bot], TheraHedwig, Tromzy, vpinon, Yahoo [Bot], zhanxw