Finance::Quote still not working with alphavantage

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Finance::Quote still not working with alphavantage

Frank Saporito
I have been working on this problem for several days and reluctantly have to
bother the mailing list members for help.

I followed the instructions on:

https://wiki.gnucash.org/wiki/FAQ#Q:_Why_doesn.27t_online_quoting_work.3F
<https://wiki.gnucash.org/wiki/FAQ#Q:_Why_doesn.27t_online_quoting_work.3F>  

I have an alphavantage API key
I have Finance::Quote ver 1.47
I run GnuCash in CentOS 6 (not that it matters)
I have update appended /etc/gnucash/environment as follows:
    ALPHAVANTAGE_API_KEY= (my api key)
I restarted GnuCash
I changed the securities to get online quotes from alphavantage

Even so, GnuCash price editor is unable to retrieve quotes.

I believe that, despite the correct API key (I tested it via a LO Calc)
identified in the environment file, it is not being accepted by GnuCash
based on the return for the gnc-fq-dump below:

# gnc-fq-dump -v alphavantage T
Finance:: Quote fields Gnucash uses:
    symbol: T (deduced)          <=== required
      date: ** missing **        <=== required
  currency: ** missing **        <=== required
      last:                      <=\      
       nav:                      <=== one of these
     price:                      <=/        
  timezone:                      <=== optional

** This stock quote cannot be used by gnucash!!


All fields returned by Finance::Quote for stock T

stock           field  value
-----           -----  -----
T            errormsg: Expected ALPHAVANTAGE_API_KEY to be set; get an API
key at https://www.alphavantage.co
T                last: **missing**
T                 nav: **missing**
T               price: **missing**
T             success: 0

I have checked the environment file numerous times.  Gedit was used to
update the environment file.

Any suggestions would be greatly appreciated.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

John Ralls-2

> On Nov 19, 2017, at 9:14 AM, Frank Saporito <[hidden email]> wrote:
>
> I have been working on this problem for several days and reluctantly have to
> bother the mailing list members for help.
>
> I followed the instructions on:
>
> https://wiki.gnucash.org/wiki/FAQ#Q:_Why_doesn.27t_online_quoting_work.3F
> <https://wiki.gnucash.org/wiki/FAQ#Q:_Why_doesn.27t_online_quoting_work.3F>  
>
> I have an alphavantage API key
> I have Finance::Quote ver 1.47
> I run GnuCash in CentOS 6 (not that it matters)
> I have update appended /etc/gnucash/environment as follows:
>    ALPHAVANTAGE_API_KEY= (my api key)
> I restarted GnuCash
> I changed the securities to get online quotes from alphavantage
>
> Even so, GnuCash price editor is unable to retrieve quotes.
>
> I believe that, despite the correct API key (I tested it via a LO Calc)
> identified in the environment file, it is not being accepted by GnuCash
> based on the return for the gnc-fq-dump below:
>
> # gnc-fq-dump -v alphavantage T
> Finance:: Quote fields Gnucash uses:
>    symbol: T (deduced)          <=== required
>      date: ** missing **        <=== required
>  currency: ** missing **        <=== required
>      last:                      <=\      
>       nav:                      <=== one of these
>     price:                      <=/        
>  timezone:                      <=== optional
>
> ** This stock quote cannot be used by gnucash!!
>
>
> All fields returned by Finance::Quote for stock T
>
> stock           field  value
> -----           -----  -----
> T            errormsg: Expected ALPHAVANTAGE_API_KEY to be set; get an API
> key at https://www.alphavantage.co
> T                last: **missing**
> T                 nav: **missing**
> T               price: **missing**
> T             success: 0
>
> I have checked the environment file numerous times.  Gedit was used to
> update the environment file.
>
> Any suggestions would be greatly appreciated.
>

The environment file only works when Finance::Quote is called from the GnuCash GUI. You need to set ALPHAVANTAGE_API_KEY as a shell environment variable for gnc-fq-dump to see it.

I've added a bullet to the FAQ item explaining this.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

Frank Saporito
Thank you John for your expertise and quick response.  I feel better that at
least some of my problem has been solved - the API key is working.  But, I
am not retrieving quotes usable by Gnucash.

$ ALPHAVANTAGE_API_KEY=(my key) gnc-fq-dump -v alphavantage T
Finance::Quote fields Gnucash uses:
    symbol: T (deduced)          <=== required
      date: ** missing **        <=== required
  currency: ** missing **        <=== required
      last:                      <=\      
       nav:                      <=== one of these
     price:                      <=/        
  timezone:                      <=== optional

** This stock quote cannot be used by gnucash!!


All fields returned by Finance::Quote for stock T

stock           field  value
-----           -----  -----
T            errormsg: Internal Server Error
T                last: **missing**
T                 nav: **missing**
T               price: **missing**
T             success: 0

 I am sorry to be bothering you with what I am sure is a simple error on my
part.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

John Ralls-2

> On Nov 19, 2017, at 10:15 AM, Frank Saporito <[hidden email]> wrote:
>
> Thank you John for your expertise and quick response.  I feel better that at
> least some of my problem has been solved - the API key is working.  But, I
> am not retrieving quotes usable by Gnucash.
>
> $ ALPHAVANTAGE_API_KEY=(my key) gnc-fq-dump -v alphavantage T
> Finance::Quote fields Gnucash uses:
>    symbol: T (deduced)          <=== required
>      date: ** missing **        <=== required
>  currency: ** missing **        <=== required
>      last:                      <=\      
>       nav:                      <=== one of these
>     price:                      <=/        
>  timezone:                      <=== optional
>
> ** This stock quote cannot be used by gnucash!!
>
>
> All fields returned by Finance::Quote for stock T
>
> stock           field  value
> -----           -----  -----
> T            errormsg: Internal Server Error
> T                last: **missing**
> T                 nav: **missing**
> T               price: **missing**
> T             success: 0
>
> I am sorry to be bothering you with what I am sure is a simple error on my
> part.
>

Looks to me like Alphavantage's server has a problem.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

Greg Etling
Frank,

I'm curious if you have the same issue as I do as discussed on this thread:
https://lists.gnucash.org/pipermail/gnucash-user/2017-November/072993.html

If you run the same online tests, I'd be interested to know if your errors
match or are similar to mine.

If you are using the system perl on CentOS 6, you'd be working with a
version of perl even older than mine.

Greg

Greg
917-664-0083
http://gregetling.com
--
"The credit belongs to the man who is actually in the arena, whose face is
marred by dust and sweat and blood; who strives valiantly; who errs, who
comes short again and again, because there is no effort without error and
shortcoming" -Theodore Roosevelt

On Sun, Nov 19, 2017 at 2:32 PM, John Ralls <[hidden email]> wrote:

>
> > On Nov 19, 2017, at 10:15 AM, Frank Saporito <
> [hidden email]> wrote:
> >
> > Thank you John for your expertise and quick response.  I feel better
> that at
> > least some of my problem has been solved - the API key is working.  But,
> I
> > am not retrieving quotes usable by Gnucash.
> >
> > $ ALPHAVANTAGE_API_KEY=(my key) gnc-fq-dump -v alphavantage T
> > Finance::Quote fields Gnucash uses:
> >    symbol: T (deduced)          <=== required
> >      date: ** missing **        <=== required
> >  currency: ** missing **        <=== required
> >      last:                      <=\
> >       nav:                      <=== one of these
> >     price:                      <=/
> >  timezone:                      <=== optional
> >
> > ** This stock quote cannot be used by gnucash!!
> >
> >
> > All fields returned by Finance::Quote for stock T
> >
> > stock           field  value
> > -----           -----  -----
> > T            errormsg: Internal Server Error
> > T                last: **missing**
> > T                 nav: **missing**
> > T               price: **missing**
> > T             success: 0
> >
> > I am sorry to be bothering you with what I am sure is a simple error on
> my
> > part.
> >
>
> Looks to me like Alphavantage's server has a problem.
>
> Regards,
> John Ralls
>
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> 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
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

Erik Colson
In reply to this post by John Ralls-2

John Ralls <[hidden email]> writes:

> Looks to me like Alphavantage's server has a problem.

Not for me..

~/DEVELOPMENT/finance-quote >>> perl -Ilib Examples/stockdump.pl alphavantage T
$VAR1 = {
          'Tisodate' => '2017-11-17',
          'Tcurrency' => 'USD',
          'Thigh' => '34.8800',
          'Tlast' => '34.5100',
          'Tsuccess' => 1,
          'Tlow' => '34.3500',
          'Tclose' => '34.5100',
          'Topen' => '34.4300',
          'Tdate' => '11/17/2017',
          'Tvolume' => '36883419',
          'Tcurrency_set_by_fq' => 1,
          'Tsymbol' => 'T',
          'Tmethod' => 'alphavantage'
        };

--
erik colson
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

John Ralls-2

> On Nov 19, 2017, at 1:19 PM, Erik Colson <[hidden email]> wrote:
>
>
> John Ralls <[hidden email]> writes:
>
>> Looks to me like Alphavantage's server has a problem.
>
> Not for me..
>
> ~/DEVELOPMENT/finance-quote >>> perl -Ilib Examples/stockdump.pl alphavantage T
> $VAR1 = {
>          'Tisodate' => '2017-11-17',
>          'Tcurrency' => 'USD',
>          'Thigh' => '34.8800',
>          'Tlast' => '34.5100',
>          'Tsuccess' => 1,
>          'Tlow' => '34.3500',
>          'Tclose' => '34.5100',
>          'Topen' => '34.4300',
>          'Tdate' => '11/17/2017',
>          'Tvolume' => '36883419',
>          'Tcurrency_set_by_fq' => 1,
>          'Tsymbol' => 'T',
>          'Tmethod' => 'alphavantage'
>        };

Works for me now, too:
ALPHAVANTAGE_API_KEY=############### /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump alphavantage T
Finance::Quote fields Gnucash uses:
    symbol: T                    <=== required
      date: 11/17/2017           <=== recommended
  currency: USD                  <=== required
      last: 34.5100              <=\
       nav:                      <=== one of these
     price:                      <=/
  timezone:                      <=== optional

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Finance::Quote still not working with alphavantage

Frank Saporito
In reply to this post by Greg Etling
Hi Greg

Is this what you are looking for?

$ ONLINE_TEST=1 prove -lvof t/alphavantage.t
Cannot determine source for t/alphavantage.t at
/usr/share/perl5/App/Prove.pm line 496

thanks



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quote still not working with alphavantage

Greg Etling
Reviving this thread - I decided to follow others' recommendation of
installing perlbrew, and F::Q is working from the CLI. However, I'm not
seeing any change in the Gnucash behavior (v2.6.21, key in the preferences
pane, retrieval failing), so I think I'm missing a step on having Gnucash
actually use the perlbrew version of perl. Can anyone let me know what I'm
likely forgetting?

Thanks

Greg
917-664-0083
http://gregetling.com
--
"The credit belongs to the man who is actually in the arena, whose face is
marred by dust and sweat and blood; who strives valiantly; who errs, who
comes short again and again, because there is no effort without error and
shortcoming" -Theodore Roosevelt

On Sun, Nov 19, 2017 at 4:59 PM, Frank Saporito <[hidden email]
> wrote:

> Hi Greg
>
> Is this what you are looking for?
>
> $ ONLINE_TEST=1 prove -lvof t/alphavantage.t
> Cannot determine source for t/alphavantage.t at
> /usr/share/perl5/App/Prove.pm line 496
>
> thanks
>
>
>
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> 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
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quote still not working with alphavantage

David Carlson-4
Greg,

Just so you don't feel like you are alone, I have GnuCash running on for
different machines one Windows and three are assorted versions of Uubuntu
and Debian.  Only one of them (one of the Ubuntu machines) will retrieve
quotes successfully through AlphaVantage, and that is about 1/3 to 1/2 of
the U.S. stocks and mutual funds in my list on a given try.  In two or
three tries I think that I get most of them. All of my machines are running
some GnuCash release between 2.6.12 and 2.6.17 and I think that I have gone
through all the steps that have been mentioned in this thread on most of
the machines but GnuCash still does not even tell me that it did not get
any of those stocks or mutual funds.

I suspect that GnuCash may not even be able to find the environment setting
or something.


David C

On Thu, Jul 5, 2018 at 1:05 PM, Greg Etling <[hidden email]> wrote:

> Reviving this thread - I decided to follow others' recommendation of
> installing perlbrew, and F::Q is working from the CLI. However, I'm not
> seeing any change in the Gnucash behavior (v2.6.21, key in the preferences
> pane, retrieval failing), so I think I'm missing a step on having Gnucash
> actually use the perlbrew version of perl. Can anyone let me know what I'm
> likely forgetting?
>
> Thanks
>
> Greg
> 917-664-0083
> http://gregetling.com
> --
> "The credit belongs to the man who is actually in the arena, whose face is
> marred by dust and sweat and blood; who strives valiantly; who errs, who
> comes short again and again, because there is no effort without error and
> shortcoming" -Theodore Roosevelt
>
> On Sun, Nov 19, 2017 at 4:59 PM, Frank Saporito <
> [hidden email]
> > wrote:
>
> > Hi Greg
> >
> > Is this what you are looking for?
> >
> > $ ONLINE_TEST=1 prove -lvof t/alphavantage.t
> > Cannot determine source for t/alphavantage.t at
> > /usr/share/perl5/App/Prove.pm line 496
> >
> > thanks
> >
> >
> >
> > --
> > Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-
> f1415819.html
> > _______________________________________________
> > gnucash-user mailing list
> > [hidden email]
> > 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
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see
> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> 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
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.
Reply | Threaded
Open this post in threaded view
|

Re: [GNC] Finance::Quote still not working with alphavantage

brad
I just updated to xubuntu 18.04 and the packaged gnucash 2.6.19, and I
still have to update Quote.pm with this.

https://raw.githubusercontent.com/mtalexander/finance-quote/6ee43ea08b504617142139fda41ae45be865fa38/lib/Finance/Quote.pm


 From the list:
On Sat, Mar 31, 2018 at 9:49 PM, Chris Good<[hidden email]>  wrote:

> Hi Steven,
>
>
>
> Please see my mail below but get the Quote.pm + AlphaVantage.pm from Mike
> Alexander’s git hub instead of mine as he has also put the 1 second delay
> between each request for a currency and you will need that.
>
>
>
> Get from Quote.pm from
>
> https://raw.githubusercontent.com/mtalexander/finance-quote/
> 6ee43ea08b504617142139fda41ae45be865fa38/lib/Finance/Quote.pm
>
>
>
> Get AlphaVantage.pm from
>
> https://github.com/mtalexander/finance-quote/blob/
> 6ee43ea08b504617142139fda41ae45be865fa38/lib/Finance/Quote/AlphaVantage.pm
>
>
>
> Regards,
>
>
>
> Chris Good
>

On 07/05/2018 02:45 PM, David Carlson wrote:

> Greg,
>
> Just so you don't feel like you are alone, I have GnuCash running on for
> different machines one Windows and three are assorted versions of Uubuntu
> and Debian.  Only one of them (one of the Ubuntu machines) will retrieve
> quotes successfully through AlphaVantage, and that is about 1/3 to 1/2 of
> the U.S. stocks and mutual funds in my list on a given try.  In two or
> three tries I think that I get most of them. All of my machines are running
> some GnuCash release between 2.6.12 and 2.6.17 and I think that I have gone
> through all the steps that have been mentioned in this thread on most of
> the machines but GnuCash still does not even tell me that it did not get
> any of those stocks or mutual funds.
>
> I suspect that GnuCash may not even be able to find the environment setting
> or something.
>
>
> David C
>
> On Thu, Jul 5, 2018 at 1:05 PM, Greg Etling <[hidden email]> wrote:
>
>> Reviving this thread - I decided to follow others' recommendation of
>> installing perlbrew, and F::Q is working from the CLI. However, I'm not
>> seeing any change in the Gnucash behavior (v2.6.21, key in the preferences
>> pane, retrieval failing), so I think I'm missing a step on having Gnucash
>> actually use the perlbrew version of perl. Can anyone let me know what I'm
>> likely forgetting?
>>
>> Thanks
>>
>> Greg
>> 917-664-0083
>> http://gregetling.com
>> --
>> "The credit belongs to the man who is actually in the arena, whose face is
>> marred by dust and sweat and blood; who strives valiantly; who errs, who
>> comes short again and again, because there is no effort without error and
>> shortcoming" -Theodore Roosevelt
>>
>> On Sun, Nov 19, 2017 at 4:59 PM, Frank Saporito <
>> [hidden email]
>>> wrote:
>>> Hi Greg
>>>
>>> Is this what you are looking for?
>>>
>>> $ ONLINE_TEST=1 prove -lvof t/alphavantage.t
>>> Cannot determine source for t/alphavantage.t at
>>> /usr/share/perl5/App/Prove.pm line 496
>>>
>>> thanks
>>>
>>>
>>>
>>> --
>>> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-
>> f1415819.html
>>> _______________________________________________
>>> gnucash-user mailing list
>>> [hidden email]
>>> 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
>> [hidden email]
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see
>> https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> 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
> [hidden email]
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> 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
[hidden email]
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.