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 Note 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 Note Api Connector
- Create a robust Stocks database for monitoring prices
- Import Stocks Data from API
- Import Stocks Data into your dedicated database
- Set up a dynamic Portfolio database to track your trades
Install Note Api Connector
Install the Note Api Connector from the Chrome Web Store . Open Notion, and you should see the Note 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 Note 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.
Obtain Stocks Data
When it comes to importing stock data into Notion, you have multiple API options depending on your needs and limitations.
Using Financial Modeling Prep's Free API
Financial Modeling Prep provides a convenient free API that allows you to obtain multiple stock prices in a single API call. This is a great option for tracking US-based stocks and simplifies the process for batch requests.
Financial Modeling Prep's API does not include data for international stocks and free plan allows only 250 API calls per month. If you need more calls or global coverage, you may need to check Marketstack API or Alpha Vantage API .
If you want to use Financial Modeling Prep's free 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=****************
Using Marketstack API
If you need data for international stocks, Marketstack API is a solid alternative. It's free plan allows 100 requests per month and you can obtain multiple ticker prices in one API call.
First, you need to sign up . Then, in your dashboard you can find api access key.
You can get the latest eod prices by using
/eod/latest
api call. For example if you want to get price of Nvidia and Airbus, you can use
https://api.marketstack.com/v1/eod/latest?access_key=**************&symbols=NVDA,AIR.XPARapi call.
Using Alpha Vantage API
If you need data for international stocks or prefer an API with a different pricing model, the Alpha Vantage API is a reliable alternative. However, it allows only one ticker price per API call, which requires additional effort for importing big amount of tickers.
If you want to use Alpha Vantage API, you need to claim free API key , which allows 25 requests per day.
When you get the API key, you can use Quote Endpoint to obtain ticker price. For example, if you want to get price of Airbus, you use the API
https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=AIR.PA&apikey=************
Import Stocks Data
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=****************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:
toNumber(join(map(prop("Current Price"), format(current)), ",")) * 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 Note 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.
Feel free to share your thoughts by leaving a comment or reaching out directly at [email protected] . Let's make managing your investments in Notion even better—together. 🚀