[GNC] Downloading stock prices in the UK

Eric Coates eric.coates at sky.com
Thu Apr 25 08:52:57 EDT 2019


Hi Alan

The namespace for LSE is L; thus Symbol/Abbreviation should be SSE.L 
Similarly for other LSE quoted stocks

Getting the quotes themselves is a little fraught. In my experience the 
only source that "works" is AlphaVantage (the usual suggestion of using 
Yahoo-JSON returns prices that are 100 times too large, LSE quotes 
prices in pennies Yahoo interprets the numbers as pounds - you'll look 
very rich until you note the problem!)

However, there is a problem with AlphaVantage; they throttle the feed so 
that you can only get five quotes per minute. there are two workarounds:

(1) Tick Get Online Quotes (in the Security Editor tool) in just (say) 
three stocks, run the price getter; untick those three stocks and tick 
the remaining three stocks and re-run the price getter.

(2) the AlphaVantage.pm file can be modified to include a 15 second 
pause between price gets - everything goes slowly (but perhaps not too 
bad for six shares) but it does go. My experience is on Ubuntu so I 
can't tell you where the Alphavantage.pm file is on Windows but if you 
can find it (there are probably useful hints on this mailing list) the 
change needed is:

right at the end of the file is a bit that looks something like this


/$quantity--;/

//

/select(undef, undef, undef, .7) if ($quantity); sleep(15);/

//

/}/

//

/return wantarray() ? %info : \%info;/

(the italicisation is mine to keep that text separate from the body of 
this note) except that it doesn't have the sleep(15). Adding that is the 
change needed.

The second way is better if/when you have a larger portfolio but it can 
get to be a drag with all those delays!

Good luck

Eric

===================================

On 25/04/2019 11:56, AEG via gnucash-user wrote:
> I'm using GnuCash version 2.6.21 on Windows 10 and would appreciate some help
> with setting up investment accounts in the UK.
>
> I have a small portfolio comprising six stocks and, following the tutorial,
> have successfully set up accounts for each one. However, I am not sure about
> the source of online stock prices so I'm hoping there will be a UK user who
> can point me in the right direction.
>
> So far, I have been using a trial and error approach without any success and
> I'm wondering whether my stock symbols might be incorrect. For example, I
> have some Scottish & Southern shares for which I have set the Symbol to SSE
> and in the Security Editor I have set the Namespace to LON.
>
> Any help on resolving this would be much appreciated.
>
> Alan
>
>
>
>
> --
> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
> _______________________________________________
> 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