Investment Tracker | Prix de la Bourse LIVE dans Notion [Tuto 2024]
Ce tutoriel explique comment automatiser les cours boursiers en temps réel dans Notion à l'aide de l'API Financial Modeling Prep et de Make. Grâce à cela, vous pouvez suivre vos investissements comme un pro et faire passer votre jeu financier au niveau supérieur. L'article comprend des instructions étape par étape sur la façon de configurer l'automatisation, ainsi que des conseils sur la façon de suivre vos actifs et vos investissements dans Notion. Un modèle gratuit est également fourni pour vous aider à démarrer.
⚠️ Ce tutoriel est en anglais.
Notion Live Stock Price Automation
Setup
To get live stock prices into Notion, you'll need three things:
- A Notion account: if you don't have one already, you can create one for free here*
- A Make account: if you don't have one already, you can create one for free here*
- An API key from Financial Modeling Prep: register on their website and get your free API key. If you need more features, you can subscribe to one of their plans.
The automation runs on Make, and to make your life easier, I made a blueprint (this is how Make calls their templates) that you can download here.
Notion
To get the live stock prices, you’ll need a database (called Portfolio) with at least two properties:
- Ticker (Title)
- Current price (Number)
You can also download my free Notion template if you want to make sure to set up everything properly.
Make
Now, let’s set up the automation.
Initialization
- Go to the Scenarios section
- Click “Create a new scenario”
- Click the three dots at the bottom (it says “More” on hover), and click “Import Blueprint”
- Select the Blueprint you previously downloaded in the Setup section & click “Save”
Module 1
- Click on the first Notion module
- Click Add a new connection (Connection type = Public)
- Follow the steps and make sure that your “Portfolio” database is contained in the pages that you select. You can select all pages from your workspace to be sure.
- Then, you want to connect your “Portfolio” database to the first step of the Make scenario. You have two possibilities:
- Option 1: Click on the “Search” button, on the right of the “Database ID” section. Then type the exact name of the database (in your case “Portfolio”).
- Option 2: Go to the “Portfolio” database and copy the database ID. The database ID is the first part of your URL, when you’re on the database page, after the “/” and before the “?”.
- Increase the limit to 1000 if it's not the case.
- Your module should look something like that:
- Click “OK”.
- Right-click on the module, and select “Run this module only.” It should not return any error (errors displays in red) & you should have a 1 in the small bubble.
⚠️ If you get an error such as “Account doesn’t exist […]”, add your own Notion connection to the second Notion module.
Module 2
- Click on the 2nd module (HTTP)
- If it’s not already set up (it should be), in the URL field, replace the item in black with your own one. Keep the “https://financialmodelingprep.com/api/v3/quote-short/” part of the URL, click in the field, then select your ticker name from your Notion database. (”properties values” → “Ticker” → “plain_text”).
- At the end of this same url, you need to add: ?apikey=
- After the equal sign, you need to paste your Financial Modeling Prep API key. You can find your API key in the dashboard section (if you created an account).
The URL field should look like that:
- Don’t change anything else. Your module should look like that:
- Click “OK”.
- Right-click on the module → “Run this module only” → Input AAPL in the “plain text” section of the “properties_value” field. It should not return any error (in red) & you should have a 1 in the small bubble.
Module 3
- If you haven’t already, connect your own Notion account (select the same you created from module 1)
- In the “Database ID” field, paste the same database ID as the one in the 1st module.
- In the “Database Item ID" field, select “Page ID” of the 1st Notion module.
- In the “Current price” field, select “price” from “Data” from the HTTP module
- If you used the template, you can also add “volume” in the “Volume” Notion property section. If you haven’t used the template but still want to access the volume, create a new number property in your Portfolio database called “Volume” (it will also allow you to calculate the market cap in Notion).
- Click “OK”.
Filter between Module 2 & 3
- Click on the dots between the 2nd and the 3rd module. It should open the filter.
- Your condition should be: properties_value.Ticker[ ]:plain_text “Equal to” Data[ ]:symbol
- Click “Ok”
Final Steps
- Run the entire scenario using the "Run Once" button (bottom-left of your screen). You will see the current stock prices in your Portfolio database!
- You can now select the frequency of updates by clicking on the clock attached to the first module.
⚠️ The Make free plan gives you access to 1000 operations per month. You can upgrade to get more operations, and make sure you never run out of operations.
Notion Investment Tracker Tutorial
Now that you have the live stock prices in your Notion, you can play with databases to make all sorts of calculation for you.
Investments database
The investments database is where you keep track of all the investments you have made over time. Create a new table and add a relation property to Portfolio. Then, add a rollup to retrieve the current stock prices for each asset.
Add two number properties: "Invested" and "Shares". These are the fields you will have to fill out when you make a new purchase (in addition to the stock you purchased).
All the rest can be automated. For example, you can add a Profit/Loss formula property using the following formula: prop("Current price") * prop("Shares") - prop("Invested")
You can also calculate your share price (from when you purchased the shares) and the growth.
Portfolio database
The Portfolio database is one you already have; it's the database that contains the live stock prices.
Now that it's linked to the Investments database, you can use rollups to retrieve the total profit/loss, number of shares for each stock, and the total portfolio value.
You can also make use of linked databases to have a separate view for live stock prices.
Accounts database
If you have multiple accounts or not, I recommend building an accounts database. In addition, to track investments for each account, it can help aggregate all the data into one unique place.
You'll be able to see your total balance and total profit/loss for all of your stocks. Additionally, it will help you access your portfolio percentage in the portfolio database.
Template Notion Gratuit
Télécharge gratuitement mon modèle Notion de suivi des investissements pour accéder à tout le tableau de bord. Ce modèle te permet de suivre la valeur de ton portefeuille, le profit total et la perte, les pourcentages du portefeuille, et plus encore.Si tu penses que tu ne seras pas capable de mettre en place l'automatisation toi-même, ne t'inquiète pas ! Choisis le plan "Setup" (€249), et je construirai l'automatisation pour toi.
Template Notion Bourse Tracker
Conclusion
En conclusion, automatiser les prix des actions en temps réel dans Notion peut être un outil puissant pour suivre tes investissements comme un pro. Avec l'aide de l'API de Financial Modeling Prep et Make, c'est facile à mettre en place et peut te faire gagner beaucoup de temps. En utilisant le modèle gratuit fourni et en suivant les étapes décrites dans ce tutoriel, tu peux amener ton jeu financier au niveau supérieur.
*certains des liens dans ce post sont affiliés, ce qui signifie que je peux gagner une petite commission si tu décides de t'abonner à leur service.
Créé ton compte Notion gratuitement 🙃 (#NotionPartner)
Pour automatiser les cours boursiers en temps réel dans Notion, vous avez besoin de trois éléments : un compte Notion, un compte Make et une clé API de Financial Modeling Prep. Vous pouvez créer un compte Notion and Make gratuitement et vous inscrire sur le site Web de Financial Modeling Prep pour obtenir votre clé API gratuite.
L'API Financial Modeling Prep fournit les cours boursiers en temps réel qui sont mis à jour dans votre Notion. L'automatisation est configurée sur Make qui s'intègre facilement à Notion, permettant aux cours boursiers mis à jour de circuler automatiquement dans votre base de données Notion.
Le modèle Notion gratuit fourni dans le didacticiel vous donne accès à un tableau de bord complet qui vous permet de suivre la valeur de votre portefeuille, le total des profits et pertes, les pourcentages du portefeuille, etc. En utilisant ce modèle, vous pouvez mieux gérer et surveiller vos investissements en actions.