Finance-Quote 1.45 released!
rmcasali at gmail.com
rmcasali at gmail.com
Sun Nov 12 18:39:54 EST 2017
Hi,
Em sex, 2017-11-10 às 18:50 +0100, Erik Colson escreveu:
> rmcasali at gmail.com writes:
>
> > Hi,
> >
> > I changed the YahooJSON module to use the new API variables and the
> > new
> > URL. It is attached for anyone who wants to test. It's not a very
> > clean
> > code, it's just an adaptation.
> >
> > Unfortunately, I do not know how to update the finance-quote.
> >
> > I hope it helps.
>
> Hi!
>
> Thank you for your code! Is the new url/api documented somewhere? I
> can't find it anywhere...
I couldn't find too, but I found some scripts in python with the new
URL.
> Also, do you know if yahoo committed to keep
> this api working?
Well, It's not the first time that yahoo change their URL and API,
so...
I adapted the Quote.pm to get the currency from yahoo_json, where the
changes:
diff Quote.pm Quote.pm.orig
=========================================
39d38
< use JSON qw( decode_json );
53c52
< $YAHOO_CURRENCY_URL = "https://query1.finance.yahoo.com/v7/finance/qu
ote?symbols=";
---
> $YAHOO_CURRENCY_URL = "http://finance.yahoo.com/d/quotes.csv?e=.csv&f
=l1&s=";
253,254c253,254
< my $json_result = JSON::decode_json $data;
< my $exchange_rate = $json_result->{'quoteResponse'}{'result'}[0]-
>{'regularMarketPrice'};
---
> my $exchange_rate = $data;
>
==========================================
> best
> --
> erik colson
Rafael Casali
More information about the gnucash-user
mailing list