• Latest
  • Trending
  • All
  • Trading & Investing
  • Strategies & Techniques
  • Risk Management & Portfolio Allocation
  • Technical Analysis Tools & Indicators
  • Fundamental Analysis & Research
  • Blockchain Technology
  • DeFi & NFTs
Create a Crypto Portfolio -dashboard (Python Guide)

Create a Crypto Portfolio -dashboard (Python Guide)

July 17, 2025
What happens in crypto today? Daily Crypto News Digest

What happens in crypto today? Daily Crypto News Digest

July 2, 2025
556 million dollars into the inflow of Bitcoin ETF signals is a major shift in investor sentiment

556 million dollars into the inflow of Bitcoin ETF signals is a major shift in investor sentiment

June 12, 2025
Long and short positions in crypto, explained

Long and short positions in crypto, explained

June 11, 2025
SEI pricing forecast 2025: Short-term bearish, long-term bullish?

SEI pricing forecast 2025: Short-term bearish, long-term bullish?

May 29, 2025
Market share of centralized crypto exchanges, according to trading volume

Market share of centralized crypto exchanges, according to trading volume

May 27, 2025
Buyer and Seller Behavior: The Fundamental of Bitcoin Analyze

Buyer and Seller Behavior: The Fundamental of Bitcoin Analyze

May 25, 2025
Тор-10 best crypto indicators to learn

Тор-10 best crypto indicators to learn

May 25, 2025
The Ultimate Crypto Tools Pack – Part 2

The Ultimate Crypto Tools Pack – Part 2

May 24, 2025
Stx bullish recovery to continue

Stx bullish recovery to continue

May 24, 2025
Japan’s central bank digital currency should go big, not go home

Japan’s central bank digital currency should go big, not go home

May 23, 2025
What is it and 5 ways to avoid it

What is it and 5 ways to avoid it

May 23, 2025
X spaces repeat with bluhale

X spaces repeat with bluhale

May 5, 2025
  • Home
  • Trading & Investing
    • Risk Management & Portfolio Allocation
    • Strategies & Techniques
    • Fundamental Analysis & Research
    • Technical Analysis Tools & Indicators
  • Crypto News & Analysis
    • Bitcoin
    • Market Overview & Trends
    • Altcoins
    • Technical Analysis & Charting
  • DeFi & NFTs
    • Decentralized Finance (DeFi)
    • Non-Fungible Tokens (NFTs)
    • Exchange Hacks & Security Breaches
    • Wallet Hacking & Phishing Attacks
  • Blockchain Technology
    • Supply Chain & Logistics Solutions
    • Enterprise Adoption & Applications
    • Healthcare & Medical Innovations
    • Energy & Sustainability Initiatives
Thursday, July 17, 2025
  • Login
UnCirculars
  • Home
    • Home – Layout 1
    • Home – Layout 2
    • Home – Layout 3
    • Home – Layout 4
    • Home – Layout 5
  • Crypto News & Analysis
    • All
    • Adoption & Use Cases
    • Altcoins
    • Bitcoin
    • Market Overview & Trends
    • On-Chain Data & Metrics
    • Security & Scams
    • Technical Analysis & Charting
    Create a Crypto Portfolio -dashboard (Python Guide)

    Create a Crypto Portfolio -dashboard (Python Guide)

    What happens in crypto today? Daily Crypto News Digest

    What happens in crypto today? Daily Crypto News Digest

    556 million dollars into the inflow of Bitcoin ETF signals is a major shift in investor sentiment

    556 million dollars into the inflow of Bitcoin ETF signals is a major shift in investor sentiment

    Long and short positions in crypto, explained

    Long and short positions in crypto, explained

    SEI pricing forecast 2025: Short-term bearish, long-term bullish?

    SEI pricing forecast 2025: Short-term bearish, long-term bullish?

    Market share of centralized crypto exchanges, according to trading volume

    Market share of centralized crypto exchanges, according to trading volume

    Buyer and Seller Behavior: The Fundamental of Bitcoin Analyze

    Buyer and Seller Behavior: The Fundamental of Bitcoin Analyze

    Тор-10 best crypto indicators to learn

    Тор-10 best crypto indicators to learn

    The Ultimate Crypto Tools Pack – Part 2

    The Ultimate Crypto Tools Pack – Part 2

    Stx bullish recovery to continue

    Stx bullish recovery to continue

    • Bitcoin
    • Altcoins
    • Market Overview & Trends
    • Technical Analysis & Charting
    • On-Chain Data & Metrics
    • Adoption & Use Cases
    • Security & Scams
    • Opinion & Predictions
  • Blockchain Technology
    • Enterprise Adoption & Applications
    • Supply Chain & Logistics Solutions
    • Healthcare & Medical Innovations
    • Energy & Sustainability Initiatives
    • Gaming & Metaverse Infrastructure
    • Web3 Development & Decentralization
    • DAO & Governance Protocols
    • Scalability & Interoperability Solutions
    • Privacy & Security Enhancements
  • Trading & Investing
    • Strategies & Techniques
    • Risk Management & Portfolio Allocation
    • Technical Analysis Tools & Indicators
    • Fundamental Analysis & Research
    • Market Psychology & Sentiment
    • Crypto Tax Implications
    • Institutional Investment Landscape
  • DeFi & NFTs
    • Decentralized Finance (DeFi)
    • Non-Fungible Tokens (NFTs)
  • Regulation & Policy
    • Global Regulatory Landscape
    • SEC, CFTC, and Government Actions
    • Tax Implications & Reporting
    • KYC/AML Compliance & Standards
    • Institutional Investment Guidelines
    • Central Bank Digital Currencies (CBDCs)
    • Stablecoin Regulation & Oversight
    • Self-Regulatory Organizations (SROs)
  • Security & Scams
    • Exchange Hacks & Security Breaches
    • Wallet Hacking & Phishing Attacks
    • Rug Pulls & Exit Scams
    • Malware & Ransomware Threats:
    • User Education & Best Practices
    • Regulatory Frameworks & Protections
    • Insurance & Recovery Options
  • Community & Culture
    • Crypto Influencers & Thought Leaders
    • Social Media & Online Communities
    • Memes & Internet Culture
    • Crypto Art & Music
    • Events & Conferences
    • Adoption in Developing Countries
  • Opinion & Education
    • Expert Commentaries & Predictions
    • Beginner Guides & Tutorials
    • Glossary of Crypto Terms
    • Research Papers & Whitepapers
    • Podcasts & Video Interviews
    • Book Reviews & Recommendations
No Result
View All Result
UnCirculars
No Result
View All Result
Home Crypto News & Analysis Technical Analysis & Charting

Create a Crypto Portfolio -dashboard (Python Guide)

by Maria Rodriguez
July 17, 2025
in Technical Analysis & Charting
0
Create a Crypto Portfolio -dashboard (Python Guide)
491
SHARES
1.4k
VIEWS
Share on FacebookShare on Twitter


Building a cryptocurrency portfolio -dashboard is an excellent way to learn more about this emerging financial market. Like any other investment, it is also subject to a certain degree of risk. Therefore, once a portfolio is created, it becomes important to constantly watch the growth. In addition to visualizing trends over time, the calculation of returns in periodic intervals also helps to refine trading strategies and to make the market access and exit decisions.

In today’s article, we will investigate how to build a crypto portfolio -dashboard using detectable framework and Python. This will provide a comprehensive exposition of absolute and relative price change, along with clear indicators to calculate returns. As Crypto markets trade 24/7, we will also set up automation using GitHub actions to update the dashboard regularly.

Here is a direct preview of what the dashboard will eventually look like, and you can access the GitHub keeping here. Let’s dive in!

Prerequisites

In addition to Python 3, we must set up a detectable framework that is a node. Make sure you install Node.JS version 18 or later. It is also recommended to install yarn as the package manager.

Npm install -global yarn

Installed versions of different packages can be verified as shown below:

Node -Sion

Npm -version

yarn -version

Since the dashboard is offered as a GitHub page and uses GitHub actions for automation, a personal GitHub account is also needed.

The above end point can be obtained for free, but it needs key verification. All you have to do is sign up and create a demo account. The key can then be generated using the developer’s dashboard. In this guide we will use a Pro API key, which unlocks the higher tariff boundaries.

Creating a new project on observable framework

We will start creating the folder structure for our dashboard. The fronting provides what the dashboard looks like and will be based on JavaScript. The backing is responsible for retrieving the historical price data of Coingecko, and will use Python. To create a new project, run:

yarn creates @observablehq

Now a series of directions will appear that can be answered based on user preferences. Note that we chose Yarn as the preferred package manager and also initiated a GIT repository.

Observable setup process

The Docs folder contains code for both the front and the backing. In our case, the Python will be used to make API calls to Coingecko and make historical price data for a given asset. It is also called a data fan, which will then be used by the dashboard -front. Within documents we can create another folder data to store all the Python code. This will further help to organize the code in separate files for better readability as shown in the following sections.

How can you fetch historical coin price data using an API?

In the File API.py we define the following feature to read the API key locally from a file or from an environmental variable. The latter is relevant in setting automation using GitHub actions, and will be discussed in detail later.

💡 Pro-Tip: Using a custom exception class such as Keynotfounderror makes debugging easy.

We now define another feature that will be used to process the API request. Response -code 200 indicates that the request was successful.

💡 Pro-Tip: Check out the full list of response codes and corresponding statuses here.

Finally, the appropriate URL is used to reach historical price data for a specified duration (number of days), for a given currency and to a certain accuracy. Further details regarding this endpoint can be found in the API documents.

The import parameters of the above function along with a set of dummy portfolio details are added to a separate portfolio.py file. Historical data will be fetched with euros for an expensive 120 days as the target currency.

# Number of days Duration = “120” target_currency = “EUR”

# Define Portfolio Port_curr = [“bitcoin”, “ethereum”, “chainlink”, “dash”, “litecoin”]Port_amount = [0.10, 1.5, 300, 75, 50]

How can you set up the Python Data Loader?

The Datal Aaner is essentially a Python script (value.json.py) that does the following:


Fetch the historical price data for a given coin and a specified duration



Create a distribution dictionary with daily value (daily price x portfolio amount)



Convert the dictionary to Json and dump the data to standard output


The API call returns a dictionary, which has time in the form of Unix epoch. To convert it into the DateTime format, we can make use of the following transformation:

In addition, we want to collect price data for all assets and store it in a list of dictionaries. Such a data structure can be created by initializing with zeros.

How to Set Up Your Crypto Portfolio -Dashboard

The pages for the dashboard are grouped in Markdown files, where special code blocks can be used to execute JavaScript code. The content of the homepage is specified in the index.md file. Furthermore, we will create two more pages with the following idea:


Value.md – Show change in total value (euro) of the portfolio along with individual crashes



Change.md – Show relative change (in %) between different cryptocurrencies with an interactive date choice function


Similar to our Python -backend, we can also organize the front end code in separate files to make reuse possible and improve the readability. The plot functions are grouped into the components/plots.js file. For the first page, we want to make a line + area plot to detect the total change of value in our portfolio. This can be achieved using the fantastic observable plot library.

Area plot of total portfolio value

Similarly, it also helps to visualize changes in the individual assets within the portfolio, as there may be a situation where some of them remain the same or decrease over time. So a stacked bar plot is a neat way to get more insights on the performance of the individual assets.

Stacked bar plot

A stacked surface plot shows the same information, but can be more visually attractive.

Stacked area plot

To give the user a better perspective on the extent of the portfolio changes, we can also add two cards on the top row, one that shows the % change over the past 7 days, while the other over the past 30 days.

Change cards

The % change can be easily calculated by making a JavaScript function Gettpertchange, which takes the number of days as an additional input.

Overall layout of the page is controlled via the following code in value.md:

The second page (change.md) shows relative achievement when comparing all the assets in the portfolio.

Change in individual value of portfolio components

A similar approach can be used to show the change in total value.

Change in the total portfolio value for selected date series

Similar to the first page, it will be helpful to add two cards to the top, showing the top performer (maximum % change in value) over a period of 7 and 30 days.

Top performer for a given durationTo calculate the top performer, we use the following logic:

In addition, we want an interactive date choice function so that we can have different points of origin when comparing the relative performance. This is achieved using the date interface component available via observable input.






Const Date = View (Inputs.date ({Label: “Select BeginDate for Comparison”, Min: ClubbedStack[0].Time, Max: Clubbedstack[clubbedStack.length – 1].Time})));




Select Date

The overall page layout is controlled via the following logic:

How to test the dashboard locally?

Once the pre- and backing code is ready, the dashboard can be built locally to verify that everything works as expected. Observable framework supports live preview, which means that the in-browsing page automatically updates when any changes are made. It helps quickly test the impact of any changes to the page layout or on the data trenders.

Perform the following to start the preview server:

yarn dev

A browser window should open automatically. If not, then visit the following address: http://127.0.0.1:3000/

How can you deploy the dashboard on GitHub pages?

In the previous section, we managed to generate the dashboard locally.

Since you may also want to look at your portfolio if you are from your laptop or on your phone, we will now take a step further and use GitHub actions to automatically deploy our dashboard to our own GitHub page -this will make it accessible to all devices.

We can even set up a schedule on which the dashboard must be updated, ensuring that the impact of any sudden price movement immediately becomes visible to us.

The observable project was initiated as a GIT keeping site in the beginning. This can now be printed to GitHub, as is done for the code in this article. Now we need to enable pages deployment. Go to Settings> Pages> Build and Implementation> Source (Select GitHub actions).

The Coingecko API key must be stored as a repository secret: Settings> Secrets and Variables> Actions> Secret> Repository Secrets> New Repentance secret.

The next step is to create a workflow file that will be used to build and deploy the dashboard. The file contains one or more tasks, which are essentially a series of steps that describe how we want to create the software environment and build the dashboard. We must ensure that all dependencies (node.js and python) are only installed during the construction. The last step loads up artifacts, which are picked up by the deployment work, setting out how the pages should be created.

The schedule trigger can be used to set up a pre -defined frequency with which the dashboard will be built and deployed. It uses the Cron Synaxis, which can be adjusted according to your need. The example above causes the workflow 30 minutes past an hour, every two hours (02:30, 04:30, etc.). Summary of the workflow runs appears in the tabal actions.

Summary of GitHub actions workflow runs

Opening a single workflow result shows a figure with all linked posts (only two in our case). The URL of the deployed GitHub page is also visible.

Summary of a selected workflow

💡 Pro-Tip: GitHub pages will be visible to everyone by default. If you want to publish a website privately, you must create an organization account and use Enterprise Cloud. See more details here.

To check your portfolio health, you can now bookmark the URL for the dashboard and visit it whenever you want!

If you enjoyed this article, you might want to read more about building a Dex tracker with Streamlit and Python.

Disclaimer for Uncirculars, with a Touch of Personality:

While we love diving into the exciting world of crypto here at Uncirculars, remember that this post, and all our content, is purely for your information and exploration. Think of it as your crypto compass, pointing you in the right direction to do your own research and make informed decisions.

No legal, tax, investment, or financial advice should be inferred from these pixels. We’re not fortune tellers or stockbrokers, just passionate crypto enthusiasts sharing our knowledge.

And just like that rollercoaster ride in your favorite DeFi protocol, past performance isn’t a guarantee of future thrills. The value of crypto assets can be as unpredictable as a moon landing, so buckle up and do your due diligence before taking the plunge.

Ultimately, any crypto adventure you embark on is yours alone. We’re just happy to be your crypto companion, cheering you on from the sidelines (and maybe sharing some snacks along the way). So research, explore, and remember, with a little knowledge and a lot of curiosity, you can navigate the crypto cosmos like a pro!

UnCirculars – Cutting through the noise, delivering unbiased crypto news

Share196Tweet123
Maria Rodriguez

Maria Rodriguez

Data speaks volumes, and Maria translates the language of charts and indicators into actionable insights. Her visualizations and market analyses guide you through the ever-shifting terrain of cryptocurrency prices and trends.

UnCirculars

Copyright © 2024 UnCirculars

Navigate Site

  • About Us
  • Advertise
  • Terms of Use
  • Disclaimer
  • Privacy Policy
  • Contact Us

Follow Us

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
No Result
View All Result
  • Home
  • Trading & Investing
    • Risk Management & Portfolio Allocation
    • Strategies & Techniques
    • Fundamental Analysis & Research
    • Technical Analysis Tools & Indicators
  • Crypto News & Analysis
    • Bitcoin
    • Market Overview & Trends
    • Altcoins
    • Technical Analysis & Charting
  • DeFi & NFTs
    • Decentralized Finance (DeFi)
    • Non-Fungible Tokens (NFTs)
    • Exchange Hacks & Security Breaches
    • Wallet Hacking & Phishing Attacks
  • Blockchain Technology
    • Supply Chain & Logistics Solutions
    • Enterprise Adoption & Applications
    • Healthcare & Medical Innovations
    • Energy & Sustainability Initiatives

Copyright © 2024 UnCirculars