Subscribe to RSS feed [Deprecated] StocksCafe Playground - Leveraging on StocksCafe API

Updated: 2 Jul 2020 By evankoh posted on 3 Mar 2019  -  35,776 views




Note: StocksCafe API is now deprecated and not available anymore

Short Story
We now have an open source project aim at educating/sharing on how to use StocksCafe API. You can literally build any feature that you want! Simply go to this GitHub page to learn about all the awesome stuff you can do with StocksCafe API (such as generating and customizing the above graph easily).

Full Story
The ability to access StocksCafe through API was released a couple of months ago. However, there are very few users who are actually leveraging on this powerful way of using StocksCafe. I assume it is due to the lack of experience dealing with APIs and programming and hence not knowing the possibilities. Therefore, I have decided to open up a series of tutorials to demonstrate all the awesome things you can do with StocksCafe API (even if you have little to no programming experience).

1) If you want to perform technical analysis/investing
(Tutorial: Plot a moving average graph)

StocksCafe currently has limited features that supports investors interested in technical analysis. Of course, StocksCafe can try to build it, but it will never be as customizable/powerful as giving you the ability to program whatever indicator and set whatever parameter you want.

This is actually also my personal motivation of doing this. I generally use fundamental indicators combined with modern portfolio theory to manage my portfolio. However, it does not tell me whether it is a relatively good timing to buy/sell. Although I am not a strong believer or user of technical analysis (yet), I would like to think that doing some technical analysis is better than going in blindly or simply basing it on 'my current feel' for the stock/market.

And as always, if I am going to build it, why not share it!

2) If you would like to have more fancy/customizable ways of analyzing your portfolio
(Tutorial: View monthly dividends collected for your portfolio)

Even though there are already many ways to analyze your portfolio in StocksCafe, it is never enough, as I still receive suggestions on what else we can do. Now, you will no longer have to be limited by me and can simply access your own portfolio data and run analysis or build fancy graphs on them.

3) If there is a feature you want that is not in StocksCafe
With direct access to the same data that StocksCafe has, you will no longer be limited by features provided by StocksCafe. The only limit is your own imagination! (maybe programming skills :)

However, please do not be afraid even if you do not have any programming experience. Python is an easy-to-learn and modern programming language. Furthermore, the programming knowledge needed to perform standard analysis or basic graphing are often minimal and easily google-able.

How do I get started?
Simply follow this quick start guide. You have the option to either run it on the web or run it on your computer. If you just want to quickly mess around, running it on the web is recommended since there is no installation required by you. However, if you want to really leverage on StocksCafe API, I highly recommend installing it and running it on your desktop.

How can I contribute?
If you have done up a cool analysis or graph and would like to share them, please feel free to make pull requests (if you do not know how to do this, simply send your code to Evan). Contributions are highly appreciated!

What's next?
I will be adding more indicators, graphs, and also build a backtesting system to test out indicators and investing strategies.

Happy programming and investing!


Like
10 likes
4 comments

kpo - Thanks Evan! Very nice, shall find time to play with them.
3 Mar 2019 21:49:34

angelzsoul - hi, for the option of running on the web for the file "Plot Moving Average Chart.ipynb",
after changing StocksCafeApi(apiUser='YOUR_USERNAME', apiUserKey='YOUR_API_KEY')

do we need to edit it back to StocksCafeApi() and save it?
Just wondering if the system will autosave and store our API online

Thanks!
4 Mar 2019 01:41:33

evankoh - @angelzsoul

"do we need to edit it back to StocksCafeApi() and save it?" => No, you do not need to edit it back and save it. It cannot be saved.
"Just wondering if the system will autosave and store our API online" => These remote machine are temporary. You cannot store anything on it. However, technically, there is a way to push information back to GitHub (You need to fork my repo and have your own repo though) BUT it is strongly discouraged by them (https://mybinder.readthedocs.io/en/latest/faq.html#can-i-push-data-from-my-binder-session-back-to-my-repository)
4 Mar 2019 07:52:49

thevaluefund - Inspired to start project. I have to teach my son python anyway and it is great library for big data/ML.

Jun Holiday Project .
27 Mar 2019 08:24:23



Next Article > < Previous Article
Quick Updates: Improved Screener Refer & Get Limited Edition StocksCafe ...



List All Articles Other articles by evankoh

StocksCafe x Kenny Loh REIT Screener
Last year, I met up with Kenny from MyStocksInvesting. Despite it being the first time we met, we hit it off well. In that meeting itself, we decided to work together to build a REIT screener combining his REIT knowledge and my software skills. In this post, I would like to share what we have built in collaboration. There are basically four main components at this point: 1) [Free] REITs Overview - ...

Dividends Projection
A little more than a year ago, I added a feature that projects how much dividends you are likely to receive for the current year in your Portfolio Report. Although it is a simple feature with naive assumptions, it is actually one of the top most-liked features. Hence, upon the request of Friends of StocksCafe, I spent some time over the weekend to include dividend projection in more areas of StocksCafe. ...

Quick Announcement: You can now change your portfolio name!
Among the numerous minor improvements in StocksCafe, I think the following will be one of interest to many. Every user using StocksCafe would have a portfolio named "Default". To some, this has been unwanted and they would like to have it renamed or deleted. The main reason why I have not allowed this so far is simply because StocksCafe was built upon the assumption that a user would always have at ...