Skip to Main Content

Monitoring stock and share investments with SquaredUp

This dashboard visualizes data pertaining to my investments in the stock market. By using the WebAPI plugin to gather information from several sources, I am able to view my current portfolio’s performance as well as drill down into specific stocks to both inform future investments and make adjustments to current investments.

Anthony Thorogood
Developer, SquaredUp

Challenge

The stock market can be a very fast paced environment, with share prices rising and falling every minute, so the ability to understand, interpret, and act on data and trends quickly is essential to me. There can also however be situations in which I am making, or wish to make, long-term investments, in which case it is best to wait and make my own predictions and projections based on the data I have available to me.  

There are places to view data summaries in these ways, however they cost money to use, whereas there are free APIs available that can achieve the same results when manipulated in the right way. 

Solution

I created this dashboard using SquaredUp and the WebAPI plugin. I am using two main sources, Trading212 and FinnHub. Trading212 doesn’t have a regular API, so I have to use a temporary cookie, switching it out when it expires. 

The dashboard allows me to display my portfolio, as well as additional share information, giving me a tailored view of my investment options.  

With this dashboard I can obtain an at-a-glance overview of the current state of the market, drill down into specific stocks and their performance, and track market sentiment and other changes. 

Create a SquaredUp account – free forever

Dashboard walk-through

The dashboard has three rows of tiles, with each row fulfilling its own purpose. The top row gives an overview of my portfolio, the middle row displays current data pertaining to my investments, and the bottom row is for predictions and more in-depth information. 

(Note: for the purposes of this demonstration, the data presented has been obfuscated, and does not display my actual personal investments.)

This image tile displays the logo for Trading 212, the investment hub that I use.

This tile is a line graph showing my portfolio. It is tracking the average profit/loss of my investments over time and uses the most recent result in the graph to determine the tile’s status. 

Having a visualization like this is very helpful, as a clear display of changes in the market shows me whether I need to make changes to my investments, changes that will be further informed by the other tiles in the dashboard. 

My current total invested is shown in this tile. It pulls this data from the Trading212 API. 

This tile displays the amount of profit I have made from my investments. Again, it pulls this data from Trading212. It will have a green status as long as my portfolio remains in profit. 

This tile displays the amount of profit I have earned from dividends in a scalar tile. 

The largest tile of the dashboard, this tile is a visualization of my investments and shows at a glance whether they are profitable or not. I wrote the following SQL query to set the data range: 

SELECT ppl, ppl AS ppl_add, code,  
       CASE  
         WHEN ppl > 0 THEN 'SUCCESS'  
         WHEN ppl < 0 THEN 'ERROR'  
         ELSE 'Zero'  
       END AS State 
FROM dataset1

This query checks whether each stock is in profit or loss compared to when it was purchased. This check then determines its status, which is reflected in green or red in the tile.

This tile shows a custom list of stocks that I’ve attached a price alert to. The list was created in Trading212 and reflects both investments I’ve made and investments I’m considering making. Having them visualized and readily available in this way makes my decision making much easier. 

This is another custom list of stocks I wanted to monitor, specifically Apple, Microsoft and Amazon, as I am particularly interested in their performance. 

I achieved this by making three different API calls, one for each stock. I then run the following SQL query to set a status for each stock: 

SELECT c, d, 'Apple' AS name, 

       CASE  

         WHEN d > 0 THEN 'SUCCESS' 

         WHEN d < 0 THEN 'ERROR' 

         ELSE 'NEUTRAL'  

       END AS state 

FROM dataset1 

UNION ALL 

SELECT c, d, 'Microsoft' AS name, 

       CASE  

         WHEN d > 0 THEN 'SUCCESS' 

         WHEN d < 0 THEN 'ERROR' 

         ELSE 'NEUTRAL'  

       END AS state 

FROM dataset2 

UNION ALL 

SELECT c, d, 'Amazon' AS name, 

       CASE  

         WHEN d > 0 THEN 'SUCCESS' 

         WHEN d < 0 THEN 'ERROR' 

         ELSE 'NEUTRAL'  

       END AS state 

FROM dataset3;

This tile is a bar chart tracking share sentiment in one of my investments, Apple. It pulls the data via FinnHub, a powerful stock API, and displays the Strong Buy, Buy, Hold, Sell and Strong Sell sentiments over time. This is important data to keep track of, as market sentiment provides insight into the general mood of the market and can influence investment decisions. Having access to this data and having it displayed in this way helps me to make sense of changes and fluctuations in the market. 

The final tile displays insider share changes in Apple stock. It uses the FinnHub API like the market sentiment tile and helps me to make sense of price movements in the market, as insider share changes can be indicative of a future change in the stock price. 

In the future

Due to the nature of the stock market, this dashboard is always changing. Investments are added and removed, and I frequently change the stocks in the sentiment analysis section to gain new insights. 

In terms of technical changes to the dashboard, as mentioned earlier I have to manually update the temporary cookie for Trading212 to be able to pull the data for many of the tiles. I am hoping that Trading212 builds a true API to save me this hassle. 

Create your free dashboard

This dashboard is not available out of the box, but you can easily build something similar yourself using the SQL plugin or the WebAPI plugin.

Create your dashboard – free forever

Simply create a free account to get started, or check out this video to see how easy it is to use our Dashboard Designer:

To see what other dashboards you can create, check out our Dashboard Gallery.

Create a free SquaredUp account

Combine your data with...

WebAPI

Visualize data from any HTTP API that returns JSON

Microsoft SQL Server

Plug directly into Microsoft SQL Server for instant dashboards, reports and analytics.

SquaredUp has 60+ pre-built plugins for instant access to data.