[GNC] Finance Quotes Using Yahoo json
Dale Alspach
alspachde at gmail.com
Wed Sep 5 15:36:19 EDT 2018
Have you tried to see whether the perl code itself works? (Below is on
linux but something similar should work in perl on windows.)
Assuming you have fnc-fq-dump installed, from a command prompt
something like (perhaps prefixed by perl. See
https://wiki.gnucash.org/wiki/Online_Quotes)
gnc-fq-dump -v yahoo_json CSCO
should yield
Finance::Quote fields Gnucash uses:
symbol: CSCO <=== required
date: 09/05/2018 <=== required
currency: USD <=== required
last: 47.365 <=\
nav: <=== one of these
price: <=/
timezone: <=== optional
All fields returned by Finance::Quote for stock CSCO
stock field value
----- ----- -----
CSCO currency: USD
CSCO date: 09/05/2018
CSCO exchange: Sourced from Yahoo Finance (as JSON)
CSCO isodate: 2018-09-05
CSCO last: 47.365
CSCO method: yahoo_json
CSCO name: CSCO (Cisco Systems, Inc.)
CSCO success: 1
CSCO symbol: CSCO
CSCO type: EQUITY
CSCO volume: 13728025
Dale
On 09/05/2018 11:31 AM, Dan Nelms wrote:
> Could I be missing some type of variable setting in the environment
> file? I know that when I first setup AlphaVantage (before the update to
> 3.2) I had to put my Alphavantage key in the environment file. Since
> Yahoo was not an option when 3.2 came out, maybe a variable that made
> Yahoo work before got deleted from the upgrade? I only throw this out
> because it is way over my head technically, but maybe somebody knows
> something about this. Just grasping at straws with insufficient knowledge.
>
>
> On 9/5/2018 9:15 AM, Fross, Michael wrote:
>> Don't know what else to try other than perhaps some of the other F:Q
>> quote sources. Of course after this discussion, I'm sure my
>> Yahoo_JSON quotes will soon start to fail....... :-)
>>
>> Michael
>>
>> On Wed, Sep 5, 2018 at 9:54 AM, Dan Nelms <dan99nelms at gmail.com
>> <mailto:dan99nelms at gmail.com>> wrote:
>>
>> Hi Michael,
>>
>> I tried your securities (ACN and FBIOX) with yahoo_json. Got
>> unable to retrieve...
>>
>> I tried a couple of my securities with alphavantage. It worked fine.
>>
>> I tried your sec with Yahoo together with mine with alphaV at same
>> time. It got mine and yours were unable...
>>
>> I tried your securities with alphaV and got the prices fine.
>>
>> Results are the price database is working and alphavantage is
>> working, but for me Yahoo json fails in all cases.
>>
>> Dan
>>
>>
>> On 9/5/2018 6:09 AM, Fross, Michael wrote:
>>> Hello Dan,
>>>
>>> I just looked at my GNC Price Database and the following quotes
>>> are returned successfully for me with Yahoo_JSON. Why don't you
>>> try a few of these and see if they work for you. They are
>>> current as of September 4, 2018 for me.
>>>
>>> Stock: ACN
>>> Fund: FBIOX, FBMPX, FCYIX
>>>
>>> Regards,
>>>
>>> Michael
>>>
>>> On Tue, Sep 4, 2018 at 3:29 PM, Dan Nelms <dan99nelms at gmail.com
>>> <mailto:dan99nelms at gmail.com>> wrote:
>>>
>>> Thanks Michael for your comments about using Yahoo_json for
>>> some of your security quotes. My needs are also very mild,
>>> but they number more than 4.
>>>
>>> I am running GnuCash version 3.2, Finance::Quote 1.47
>>> (Strawberry) on a Windows 10 machine.
>>>
>>> I tried using Yahoo_json with the GnuCash security editor and
>>> each time I get the "could not get quotes for the
>>> following...." message. I tried 2 mutual funds, 2 NYSE stocks
>>> and 1 NASDAQ stock. They all failed. I tried closing and
>>> restarting Gnucash just to be the changes in the security
>>> editor got loaded, still all failures. Yahoo_json is either
>>> not working for me or I am doing something wrong. Damn, I was
>>> hoping for an easy solution.
>>>
>>> Alphavantage works fine but only for the first 4 securities.
>>>
>>> Dan
>>>
>>>
>>> On 9/3/2018 6:59 AM, Fross, Michael wrote:
>>>> Hello Dan,
>>>>
>>>> My needs are fairly mild, but yes I currently use Yahoo_JSON
>>>> for all of my quotes. Most of my investments are in US
>>>> mutual funds although I do have several individual stocks.
>>>>
>>>> I simply use "*Single: Yahoo as JSON"* in the security
>>>> editor. I had switched to AlphaVantage when everyone else
>>>> did and it worked most of the time, although it was very
>>>> slow. I think it's worse now so I'm happy Yahoo_JSON
>>>> continues to work...at least for the time being. I pull
>>>> down 37 quotes, so not that many but if Alphavantage allows
>>>> 5 quotes / min, it would take me 7+ minutes do download those.
>>>>
>>>> Now I don't believe it will handle currencies and I'm not
>>>> sure about non-US exchanges, but this does work for me. You
>>>> can always do the ones it supports via Yahoo_JSON and just
>>>> the others via AlphaVantage depending on your situation.
>>>>
>>>> Michael
>>>>
>>>> On Sun, Sep 2, 2018 at 8:10 PM, Frank H. Ellenberger
>>>> <frank.h.ellenberger at gmail.com
>>>> <mailto:frank.h.ellenberger at gmail.com>> wrote:
>>>>
>>>> Hi Dan,
>>>>
>>>> Am 03.09.2018 um 00:10 schrieb Dan Nelms:
>>>> > Micheal, I noticed in one of your replies to a user
>>>> having Finance:Quote
>>>> > problems that are still getting quotes from Yahoo_json
>>>> for most of your
>>>> > quotes. Are you doing that through the GnuCash
>>>> Security setup? If so
>>>> > what button do you use, ie Single, Multiple or
>>>> Unknown? I would like to
>>>> > try it. Thanks. Dan
>>>>
>>>> RTFM:
>>>> https://code.gnucash.org/docs/C/gnucash-help/fq-sources.html#idm139753655191424
>>>> <https://code.gnucash.org/docs/C/gnucash-help/fq-sources.html#idm139753655191424>
>>>> ;-)
>>>>
>>>> Frank
>>>>
>>>>
>>>
>>>
>>
>>
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> 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.
>
More information about the gnucash-user
mailing list