I implemented a quote program via Perl and I'm not getting any data back for these symbols since Aug 22, 2017. The error messages are:
Using /home/chuck/perl/chuck/quote/quoteprod.db
getquote ERROR: No data found for GOOGL ()
getquote ERROR: No data found for AAPL ()
getquote ERROR: No data found for IBM ()
getquote ERROR: No data found for DLPH ()
getquote ERROR: No data found for FPHAX ()
getquote ERROR: No data found for PFE ()
getquote ERROR: No data found for SPHIX ()
getquote ERROR: No data found for WWWFX ()
getquote ERROR: No data found for FSAGX ()
getquote ERROR: No data found for FDSVX ()
End: Thu Nov 2 06:27:19 EDT 2017
Any ideas what's going on? Looks like this module hasn't been updated since 2015.
When I do this: %info=$quote->fetch($exch,$sym); I get back info, but the when I get the price with this: $price=$info{$sym,'price'} the price is zero. When I dump the %info hash I get this:
A new module AlphaVantage.pm has been added today, which supports quite a bunch of stocks, but not funds nor currencies. Upgrade to version 1.40 and try it out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've installed the AlphaVantage module, but am having trouble getting it to work. These would seem to be the relevant Perl instructions:
$q = Finance::Quote->new("AlphaVantage");
%quotes = $q->fetch("alphavantage",@stocks);
Is there an obvious problem with these? Thanks for attacking the problem left by the abrupt departure of Yahoo!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The slowness is due to the API not allowing to query multiple symbols at once. Also we have reached the server request limit which makes requests fail.. I have contacted alpavantage about this issue.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I first got my query code working, the response was almost immediate. After reading the above comment I tried it again and ... slow! I then timed a response at 21 seconds. Later things got even worse with a failure and the following error report:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html>\n\t<...") at /usr/share/perl5/site_perl/Finance/Quote/AlphaVantage.pm line 73.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I also get that "malformed JSON" error on certain symbol requests. This morning I got a new one:
errormsg' => 'json_data doesn\'t contain Last Refreshed'. This occured after doing a symbol request, which was successful, and then repeating the exact same request, which then yielded the errormsg.
AlphaVantage seems great in theory, but pretty unreliable in practice.
Is GOOGLE an alternative?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had the same thought. I threw something together last night that parses from HTML google finance (the JSON unfortunately had some malformed errors). I can submit to the repository if people would like?
I'm also working on a module for finance.yahoo.com ever since Yahoo removed the previous funcationality.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had the same thought. I threw something together last night that parses from HTML google finance (the JSON unfortunately had some malformed errors). I can submit to the repository if people would like?
I'm also working on a module for finance.yahoo.com ever since Yahoo removed the previous funcationality.
I checked for Google some years ago and their terms of service
explicitely denied scraping page contents... It might work some time,
but probably Google will tend to discourage such usage.
best
erik colson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Erik, any suggestion for how to set the function and datatype parameters passed without having to edit the URL hard-coded in AlphaVantage.pm? It would be good to be able to toggle between TIME_SERIES_DAILY and TIME_SERIES_INTRADAY on the fly, get TIME_SERIES_MONTHLY, etc.. Getting data in CSV format on-demand would be useful as well. TIA!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Erik, any suggestion for how to set the function and datatype
parameters passed without having to edit the URL hard-coded in
AlphaVantage.pm? It would be good to be able to toggle between
TIME_SERIES_DAILY and TIME_SERIES_INTRADAY on the fly, get
TIME_SERIES_MONTHLY, etc.. Getting data in CSV format on-demand would
be useful as well. TIA!
This would be out of purpose for F::Q. But probably would be cool for a
new cpan module "AlphaVantage::QuoteHist", or something in that mood.
best
erik colson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. FYI, editiing the URL doesn't seem to work for some reason. When I change TIME_SERIES_DAILY to TIME_SERIES_INTRADAY I get the following err msg:
'Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY
This is odd, as it is passing a valid function according to the docs. The AV doc page offers no additional insight.
I can get the current day's data after the market closes using the default TIME_SERIES_DAILY, but during the day while the market is open the data returned is for the previous day. No joy there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
OK. FYI, editiing the URL doesn't seem to work for some reason. When I change TIME_SERIES_DAILY to TIME_SERIES_INTRADAY I get the following err msg:
'Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY
This is odd, as it is passing a valid function according to the docs. The AV doc page offers no additional insight.
you need to add the 'interval' parameter in the call. Check it in the docs.
I can get the current day's data after the market closes using the default TIME_SERIES_DAILY, but during the day while the market is open the data returned is for the previous day. No joy there.
I can get the current day's data after the market closes using the
default TIME_SERIES_DAILY, but during the day while the market is open
the data returned is for the previous day. No joy there.
which version of F::Q are you using? I ckecked the code / api json
returned and this shouldn't happen.
best
erik colson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was checking GLD. Won't be able to see if I can repeat this until tomorrow now that the market is closed and the call returns today's data correctly. Will see how it behaves after the market opens tomorrow.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I implemented a quote program via Perl and I'm not getting any data back for these symbols since Aug 22, 2017. The error messages are:
Using /home/chuck/perl/chuck/quote/quoteprod.db
getquote ERROR: No data found for GOOGL ()
getquote ERROR: No data found for AAPL ()
getquote ERROR: No data found for IBM ()
getquote ERROR: No data found for DLPH ()
getquote ERROR: No data found for FPHAX ()
getquote ERROR: No data found for PFE ()
getquote ERROR: No data found for SPHIX ()
getquote ERROR: No data found for WWWFX ()
getquote ERROR: No data found for FSAGX ()
getquote ERROR: No data found for FDSVX ()
End: Thu Nov 2 06:27:19 EDT 2017
Any ideas what's going on? Looks like this module hasn't been updated since 2015.
When I do this:
%info=$quote->fetch($exch,$sym);
I get back info, but the when I get the price with this:$price=$info{$sym,'price'}
the price is zero. When I dump the %info hash I get this:Last edit: Bulrush 2017-11-02
Same here, but just for the past day. Prior to that it was working fine. Looks like a change or temporary outage at Yahoo.
Last edit: John Pane 2017-11-02
There is a claim on this yahoo forum that the service has been discontinued.
https://forums.yahoo.net/t5/Yahoo-Finance-help/http-download-finance-yahoo-com-d-quotes-csv-s-GOOG-amp-f/td-p/387096
Finance::Quote fails to get any quotes on GnuCash, I think following Yahoo's discontinuation of the quotes service. Any suggestion on how to fix it?
A new module AlphaVantage.pm has been added today, which supports quite a bunch of stocks, but not funds nor currencies. Upgrade to version 1.40 and try it out.
I've installed the AlphaVantage module, but am having trouble getting it to work. These would seem to be the relevant Perl instructions:
$q = Finance::Quote->new("AlphaVantage");
%quotes = $q->fetch("alphavantage",@stocks);
Is there an obvious problem with these? Thanks for attacking the problem left by the abrupt departure of Yahoo!
Please check out the test file t/alphavantage.t for correct querying of quotes. You will need to set ONLINE_TEST=1 to actually run tests
The code is running as desired. Thanks for the pointers. As a reference for others, here is the code that solved my problems:
$q = Finance::Quote->new();
%quotes = $q->alphavantage(@stocks);
The following line from my old Yahoo code had to be removed or commented out:
$q->require_labels(qw/date high low last/);
This works, but.... it's very slow to get a response from AlphaVantage, like 10 to 15 seconds. Any ideas on how to get a faster response?
TIA.
The slowness is due to the API not allowing to query multiple symbols at once. Also we have reached the server request limit which makes requests fail.. I have contacted alpavantage about this issue.
When I first got my query code working, the response was almost immediate. After reading the above comment I tried it again and ... slow! I then timed a response at 21 seconds. Later things got even worse with a failure and the following error report:
malformed JSON string, neither array, object, number, string or atom, at character offset 0 (before "<!DOCTYPE html>\n\t<...") at /usr/share/perl5/site_perl/Finance/Quote/AlphaVantage.pm line 73.
yep... we reached the servers limit..
I also get that "malformed JSON" error on certain symbol requests. This morning I got a new one:
errormsg' => 'json_data doesn\'t contain Last Refreshed'. This occured after doing a symbol request, which was successful, and then repeating the exact same request, which then yielded the errormsg.
AlphaVantage seems great in theory, but pretty unreliable in practice.
Is GOOGLE an alternative?
Re: GOOGLE
I had the same thought. I threw something together last night that parses from HTML google finance (the JSON unfortunately had some malformed errors). I can submit to the repository if people would like?
I'm also working on a module for finance.yahoo.com ever since Yahoo removed the previous funcationality.
Paul Polak linux_slacker@users.sf.net writes:
I checked for Google some years ago and their terms of service
explicitely denied scraping page contents... It might work some time,
but probably Google will tend to discourage such usage.
best
erik colson
Perry Leopold perryleopold@users.sf.net writes:
I contacted AlphaVantage by email. I hope we can figure something out
with them..
AFAIK not. The Google finance API has been shut down in 2012.
best
erik colson
Erik, any suggestion for how to set the function and datatype parameters passed without having to edit the URL hard-coded in AlphaVantage.pm? It would be good to be able to toggle between TIME_SERIES_DAILY and TIME_SERIES_INTRADAY on the fly, get TIME_SERIES_MONTHLY, etc.. Getting data in CSV format on-demand would be useful as well. TIA!
Perry Leopold perryleopold@users.sf.net writes:
This would be out of purpose for F::Q. But probably would be cool for a
new cpan module "AlphaVantage::QuoteHist", or something in that mood.
best
erik colson
OK. FYI, editiing the URL doesn't seem to work for some reason. When I change TIME_SERIES_DAILY to TIME_SERIES_INTRADAY I get the following err msg:
'Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY
This is odd, as it is passing a valid function according to the docs. The AV doc page offers no additional insight.
I can get the current day's data after the market closes using the default TIME_SERIES_DAILY, but during the day while the market is open the data returned is for the previous day. No joy there.
Perry Leopold perryleopold@users.sf.net writes:
you need to add the 'interval' parameter in the call. Check it in the docs.
--
erik colson
Perry Leopold perryleopold@users.sf.net writes:
which version of F::Q are you using? I ckecked the code / api json
returned and this shouldn't happen.
best
erik colson
v1.43.
Perry Leopold perryleopold@users.sf.net writes:
hmm... shouldn't happen. Can you give me the symbol you checked ?
best
erik colson
I was checking GLD. Won't be able to see if I can repeat this until tomorrow now that the market is closed and the call returns today's data correctly. Will see how it behaves after the market opens tomorrow.
Seems to be working fine today. Data output is correct so far. Will continue testing.