Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-09 Thread Kalpesh Patel
In case someone doesn't like yahoo_json (don't have to wait until their
releases are synched up on all CDN servers and prime time ready) and
Alphavantage (beat the throttling wait) ... the python way. Working on
multi-threaded one to make it faster ...

https://github.com/ka-patel/dl_quotes




--

Message: 1
Date: Mon, 8 May 2023 15:18:40 -0400
From: "John Layman" 
To: "'R Losey'" , "'David G. Pickett'"
    
Cc: 
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
Message-ID: <01d981e1$e67c22a0$b37467e0$@laymanandlayman.com>
Content-Type: text/plain;   charset="utf-8"

I used to get prices from Alphavantage but switched to Yahoo JSON somewhere
along the line.  My recent switch back to Alphavantage was a failure until I
brought F::Q up to date.  It's slow for the 40 quotes I routinely fetch, but
I think I need to re-acclimate to the slowness.  It appears to me that Yahoo
has intended all along to fully monetize their service and the loopholes are
just oversight on their part.  So I am giving up on Yahoo as a source.

I do however daily download prices into Excel using the new financial market
information data type of Microsoft 365.  It's just a trial, and I am
invested in a rather new American bond fund whose ticker goes unrecognized,
but it might ultimately provide a means of putting together an alternative
method of importing quotes.

-Original Message-
From: gnucash-user 
On Behalf Of R Losey
Sent: Monday, May 8, 2023 2:06 PM
To: David G. Pickett 
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error

Others will probably report this, but Alphavantage has a built-in one minute
delay for every 5 (I think 5)prices you look up; for example: 4
stocks: may take 7 seconds; 6 proces: 1 minute, 7 seconds; 12 prices: 2
minutes, 10 seconds...

I am talking about the free version of Alphavantage, but the way.


On Sat, May 6, 2023 at 3:08?PM David G. Pickett via gnucash-user <
gnucash-user@gnucash.org> wrote:

> PS: I give up on Yahoo!
> Switching all my securities to Alphadvantage was tiresome, as the gui 
> was no responsive to the keyboard, but I found the source could be 
> found using page up.  Some display at the security editor main screen 
> or somewhere would help to see which is running quotes where, how many
currently owned.
> I have many stocks not currently owned, and so they should not be quoted.
> I got more info out of an strace.  Having the security editor sort each
> list might be much nicer, too.   Ditto for the portfolio report.  Most
> reports in this world sort left to right, for some silly reason.
>
> Now it is so slow, and while some work, it locks up on some security.
> Maybe it needs a timeout error?  I resolves the host name over and over.
> Eventually only perl is running, and then nothing.  It takes a long 
> time just to get to "Found Finance::Quote version 1.5301."  I ran an 
> strace on the batch quotes, found a few stocks still on Yahoo by 
> accident (but yahoo was at least not hanging), reran, still running, 
> showing occasional activity, but really slow, so slow I was sure it 
> was dead, but no!  I can send the strace if it would help!  The yahoo 
> when working ran all my stocks in a few seconds.  OK for midnight 
> crontab but for the get quotes button is too slow.
> dgp@dgp-p6803w:~$ time trussx flatpak run --command=gnucash-cli 
> org.gnucash.GnuCash --quotes get -- 
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucash 2>tmp/quote.trFound 
> Finance::Quote version 1.5301.
> real6m3.619suser0m5.033ssys 0m12.509sdgp@dgp-p6803w:~$ time
> flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get -- 
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucashFound Finance::Quote version
> 1.5301.  real5m15.338suser0m0.056ssys 0m0.025sdgp@dgp-p6803w
> :~$
> I can send the strace, or make an strace, optionally with usec time 
> stamps, if desired.  POGSX did not have a 5/5 quote, only 5/4 for some 
> reason!
>
> -Original Message-
> From: David G. Pickett 
> To: gnucash-user@gnucash.org 
> Sent: Sat, May 6, 2023 1:51 pm
> Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
>
> Yeah, it's back.
>- Is Yahoo aware of their server rejects?
>- Is there some magic cookie or such we need to be authorized?  
> Many previous fixes proposed, which did not seem to prevent its return!
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or R

Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-09 Thread John Layman
I used to get prices from Alphavantage but switched to Yahoo JSON somewhere 
along the line.  My recent switch back to Alphavantage was a failure until I 
brought F::Q up to date.  It's slow for the 40 quotes I routinely fetch, but I 
think I need to re-acclimate to the slowness.  It appears to me that Yahoo has 
intended all along to fully monetize their service and the loopholes are just 
oversight on their part.  So I am giving up on Yahoo as a source.

I do however daily download prices into Excel using the new financial market 
information data type of Microsoft 365.  It's just a trial, and I am invested 
in a rather new American bond fund whose ticker goes unrecognized, but it might 
ultimately provide a means of putting together an alternative method of 
importing quotes.

-Original Message-
From: gnucash-user  On 
Behalf Of R Losey
Sent: Monday, May 8, 2023 2:06 PM
To: David G. Pickett 
Cc: gnucash-user@gnucash.org
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error

Others will probably report this, but Alphavantage has a built-in one minute 
delay for every 5 (I think 5)prices you look up; for example: 4
stocks: may take 7 seconds; 6 proces: 1 minute, 7 seconds; 12 prices: 2 
minutes, 10 seconds...

I am talking about the free version of Alphavantage, but the way.


On Sat, May 6, 2023 at 3:08 PM David G. Pickett via gnucash-user < 
gnucash-user@gnucash.org> wrote:

> PS: I give up on Yahoo!
> Switching all my securities to Alphadvantage was tiresome, as the gui 
> was no responsive to the keyboard, but I found the source could be 
> found using page up.  Some display at the security editor main screen 
> or somewhere would help to see which is running quotes where, how many 
> currently owned.
> I have many stocks not currently owned, and so they should not be quoted.
> I got more info out of an strace.  Having the security editor sort each
> list might be much nicer, too.   Ditto for the portfolio report.  Most
> reports in this world sort left to right, for some silly reason.
>
> Now it is so slow, and while some work, it locks up on some security.
> Maybe it needs a timeout error?  I resolves the host name over and over.
> Eventually only perl is running, and then nothing.  It takes a long 
> time just to get to "Found Finance::Quote version 1.5301."  I ran an 
> strace on the batch quotes, found a few stocks still on Yahoo by 
> accident (but yahoo was at least not hanging), reran, still running, 
> showing occasional activity, but really slow, so slow I was sure it 
> was dead, but no!  I can send the strace if it would help!  The yahoo 
> when working ran all my stocks in a few seconds.  OK for midnight 
> crontab but for the get quotes button is too slow.
> dgp@dgp-p6803w:~$ time trussx flatpak run --command=gnucash-cli 
> org.gnucash.GnuCash --quotes get -- 
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucash 2>tmp/quote.trFound 
> Finance::Quote version 1.5301.
> real6m3.619suser0m5.033ssys 0m12.509sdgp@dgp-p6803w:~$ time
> flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get -- 
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucashFound Finance::Quote version
> 1.5301.  real5m15.338suser0m0.056ssys 0m0.025sdgp@dgp-p6803w
> :~$
> I can send the strace, or make an strace, optionally with usec time 
> stamps, if desired.  POGSX did not have a 5/5 quote, only 5/4 for some 
> reason!
>
> -Original Message-
> From: David G. Pickett 
> To: gnucash-user@gnucash.org 
> Sent: Sat, May 6, 2023 1:51 pm
> Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
>
> Yeah, it's back.
>- Is Yahoo aware of their server rejects?
>- Is there some magic cookie or such we need to be authorized?  
> Many previous fixes proposed, which did not seem to prevent its return!
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


--
_
Richard Losey
rlo...@gmail.com
Micah 6:8
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread Bruce Schuck

On 5/8/23 8:56 PM, john wrote:

The api docs indicate only one symbol per request. I tried 
https://www.alphavantage.co/query?function=GLOBAL_QUOTE=IBM=AAPL=X  and got a quote only for AAPL so it seems the implication is valid.


I've been looking at a bunch of the modules lately. Some sources have 
that ability and I thought AV did too. I tried the same quick curl test. 
Bummer.


The throttling is done in F::Q's Alphavantage module 


Yep, exactly what I said. 'Unfortunately the AlphaVantage module 
throttles the requests regardless of API type (free or premium). Alpha 
Vantage should have an API that given an API key returns "free" or 
"premium".'


If there was a way to determine the key type, it would be trivial to 
remove the throttling. Maybe I'll shoot an email to their support.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread john



> On May 8, 2023, at 2:00 PM, Bruce Schuck  wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 5/8/23 13:05 PM, R Losey wrote:
> 
> > Others will probably report this, but Alphavantage has a built-in
> > one minute delay for every 5 (I think 5)prices you look up; for
> > example: 4 stocks: may take 7 seconds; 6 proces: 1 minute, 7 seconds;
> > 12 prices: 2 minutes, 10 seconds..
> > I am talking about the free version of Alphavantage, by the way.
> Unfortunately the AlphaVantage module throttles the requests regardless of 
> API type (free or premium). Alpha Vantage should have an API that given an 
> API key returns "free" or "premium".
> 
> Since data for more than one stock can be returned from a single API call, it 
> may be worth the time to rewrite the module so it fetches all the quotes at 
> once, or perhaps batches into groups of stocks.
> 
> I really have dug into how GnuCash calls the F::Q tool, but with the 
> possibility that different securities can have different sources, is F::Q 
> called once for each stock? Or does GC group them according to source and 
> make one F::Q invocation for each source?

The latter. 

Alphavantage does provide more quotes/minute for a price: "We are pleased to 
provide free stock API service for our global community of users for up to 5 
API requests per minute and 500 requests per day. If you would like to target a 
larger API call volume, please visit premium membership." 
(https://www.alphavantage.co/support/#api-key, "premium membership" is an 
anchor with href="https://www.alphavantage.co/premium/;). Premiu, pricing 
starts at $49.95/month for 75 requests per minute.

The api docs indicate only one symbol per request. I tried 
https://www.alphavantage.co/query?function=GLOBAL_QUOTE=IBM=AAPL=X
 and got a quote only for AAPL so it seems the implication is valid.

The throttling is done in F::Q's Alphavantage module 
(https://github.com/finance-quote/finance-quote/blob/e29e2d7f48473fc65601c0c45a934a03af4d33fc/lib/Finance/Quote/AlphaVantage.pm#L138)
 and doesn't know how to be conditional on whether the user's API key is 
premium. It throttles because if you ask for more than 5 quotes at once 
alphavantage will return 5 and quit, then not answer other requests until a 
minute has elapsed.

Regards,
John Ralls

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread Bruce Schuck

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 5/8/23 13:05 PM, R Losey wrote:

> Others will probably report this, but Alphavantage has a built-in
> one minute delay for every 5 (I think 5)prices you look up; for
> example: 4 stocks: may take 7 seconds; 6 proces: 1 minute, 7 seconds;
> 12 prices: 2 minutes, 10 seconds..
> I am talking about the free version of Alphavantage, by the way.
Unfortunately the AlphaVantage module throttles the requests regardless 
of API type (free or premium). Alpha Vantage should have an API that 
given an API key returns "free" or "premium".


Since data for more than one stock can be returned from a single API 
call, it may be worth the time to rewrite the module so it fetches all 
the quotes at once, or perhaps batches into groups of stocks.


I really have dug into how GnuCash calls the F::Q tool, but with the 
possibility that different securities can have different sources, is 
F::Q called once for each stock? Or does GC group them according to 
source and make one F::Q invocation for each source?


- - Bruce S.
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org

iHkEARECADkWIQRzL0H5rBaeDPnpeL1IjAeprJFQBwUCZFliyhscYnNjaHVja0Bh
c2dhcmQtc3lzdGVtcy5jb20ACgkQSIwHqayRUAdIJQCgwtr6JWRm5xfrdiTueD3/
CPMaiE0AniuNejWhcX6W5KENK6sMc1fCgFpF
=Q5rU
-END PGP SIGNATURE-
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread David Carlson
This hasn't been repeated for a while, So I will add that the work-around
that Bruce Schuck offered in his email Saturday, May 6 at 2:12 PM Central
time (well, that's where I live) to change

my $YIND_URL_HEAD = '
https://query1.finance.yahoo.com/v7/finance/quote?symbols='; to
my $YIND_URL_HEAD = '
https://query1.finance.yahoo.com/v6/finance/quote?symbols=';

in the correct Yahoo.JSON.pm  file does work.  It is easy to find on a
Linux machine, but you need root privileges to edit it.


On Mon, May 8, 2023 at 2:22 PM David T. via gnucash-user <
gnucash-user@gnucash.org> wrote:

> All good points!
>
> ⁣David T. ​
>
> On May 8, 2023, 7:36 PM, at 7:36 PM, Bruce Schuck <
> bsch...@asgard-systems.com> wrote:
> >On 5/8/23 13:05 +0300, David T. wrote:
> >
> >> It's a wiki, so you could put it in. You'd get to decide where that
> >> would best live, too.
> >
> >Perhaps sometime during the week I'll add something. With the obvious
> >warnings about making backups and the possibility of making a mess for
> >one's self.
> >
> >> FWIW, my method for doing this is to save the file as an SQLite
> >> file, open the result in a DB reader, locate the appropriate table
> >> there, and execute the change globally. Then I reopen the file in
> >> GnuCash and save it back to xml.
> >
> >> It feels easier to me to do it this way and it doesn't take much
> >> time.
> >
> >SQLite queries may be a bit more than some users are willing to try.
> >But
> >I can see where it would be easy for those comfortable with it. Same
> >reason xmlstarlet would be simple for those familiar with it.
> >
> >If I unpacked the .gnucash file to foobar.gnucash, this command would
> >change the quote source globally.
> >
> >xmlstarlet ed --inplace -u
> >'/gnc-v2/gnc:book/gnc:commodity/cmdty:quote_source["yahoo_json"]' -v
> >'alphavantage' foobar.gnucash
> >
> >One can also selectively change the quote source for a specific
> >namespace. This command would change the quote source for just the
> >NASDAQ securities.
> >
> >xmlstarlet ed --inplace -u
>
> >'/gnc-v2/gnc:book/gnc:commodity[cmdty:space="NASDAQ"]/cmdty:quote_source["yahoo_json"]'
> >
> >-v 'alphavantage' foobar.gnucash
> >
> >- Bruce S.
> >___
> >gnucash-user mailing list
> >gnucash-user@gnucash.org
> >To update your subscription preferences or to unsubscribe:
> >https://lists.gnucash.org/mailman/listinfo/gnucash-user
> >-
> >Please remember to CC this list on all your replies.
> >You can do this by using Reply-To-List or Reply-All.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread David T. via gnucash-user
All good points! 

⁣David T. ​

On May 8, 2023, 7:36 PM, at 7:36 PM, Bruce Schuck  
wrote:
>On 5/8/23 13:05 +0300, David T. wrote:
>
>> It's a wiki, so you could put it in. You'd get to decide where that 
>> would best live, too.
>
>Perhaps sometime during the week I'll add something. With the obvious
>warnings about making backups and the possibility of making a mess for
>one's self.
>
>> FWIW, my method for doing this is to save the file as an SQLite
>> file, open the result in a DB reader, locate the appropriate table
>> there, and execute the change globally. Then I reopen the file in
>> GnuCash and save it back to xml.
>
>> It feels easier to me to do it this way and it doesn't take much 
>> time.
>
>SQLite queries may be a bit more than some users are willing to try.
>But 
>I can see where it would be easy for those comfortable with it. Same 
>reason xmlstarlet would be simple for those familiar with it.
>
>If I unpacked the .gnucash file to foobar.gnucash, this command would 
>change the quote source globally.
>
>xmlstarlet ed --inplace -u 
>'/gnc-v2/gnc:book/gnc:commodity/cmdty:quote_source["yahoo_json"]' -v 
>'alphavantage' foobar.gnucash
>
>One can also selectively change the quote source for a specific 
>namespace. This command would change the quote source for just the 
>NASDAQ securities.
>
>xmlstarlet ed --inplace -u 
>'/gnc-v2/gnc:book/gnc:commodity[cmdty:space="NASDAQ"]/cmdty:quote_source["yahoo_json"]'
>
>-v 'alphavantage' foobar.gnucash
>
>- Bruce S.
>___
>gnucash-user mailing list
>gnucash-user@gnucash.org
>To update your subscription preferences or to unsubscribe:
>https://lists.gnucash.org/mailman/listinfo/gnucash-user
>-
>Please remember to CC this list on all your replies.
>You can do this by using Reply-To-List or Reply-All.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread R Losey
Others will probably report this, but Alphavantage has a built-in one
minute delay for every 5 (I think 5)prices you look up; for example: 4
stocks: may take 7 seconds; 6 proces: 1 minute, 7 seconds; 12 prices: 2
minutes, 10 seconds...

I am talking about the free version of Alphavantage, but the way.


On Sat, May 6, 2023 at 3:08 PM David G. Pickett via gnucash-user <
gnucash-user@gnucash.org> wrote:

> PS: I give up on Yahoo!
> Switching all my securities to Alphadvantage was tiresome, as the gui was
> no responsive to the keyboard, but I found the source could be found using
> page up.  Some display at the security editor main screen or somewhere
> would help to see which is running quotes where, how many currently owned.
> I have many stocks not currently owned, and so they should not be quoted.
> I got more info out of an strace.  Having the security editor sort each
> list might be much nicer, too.   Ditto for the portfolio report.  Most
> reports in this world sort left to right, for some silly reason.
>
> Now it is so slow, and while some work, it locks up on some security.
> Maybe it needs a timeout error?  I resolves the host name over and over.
> Eventually only perl is running, and then nothing.  It takes a long time
> just to get to "Found Finance::Quote version 1.5301."  I ran an strace on
> the batch quotes, found a few stocks still on Yahoo by accident (but yahoo
> was at least not hanging), reran, still running, showing occasional
> activity, but really slow, so slow I was sure it was dead, but no!  I can
> send the strace if it would help!  The yahoo when working ran all my stocks
> in a few seconds.  OK for midnight crontab but for the get quotes button is
> too slow.
> dgp@dgp-p6803w:~$ time trussx flatpak run --command=gnucash-cli
> org.gnucash.GnuCash --quotes get --
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucash 2>tmp/quote.trFound
> Finance::Quote version 1.5301.
> real6m3.619suser0m5.033ssys 0m12.509sdgp@dgp-p6803w:~$ time
> flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get --
> /home/dgp/GnuCash/ubuntu-DGPickett.gnucashFound Finance::Quote version
> 1.5301.  real5m15.338suser0m0.056ssys 0m0.025sdgp@dgp-p6803w
> :~$
> I can send the strace, or make an strace, optionally with usec time
> stamps, if desired.  POGSX did not have a 5/5 quote, only 5/4 for some
> reason!
>
> -Original Message-----
> From: David G. Pickett 
> To: gnucash-user@gnucash.org 
> Sent: Sat, May 6, 2023 1:51 pm
> Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
>
> Yeah, it's back.
>- Is Yahoo aware of their server rejects?
>- Is there some magic cookie or such we need to be authorized?  Many
> previous fixes proposed, which did not seem to prevent its return!
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
_
Richard Losey
rlo...@gmail.com
Micah 6:8
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread Bruce Schuck

On 5/8/23 13:05 +0300, David T. wrote:

It's a wiki, so you could put it in. You'd get to decide where that 
would best live, too.


Perhaps sometime during the week I'll add something. With the obvious
warnings about making backups and the possibility of making a mess for
one's self.


FWIW, my method for doing this is to save the file as an SQLite
file, open the result in a DB reader, locate the appropriate table
there, and execute the change globally. Then I reopen the file in
GnuCash and save it back to xml.


It feels easier to me to do it this way and it doesn't take much 
time.


SQLite queries may be a bit more than some users are willing to try. But 
I can see where it would be easy for those comfortable with it. Same 
reason xmlstarlet would be simple for those familiar with it.


If I unpacked the .gnucash file to foobar.gnucash, this command would 
change the quote source globally.


xmlstarlet ed --inplace -u 
'/gnc-v2/gnc:book/gnc:commodity/cmdty:quote_source["yahoo_json"]' -v 
'alphavantage' foobar.gnucash


One can also selectively change the quote source for a specific 
namespace. This command would change the quote source for just the 
NASDAQ securities.


xmlstarlet ed --inplace -u 
'/gnc-v2/gnc:book/gnc:commodity[cmdty:space="NASDAQ"]/cmdty:quote_source["yahoo_json"]' 
-v 'alphavantage' foobar.gnucash


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-08 Thread David T. via gnucash-user
It's a wiki, so you could put it in. You'd get to decide where that would best 
live, too.

FWIW, my method for doing this is to save the file as an SQLite file, open the 
result in a DB reader, locate the appropriate table there, and execute the 
change globally. Then I reopen the file in GnuCash and save it back to xml.

It feels easier to me to do it this way and it doesn't take much time.

⁣
David T.​

On May 8, 2023, 04:03, at 04:03, Bruce Schuck  
wrote:
>To the maintainers of the Wiki, would this be something perhaps helpful
>
>to include in the section about stocks and commodities?
>
>I can also add 'xmlstarlet' commands as an alternative to manually 
>editing the file.
>
>- Bruce S.
>
>On 05/07/23 15:12:21 EDT Bruce Schuck bschuck at asgard-systems.com
>wrote:
>
>> Last time I switched en-masse (alphavantage to yahoo_json) I manually
> > edited my foobar.gnucash file. Worked like a charm.
>
>** Create a backup ** of foobar.gnucash before following these steps.
>Replace 'vim' with your preferred editor.
>
>~$ cp /foobar.gnucash /tmp/foobar.gnucash.gz
>~$ cd /tmp
>/tmp $ gunzip foobar.gnucash
>/tmp $ vim foobar.gnucash
>
>In vim, change lines
>
>alphavantage
>
>to
>
>yahoo_json
>
>Save and exit
>
>/tmp $ gzip foobar.gnucash
>/tmp $ cp foobar.gnucash.gz /foobar.gnucash
>
> > Run GnuCash, confirm quote sources for a random few securities.
>
> > There is also a handy tool for editing XML files on the fly,
> > xmlstarlet. It can also be used to modify the uncompressed
> > .gnucash file.
>
>- Bruce S.
>___
>gnucash-user mailing list
>gnucash-user@gnucash.org
>To update your subscription preferences or to unsubscribe:
>https://lists.gnucash.org/mailman/listinfo/gnucash-user
>-
>Please remember to CC this list on all your replies.
>You can do this by using Reply-To-List or Reply-All.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-07 Thread john
If it includes sufficient warnings about working on a copy and voiding your 
warranty, sure.

Regards,
John Ralls


> On May 7, 2023, at 6:02 PM, Bruce Schuck  wrote:
> 
> To the maintainers of the Wiki, would this be something perhaps helpful to 
> include in the section about stocks and commodities?
> 
> I can also add 'xmlstarlet' commands as an alternative to manually editing 
> the file.
> 
> - Bruce S.
> 
> On 05/07/23 15:12:21 EDT Bruce Schuck bschuck at asgard-systems.com wrote:
> 
> > Last time I switched en-masse (alphavantage to yahoo_json) I manually
> > edited my foobar.gnucash file. Worked like a charm.
> 
> ** Create a backup ** of foobar.gnucash before following these steps.
> Replace 'vim' with your preferred editor.
> 
> ~$ cp /foobar.gnucash /tmp/foobar.gnucash.gz
> ~$ cd /tmp
> /tmp $ gunzip foobar.gnucash
> /tmp $ vim foobar.gnucash
> 
> In vim, change lines
> 
> alphavantage
> 
> to
> 
> yahoo_json
> 
> Save and exit
> 
> /tmp $ gzip foobar.gnucash
> /tmp $ cp foobar.gnucash.gz /foobar.gnucash
> 
> > Run GnuCash, confirm quote sources for a random few securities.
> 
> > There is also a handy tool for editing XML files on the fly,
> > xmlstarlet. It can also be used to modify the uncompressed
> > .gnucash file.
> 
> - Bruce S.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-07 Thread Bruce Schuck
To the maintainers of the Wiki, would this be something perhaps helpful 
to include in the section about stocks and commodities?


I can also add 'xmlstarlet' commands as an alternative to manually 
editing the file.


- Bruce S.

On 05/07/23 15:12:21 EDT Bruce Schuck bschuck at asgard-systems.com wrote:

> Last time I switched en-masse (alphavantage to yahoo_json) I manually
> edited my foobar.gnucash file. Worked like a charm.

** Create a backup ** of foobar.gnucash before following these steps.
Replace 'vim' with your preferred editor.

~$ cp /foobar.gnucash /tmp/foobar.gnucash.gz
~$ cd /tmp
/tmp $ gunzip foobar.gnucash
/tmp $ vim foobar.gnucash

In vim, change lines

alphavantage

to

yahoo_json

Save and exit

/tmp $ gzip foobar.gnucash
/tmp $ cp foobar.gnucash.gz /foobar.gnucash

> Run GnuCash, confirm quote sources for a random few securities.

> There is also a handy tool for editing XML files on the fly,
> xmlstarlet. It can also be used to modify the uncompressed
> .gnucash file.

- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-07 Thread Bruce Schuck

On 5/7/23 11:33, David G. Pickett wrote:

I have previously posted my mystery regarding why I am stuck 1.5301 
even after downloading and installing later versions!  I went to 
flatpak to get later releases than the Ubuntu base.  I guess I can 
start doing uninstall hacks using synaptics!  If it is not broke 



Still partly my bad. When I push interim releases to CPAN/PAUSE I have 
to remember to use the 1.dd_dd format instead of 1.. Otherwise the 
distro gets indexed as an official release.



Switching all my securities to Alphadvantage was tiresome, as the
gui was no responsive to the keyboard, but I found the source could
be found using page up.
Last time I switched en-masse (alphavantage to yahoo_json) I manually 
edited my foobar.gnucash file. Worked like a charm.


** Create a backup ** of foobar.gnucash before following these steps. 
Replace 'vim' with your preferred editor.


~$ cp /foobar.gnucash /tmp/foobar.gnucash.gz
~$ cd /tmp
/tmp $ gunzip foobar.gnucash
/tmp $ vim foobar.gnucash

In vim, change lines

alphavantage

to

yahoo_json

Save and exit

/tmp $ gzip foobar.gnucash
/tmp $ cp foobar.gnucash.gz /foobar.gnucash

Run GnuCash, confirm quote sources for a random few securities.

There is also a handy tool for editing XML files on the fly, xmlstarlet. 
It can also be used to modify the uncompressed .gnucash file.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-07 Thread David G. Pickett via gnucash-user
I have previously posted my mystery regarding why I am stuck 1.5301 even after 
downloading and installing later versions!  I went to flatpak to get later 
releases than the Ubuntu base.  I guess I can start doing uninstall hacks using 
synaptics!  If it is not broke 


-Original Message-
From: Bruce Schuck 
To: gnucash-user@gnucash.org 
Cc: dgpick...@aol.com
Sent: Sat, May 6, 2023 9:16 pm
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error

> Switching all my securities to Alphadvantage was tiresome, as the
> gui was no responsive to the keyboard, but I found the source could be found
> using page up.  Some display at the security editor main screen or
> somewhere would help to see which is running quotes where, how many
> currently owned. I have many stocks not currently owned, and so they
> should not be quoted.  I got more info out of an strace.  Having the
> security editor sort each list might be much nicer, too.  Ditto for the
> portfolio report.  Most reports in this world sort left to right, for
> some silly reason.

This has been a problem with AlphaVantage since they started throttling 
responses for those using the free API key.

> Now it is so slow, and while some work, it locks up on some security.
> Maybe it needs a timeout error?  I resolves the host name over and over.
> Eventually only perl is running, and then nothing.  It takes a long
> time just to get to "Found Finance::Quote version 1.5301." 

Hmm... how did 1.5301 get into a flatpak? The official F::Q releases are 
1.xx with only 2 digits following the major release number. Crap... 
looks like my screw-up. I uploaded 1.5301 instead of 1.53_01, which was 
a pre-release of 1.54. I did the same for 1.5402 today and it's 
currently being deleted. Juggling too many tasks at once. Sorry all.

As stated in another thread pertaining to this issue, find the proper 
YahooJSON.pm file and edit it changing

my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';

to

my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';

Quick fix seems to work.

New file with the quick fix uploaded to CPAN - 
https://www.cpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.54_03.tar.gz.

It can be installed in cpan as BPSCHUCK/Finance-Quote-1.54_03.tar.gz.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Colin Arndt
Thank you Bruce. That fixed it and was a lot quicker than changing ~30 
securities to a new provider.

For anyone else on macOS, the location was:
/Library/Perl/5.30/Finance/Quote/YahooJSON.pm 

Best,
Colin

> On May 6, 2023, at 3:19 PM, gnucash-user-requ...@gnucash.org wrote:
> 
> --
> 
> Message: 8
> Date: Sat, 6 May 2023 12:12:12 -0700
> From: Bruce Schuck  <mailto:bsch...@asgard-systems.com>>
> To: gnucash-user@gnucash.org <mailto:gnucash-user@gnucash.org>
> Cc: farle...@gmail.com <mailto:farle...@gmail.com>
> Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
> Message-ID: <37705e31-b6a2-6faf-3007-83a0e9ce5...@asgard-systems.com 
> <mailto:37705e31-b6a2-6faf-3007-83a0e9ce5...@asgard-systems.com>>
> Content-Type: text/plain; charset=UTF-8; format=flowed
> 
> Ken,
> 
> I am currently evaluating which of the alternatives is the best 
> replacement. I'm also a little hopeful that in the meantime the 
> functionality of the current URL/API is restored before the time is 
> spent to not only make the changes, but the related housekeeping 
> necessary before pushing an official release to CPAN.
> 
> In the mean time, for those savvy enough to find and edit the 
> YahooJSON.pm file on their system, a quick fix is to change this line:
> 
> my $YIND_URL_HEAD = 
> 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';
> 
> to:
> 
> my $YIND_URL_HEAD = 
> 'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';
> 
> Be wary that there may be multiple versions of the YahooJSON.pm file and 
> a system, so be certain to modify the correct one.
> 
> - Bruce S.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Ken Farley

Bruce,

It's okay, I'm not an expert with Perl, but have done a lot of 
programming. I used one of the methods proposed to extract the data I 
need and use it. It's not elegant code, but as with all such 
investigations that eventually get solved, it's so satisfying to have 
done it. And I learned a bit more of the language in the process.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Bruce Schuck

Switching all my securities to Alphadvantage was tiresome, as the
gui was no responsive to the keyboard, but I found the source could be found
using page up.  Some display at the security editor main screen or
somewhere would help to see which is running quotes where, how many
currently owned. I have many stocks not currently owned, and so they
should not be quoted.  I got more info out of an strace.  Having the
security editor sort each list might be much nicer, too.   Ditto for the
portfolio report.  Most reports in this world sort left to right, for
some silly reason.


This has been a problem with AlphaVantage since they started throttling 
responses for those using the free API key.



Now it is so slow, and while some work, it locks up on some security.
Maybe it needs a timeout error?  I resolves the host name over and over.
Eventually only perl is running, and then nothing.  It takes a long
time just to get to "Found Finance::Quote version 1.5301." 


Hmm... how did 1.5301 get into a flatpak? The official F::Q releases are 
1.xx with only 2 digits following the major release number. Crap... 
looks like my screw-up. I uploaded 1.5301 instead of 1.53_01, which was 
a pre-release of 1.54. I did the same for 1.5402 today and it's 
currently being deleted. Juggling too many tasks at once. Sorry all.


As stated in another thread pertaining to this issue, find the proper 
YahooJSON.pm file and edit it changing


my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';


to

my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';


Quick fix seems to work.

New file with the quick fix uploaded to CPAN - 
https://www.cpan.org/authors/id/B/BP/BPSCHUCK/Finance-Quote-1.54_03.tar.gz.


It can be installed in cpan as BPSCHUCK/Finance-Quote-1.54_03.tar.gz.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Bruce Schuck

On Sat, May 6 2023 at 17:45 EDT Michael wrote:


Thanks Bruce.  Worked great calling the v6 version of the API.


In the mean time, for those savvy enough to find and edit the 
YahooJSON.pm file on their system, a quick fix is to change this

line:


my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';



to:


my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';



Be wary that there may be multiple versions of the YahooJSON.pm
file and a system, so be certain to modify the correct one.
This quick fix and a few other recent changes to be incorporated in 
v1.55 has been pushed to CPAN.


https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.5402.tar.gz

- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Fross, Michael
Thanks Bruce.  Worked great calling the v6 version of the API.

On Sat, May 6, 2023 at 2:13 PM Bruce Schuck 
wrote:

> Ken,
>
> I am currently evaluating which of the alternatives is the best
> replacement. I'm also a little hopeful that in the meantime the
> functionality of the current URL/API is restored before the time is
> spent to not only make the changes, but the related housekeeping
> necessary before pushing an official release to CPAN.
>
> In the mean time, for those savvy enough to find and edit the
> YahooJSON.pm file on their system, a quick fix is to change this line:
>
> my $YIND_URL_HEAD =
> 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';
>
> to:
>
> my $YIND_URL_HEAD =
> 'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';
>
> Be wary that there may be multiple versions of the YahooJSON.pm file and
> a system, so be certain to modify the correct one.
>
> - Bruce S.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread David G. Pickett via gnucash-user
PS: I give up on Yahoo!
Switching all my securities to Alphadvantage was tiresome, as the gui was no 
responsive to the keyboard, but I found the source could be found using page 
up.  Some display at the security editor main screen or somewhere would help to 
see which is running quotes where, how many currently owned. I have many stocks 
not currently owned, and so they should not be quoted.  I got more info out of 
an strace.  Having the security editor sort each list might be much nicer, too. 
  Ditto for the portfolio report.  Most reports in this world sort left to 
right, for some silly reason.

Now it is so slow, and while some work, it locks up on some security.  Maybe it 
needs a timeout error?  I resolves the host name over and over.  Eventually 
only perl is running, and then nothing.  It takes a long time just to get to 
"Found Finance::Quote version 1.5301."  I ran an strace on the batch quotes, 
found a few stocks still on Yahoo by accident (but yahoo was at least not 
hanging), reran, still running, showing occasional activity, but really slow, 
so slow I was sure it was dead, but no!  I can send the strace if it would 
help!  The yahoo when working ran all my stocks in a few seconds.  OK for 
midnight crontab but for the get quotes button is too slow.
dgp@dgp-p6803w:~$ time trussx flatpak run --command=gnucash-cli 
org.gnucash.GnuCash --quotes get -- /home/dgp/GnuCash/ubuntu-DGPickett.gnucash 
2>tmp/quote.trFound Finance::Quote version 1.5301.
real    6m3.619suser    0m5.033ssys     0m12.509sdgp@dgp-p6803w:~$ time flatpak 
run --command=gnucash-cli org.gnucash.GnuCash --quotes get -- 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucashFound Finance::Quote version 1.5301.  
real    5m15.338suser    0m0.056ssys     0m0.025sdgp@dgp-p6803w:~$ 
I can send the strace, or make an strace, optionally with usec time stamps, if 
desired.  POGSX did not have a 5/5 quote, only 5/4 for some reason!

-Original Message-
From: David G. Pickett 
To: gnucash-user@gnucash.org 
Sent: Sat, May 6, 2023 1:51 pm
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error

Yeah, it's back.     
   - Is Yahoo aware of their server rejects?  
   - Is there some magic cookie or such we need to be authorized?  Many 
previous fixes proposed, which did not seem to prevent its return!
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Bruce Schuck

On 5/6/23 17:51, David G. Pickett wrote:


Yeah, it's back.??

> - Is Yahoo aware of their server rejects???

- Is there some magic cookie or such we need to be authorized??

>   Many previous fixes proposed, which did not seem to prevent
>   its return!

I don't believe the APIs F::Q uses in the YahooJSON.pm module are meant 
for general public use. Yes, they are calls made when finance.yahoo.com 
web pages load, but I'm thinking that Yahoo is trying to use CORs 
filters, cookies, and other mechanisms to limit access.


Who's to say that after spending time to change the module to utilize a 
different URL, it also doesn't start returning errors because Yahoo is 
securing how people can fetch the securities data.


Companies pay big $$ for realtime access to the securities data, and 
with that comes licensing and limitations on how it can be shared, 
resold, etc. That is why you see many companies use API keys, and the 
freely available keys have limited access. Years ago (late 1980s, early 
1990s) I worked for a company that paid for a satellite feed from 
Comstock I believe. It was data for our services provided to a few 
securities and financial services companies. It was my project to write 
the collection and parsing programs on Unix/Linux when we first 
purchased that feed.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Bruce Schuck

Ken,

I am currently evaluating which of the alternatives is the best 
replacement. I'm also a little hopeful that in the meantime the 
functionality of the current URL/API is restored before the time is 
spent to not only make the changes, but the related housekeeping 
necessary before pushing an official release to CPAN.


In the mean time, for those savvy enough to find and edit the 
YahooJSON.pm file on their system, a quick fix is to change this line:


my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v7/finance/quote?symbols=';


to:

my $YIND_URL_HEAD = 
'https://query1.finance.yahoo.com/v6/finance/quote?symbols=';


Be wary that there may be multiple versions of the YahooJSON.pm file and 
a system, so be certain to modify the correct one.


- Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread David G. Pickett via gnucash-user
Yeah, it's back.     
   - Is Yahoo aware of their server rejects?  
   - Is there some magic cookie or such we need to be authorized?  Many 
previous fixes proposed, which did not seem to prevent its return!
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-06 Thread Ken Farley
This message from the list contains links to the development bug reports 
for the Finance:Quote module:


https://lists.gnucash.org/pipermail/gnucash-user/2023-May/106863.html

If you look at those reports, there are alternate queries discussed that 
could provide the data needed. They need to be implemented. If you are 
able to work with Perl you could code your own module to get quotes 
based on the suggestions.


If you do decide to pursue this kind of thing, you'll also need to 
research how to add your module to the list of modules Gnucash will 
provide to you. You basically have to (very carefully) include it in the 
list of modules presented in the Quote.pm module.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-04 Thread David Carlson
Not working for me either.

Was there someone that had a work-around for GnuCash?



On Thu, May 4, 2023 at 6:40 PM Ken Farley  wrote:

> Don't know if this is going to be a periodic thing that happens, or if
> it is just me, but this is going on again. Guess I'll wait a day or two
> and see if it "recovers", unless someone feels it's only my setup that
> is failing...
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-05-04 Thread Ken Farley
Don't know if this is going to be a periodic thing that happens, or if 
it is just me, but this is going on again. Guess I'll wait a day or two 
and see if it "recovers", unless someone feels it's only my setup that 
is failing...

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-20 Thread David H
Yes appears to be all good again this morning.

Cheers David H.

On Fri, 21 Apr 2023 at 01:29, Murugan Muruganandam <
m.muruganan...@hotmail.com> wrote:

> just checked, yahoo is back with v7 and am able to update pricing.
>
>
>
>
> Saludos Cordiales
>
>
> Murugan
>
> 
> From: gnucash-user  hotmail@gnucash.org> on behalf of Tom Teixeira <
> tjteixe...@earthlink.net>
> Sent: Thursday, April 20, 2023 9:47 AM
> To: gnucash-user@gnucash.org 
> Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error
>
> Other projects using Yahoo for finance quotes are running into the issue
> as well. https://github.com/joshuaulrich/quantmod/issues/382 is
> interesting because someone has developed a patch, but I don't think
> they are using Finance::Quotes. I'm not sure how to get this patch
> raised to the attention of people who might be working on Finance::Quotes.
>
> On 4/19/23 10:31 PM, Bruce Schuck wrote:
> > On Wed, 19 Apr 2023 20:37:09 Murugan
> > Muruganandam wrote:
> >
> >> Today when i ran get quote got the following error message
> >
> >> Finance::Quote reported a failure for symbol acn: Error retrieving
> >> quote for acn. Attempt to fetch the
> >> URLhttps://query1.finance.yahoo.com/v7/finance/quote?symbols=acn
> >> resulted in HTTP response 401 (Unauthorized)
> >
> >> When i queried the url i got the same error, if i change to v6
> >> instead of v7 , it is providing me the quotes correctly both in
> >> browser and in GNU (changed it in YahooJSON.pm)
> >
> > That seems to have stopped working as well. I tried v6 and v8 earlier.
> >
> > % curl --silent --include
> > https://query1.finance.yahoo.com/v6/finance/quote?symbols=acn
> >
> > HTTP/2 404
> > content-type: application/json;charset=utf-8
> > y-rid: e0e9j0di418rs
> > x-yahoo-request-id: e0e9j0di418rs
> > x-request-id: 18b17b37-84d3-4742-89be-88a028087d51
> > content-length: 91
> > x-envoy-upstream-service-time: 1
> > date: Thu, 20 Apr 2023 02:29:16 GMT
> > server: ATS
> > x-envoy-decorator-operation:
> > finance-quote-api--mtls-production-gq1.finance-k8s.svc.yahoo.local:4080/*
> > cache-control: max-age=0, private
> > expires: -1
> > age: 0
> > strict-transport-security: max-age=31536000
> > referrer-policy: no-referrer-when-downgrade
> > x-frame-options: SAMEORIGIN
> > expect-ct: max-age=31536000,
> > report-uri="
> http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only;
> > x-xss-protection: 1; mode=block
> > x-content-type-options: nosniff
> >
> > {"finance":{"result":null,"error":{"code":"Not
> > Found","description":"HTTP 404 Not Found"}}}
> >
> > ___
> > gnucash-user mailing list
> > gnucash-user@gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
>
>
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-20 Thread Murugan Muruganandam
just checked, yahoo is back with v7 and am able to update pricing.




Saludos Cordiales


Murugan


From: gnucash-user 
 on behalf of Tom 
Teixeira 
Sent: Thursday, April 20, 2023 9:47 AM
To: gnucash-user@gnucash.org 
Subject: Re: [GNC] Yahoo JSON - throwing unauthorized error

Other projects using Yahoo for finance quotes are running into the issue
as well. https://github.com/joshuaulrich/quantmod/issues/382 is
interesting because someone has developed a patch, but I don't think
they are using Finance::Quotes. I'm not sure how to get this patch
raised to the attention of people who might be working on Finance::Quotes.

On 4/19/23 10:31 PM, Bruce Schuck wrote:
> On Wed, 19 Apr 2023 20:37:09 Murugan
> Muruganandam wrote:
>
>> Today when i ran get quote got the following error message
>
>> Finance::Quote reported a failure for symbol acn: Error retrieving
>> quote for acn. Attempt to fetch the
>> URLhttps://query1.finance.yahoo.com/v7/finance/quote?symbols=acn
>> resulted in HTTP response 401 (Unauthorized)
>
>> When i queried the url i got the same error, if i change to v6
>> instead of v7 , it is providing me the quotes correctly both in
>> browser and in GNU (changed it in YahooJSON.pm)
>
> That seems to have stopped working as well. I tried v6 and v8 earlier.
>
> % curl --silent --include
> https://query1.finance.yahoo.com/v6/finance/quote?symbols=acn
>
> HTTP/2 404
> content-type: application/json;charset=utf-8
> y-rid: e0e9j0di418rs
> x-yahoo-request-id: e0e9j0di418rs
> x-request-id: 18b17b37-84d3-4742-89be-88a028087d51
> content-length: 91
> x-envoy-upstream-service-time: 1
> date: Thu, 20 Apr 2023 02:29:16 GMT
> server: ATS
> x-envoy-decorator-operation:
> finance-quote-api--mtls-production-gq1.finance-k8s.svc.yahoo.local:4080/*
> cache-control: max-age=0, private
> expires: -1
> age: 0
> strict-transport-security: max-age=31536000
> referrer-policy: no-referrer-when-downgrade
> x-frame-options: SAMEORIGIN
> expect-ct: max-age=31536000,
> report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only;
> x-xss-protection: 1; mode=block
> x-content-type-options: nosniff
>
> {"finance":{"result":null,"error":{"code":"Not
> Found","description":"HTTP 404 Not Found"}}}
>
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-20 Thread Tom Teixeira
Other projects using Yahoo for finance quotes are running into the issue 
as well. https://github.com/joshuaulrich/quantmod/issues/382 is 
interesting because someone has developed a patch, but I don't think 
they are using Finance::Quotes. I'm not sure how to get this patch 
raised to the attention of people who might be working on Finance::Quotes.


On 4/19/23 10:31 PM, Bruce Schuck wrote:

On Wed, 19 Apr 2023 20:37:09 Murugan
Muruganandam wrote:


Today when i ran get quote got the following error message



Finance::Quote reported a failure for symbol acn: Error retrieving
quote for acn. Attempt to fetch the
URLhttps://query1.finance.yahoo.com/v7/finance/quote?symbols=acn
resulted in HTTP response 401 (Unauthorized)



When i queried the url i got the same error, if i change to v6
instead of v7 , it is providing me the quotes correctly both in
browser and in GNU (changed it in YahooJSON.pm)


That seems to have stopped working as well. I tried v6 and v8 earlier.

% curl --silent --include 
https://query1.finance.yahoo.com/v6/finance/quote?symbols=acn


HTTP/2 404
content-type: application/json;charset=utf-8
y-rid: e0e9j0di418rs
x-yahoo-request-id: e0e9j0di418rs
x-request-id: 18b17b37-84d3-4742-89be-88a028087d51
content-length: 91
x-envoy-upstream-service-time: 1
date: Thu, 20 Apr 2023 02:29:16 GMT
server: ATS
x-envoy-decorator-operation: 
finance-quote-api--mtls-production-gq1.finance-k8s.svc.yahoo.local:4080/*

cache-control: max-age=0, private
expires: -1
age: 0
strict-transport-security: max-age=31536000
referrer-policy: no-referrer-when-downgrade
x-frame-options: SAMEORIGIN
expect-ct: max-age=31536000, 
report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only;

x-xss-protection: 1; mode=block
x-content-type-options: nosniff

{"finance":{"result":null,"error":{"code":"Not 
Found","description":"HTTP 404 Not Found"}}}


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.



___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-19 Thread Bruce Schuck

On Wed, 19 Apr 2023 20:37:09 Murugan
Muruganandam wrote:


Today when i ran get quote got the following error message



Finance::Quote reported a failure for symbol acn: Error retrieving
quote for acn. Attempt to fetch the
URLhttps://query1.finance.yahoo.com/v7/finance/quote?symbols=acn
resulted in HTTP response 401 (Unauthorized)



When i queried the url i got the same error, if i change to v6
instead of v7 , it is providing me the quotes correctly both in
browser and in GNU (changed it in YahooJSON.pm)


That seems to have stopped working as well. I tried v6 and v8 earlier.

% curl --silent --include 
https://query1.finance.yahoo.com/v6/finance/quote?symbols=acn


HTTP/2 404
content-type: application/json;charset=utf-8
y-rid: e0e9j0di418rs
x-yahoo-request-id: e0e9j0di418rs
x-request-id: 18b17b37-84d3-4742-89be-88a028087d51
content-length: 91
x-envoy-upstream-service-time: 1
date: Thu, 20 Apr 2023 02:29:16 GMT
server: ATS
x-envoy-decorator-operation: 
finance-quote-api--mtls-production-gq1.finance-k8s.svc.yahoo.local:4080/*

cache-control: max-age=0, private
expires: -1
age: 0
strict-transport-security: max-age=31536000
referrer-policy: no-referrer-when-downgrade
x-frame-options: SAMEORIGIN
expect-ct: max-age=31536000, 
report-uri="http://csp.yahoo.com/beacon/csp?src=yahoocom-expect-ct-report-only;

x-xss-protection: 1; mode=block
x-content-type-options: nosniff

{"finance":{"result":null,"error":{"code":"Not 
Found","description":"HTTP 404 Not Found"}}}


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-19 Thread Fross, Michael
I hope they've not removed it as a free data source.  That would be a shame.

Michael

On Wed, Apr 19, 2023 at 5:29 PM David H  wrote:

> Yes, I also saw the same error this morning.
>
> Cheers David H.
>
>
> On Thu, 20 Apr 2023 at 06:46, Fross, Michael  wrote:
>
>> I'm seeing the exact same situation, Murugan.  This worked yesterday so
>> something must have changed today.
>>
>> Switching to v6 in YahooJSON.pm fixed the issue for now, but not a good
>> long term solution.
>>
>> Michael
>>
>> On Wed, Apr 19, 2023 at 3:38 PM Murugan Muruganandam <
>> m.muruganan...@hotmail.com> wrote:
>>
>> > Today when i ran get quote got the following error message
>> >
>> > Finance::Quote reported a failure for symbol acn: Error retrieving quote
>> > for acn. Attempt to fetch the URL
>> > https://query1.finance.yahoo.com/v7/finance/quote?symbols=acn resulted
>> in
>> > HTTP response 401 (Unauthorized)
>> >
>> > When i queried the url i got the same error, if i change to v6 instead
>> of
>> > v7 , it is providing me the quotes correctly both in browser and in GNU
>> > (changed it in YahooJSON.pm)
>> >
>> > is this temperory or only happening to me?
>> >
>> >
>> > Saludos Cordiales
>> >
>> >
>> > Murugan
>> > ___
>> > gnucash-user mailing list
>> > gnucash-user@gnucash.org
>> > To update your subscription preferences or to unsubscribe:
>> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> > -
>> > Please remember to CC this list on all your replies.
>> > You can do this by using Reply-To-List or Reply-All.
>> >
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>>
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-19 Thread David H
Yes, I also saw the same error this morning.

Cheers David H.


On Thu, 20 Apr 2023 at 06:46, Fross, Michael  wrote:

> I'm seeing the exact same situation, Murugan.  This worked yesterday so
> something must have changed today.
>
> Switching to v6 in YahooJSON.pm fixed the issue for now, but not a good
> long term solution.
>
> Michael
>
> On Wed, Apr 19, 2023 at 3:38 PM Murugan Muruganandam <
> m.muruganan...@hotmail.com> wrote:
>
> > Today when i ran get quote got the following error message
> >
> > Finance::Quote reported a failure for symbol acn: Error retrieving quote
> > for acn. Attempt to fetch the URL
> > https://query1.finance.yahoo.com/v7/finance/quote?symbols=acn resulted
> in
> > HTTP response 401 (Unauthorized)
> >
> > When i queried the url i got the same error, if i change to v6 instead of
> > v7 , it is providing me the quotes correctly both in browser and in GNU
> > (changed it in YahooJSON.pm)
> >
> > is this temperory or only happening to me?
> >
> >
> > Saludos Cordiales
> >
> >
> > Murugan
> > ___
> > gnucash-user mailing list
> > gnucash-user@gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> >
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo JSON - throwing unauthorized error

2023-04-19 Thread Fross, Michael
I'm seeing the exact same situation, Murugan.  This worked yesterday so
something must have changed today.

Switching to v6 in YahooJSON.pm fixed the issue for now, but not a good
long term solution.

Michael

On Wed, Apr 19, 2023 at 3:38 PM Murugan Muruganandam <
m.muruganan...@hotmail.com> wrote:

> Today when i ran get quote got the following error message
>
> Finance::Quote reported a failure for symbol acn: Error retrieving quote
> for acn. Attempt to fetch the URL
> https://query1.finance.yahoo.com/v7/finance/quote?symbols=acn resulted in
> HTTP response 401 (Unauthorized)
>
> When i queried the url i got the same error, if i change to v6 instead of
> v7 , it is providing me the quotes correctly both in browser and in GNU
> (changed it in YahooJSON.pm)
>
> is this temperory or only happening to me?
>
>
> Saludos Cordiales
>
>
> Murugan
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Yahoo JSON - throwing unauthorized error

2023-04-19 Thread Murugan Muruganandam
Today when i ran get quote got the following error message

Finance::Quote reported a failure for symbol acn: Error retrieving quote for 
acn. Attempt to fetch the URL 
https://query1.finance.yahoo.com/v7/finance/quote?symbols=acn resulted in HTTP 
response 401 (Unauthorized)

When i queried the url i got the same error, if i change to v6 instead of v7 , 
it is providing me the quotes correctly both in browser and in GNU (changed it 
in YahooJSON.pm)

is this temperory or only happening to me?


Saludos Cordiales


Murugan
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.