How to Create Notion Investment Tracker: Stocks, Crypto & More!
Are you eager to take control of your investment portfolio's performance and effortlessly manage your assets in one place? Welcome to an insightful journey into optimizing your investment tracking experience. In this comprehensive guide, we'll explore how to import real-time stock and asset data into Notion, enabling you to monitor your investments effortlessly.
By harnessing the capabilities of the Notion API Connector and Financial Modeling Prep's free API, you'll be equipped to create a dynamic Notion Investment Tracker tailored to your needs. Whether you're tracking stocks, crypto, or other assets, this step-by-step tutorial will empower you to make informed decisions with ease.
In this post we will cover:
- Quick installation of Notion API Connector
- Create a robust Stocks database for monitoring prices
- Import live Stocks Data into your dedicated database
- Set up a dynamic Portfolio database to track your trades
Install Notion Api Connector
Install the Notion Api Connector from the Chrome Web Store. Open Notion, and you should see the Notion Api Connector icon on the top right corner.
When you click on the icon, the sidebar will open. You need to click "Authenticate" button to authenticate the extension with Notion.
Next, you need to grant access to Notion Api Connector extension to your Notion pages.
After successful authentication, you should see button the "Create request" button in the side panel.
Create Stocks Database
Create a new database called "Stocks". Later, we will import stocks data into this database. If you already have a stocks database, you can skip this step.
First, we add database properties Symbol, Name as text, Exchange as text, and Current Price as a number. If we are interested in other stock ticker data such as day low, day high, year low, year high, we can add those as well.
Import Stocks Data
You can use any API you want to import stocks data. In the next steps, I will use Financial Modeling Prep's free API . Before using the API, you need to sign up for a free account. Go to site.financialmodelingprep.com/developer/docs/ and click "Get my API Key here".
After creating free account, open your dashboard where you should find your API key.
Now, we will use
Company stock batch request
to obtain
multiple companies prices. For example if we want to get prices of Apple, Google, and Microsoft, we can use this API:
https://financialmodelingprep.com/api/v3/quote/AAPL,META,GOOG?apikey=385xxxxxxxxxxxxxxxxxxxxxxxxxxb9b
Return to Notion and create a new request by clicking "Create request" in the side panel. Paste the URL
https://financialmodelingprep.com/api/v3/quote/AAPL,META,GOOG?apikey=385xxxxxxxxxxxxxxxxxxxxxxxxxxb9b
from previous step into the URL field and click the "Run" button.
Now, you should see the API response with stocks data. You need to map API fields to Notion database fields.
Then, click "Save & Import" and data should be imported in Stocks database.
Create Portfolio Database
This is the last part of the Notion Investment Tracker. Now, let's create a new database "Portfolio" that we link to "Stocks" database. Create a new database property "Stock" and edit the property to link it to "Stocks" database.
Next, we will create properties "Buy Price" as a number, "Shares" as a number and "Date of Purchase" as a date.
Then, we will create a property "Current Price" as a Rollup property to reference the "Current Price" in "Stocks" database.
After that, we will create a "Buy Value" property using the formula:
multiply(prop("Buy Price"), prop("Shares"))
Following that, we will create a "Current Value" property using the formula:
multiply(toNumber(prop("Current Price")), prop("Shares"))
Next, we will create a "$ up/down" property using the formula:
subtract(prop("Current Value"), prop("Buy Value"))
Additionally, we will create a "% up/down" property using the formula:
prop("Current Value") * 100 / prop("Buy Value") - 100
Lastly, we will create an "up/down" property using the formula:
if(prop("$ up/down") > 0, "📈", "📉")
Conclusion
Congratulations, you've successfully transformed your investment tracking experience with the power of Notion API Connector and smart database design. By following this tutorial, you've gained the tools to create a robust Notion Investment Tracker tailored to your preferences.