Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm looking for a method to update a portfolio of stocks (equities) I track in a LibreOffice Calc spreadsheet automatically, somewhat like the Googlefinance functions you can use on a Google Docs spreadsheet in Chrome, e.g. =GoogleFinance("LON.BP.","price") would return the value of a share in BP on the London stock exchange.
I suppose you could use wget or curl to grab the data and your own script to put it into a csv file which can be opened in Calc. A nice little programming project.
LibreOffice has =webservice (and =importxml) to call from JSON files. You will need links but I only know links to grab BTC exchange courses.
Another alternative is to "insert sheet" from online or from a file and then you can choose an online link. From that sheet you can export data to your original sheet.
LibreOffice has =webservice (and =importxml) to call from JSON files. You will need links but I only know links to grab BTC exchange courses.
Another alternative is to "insert sheet" from online or from a file and then you can choose an online link. From that sheet you can export data to your original sheet.
The below method could work for you. Just verified.
(Seemingly free) registration at https://www.alphavantage.co/ is required, but you can test a demo quote of MSFT without it.
For me the dot (".") in the node name e.g. "05. price" was causing an error, so I replaced it with a simple substitute.
At the end the final formula looks like this:
=+PARSEJSON(SUBSTITUTE(PARSEJSON(WEBSERVICE("https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=MSFT&apikey=demo"),"Global Quote"),"05. price","05 price"),"05 price")
Feel free to suggest a more elegant way, but the above should work.
BTW when testing Bloomberg (e.g. https://www.bloomberg.com/markets/ap...rice/AAPL%3AUS) it seems to work when accessed from a browser, but when the link is queried with LibreOffice WEBSERVICE then the "Are you a robot?"/CAPTCHA protection is being activated and displayed in the cell content as a result.
This may be a piece of useless information considering that Yahoo appears not to be available. I was unable to figure out how the code worked. The only real reason for posting the link below is that others may find elements of the code useful
I've been curious concerning how to download stock prices. Since I am able to download stock prices with KMyMoney, I have not put much effort into developing a bash script to download stock prices.
This may be a piece of useless information considering that Yahoo appears not to be available. I was unable to figure out how the code worked. The only real reason for posting the link below is that others may find elements of the code useful
I've been curious concerning how to download stock prices. Since I am able to download stock prices with KMyMoney, I have not put much effort into developing a bash script to download stock prices.
Not sure what your question is - do you have a specific question about the Python code or the accompanying README? Have you tried the extension from Calc?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.