Intro
I’ve been interested in crypto for a while now, but I recently decided to learn Python and try building something real with it. One idea that stood out was a crypto price tracker — a simple terminal program that fetches the current price of any cryptocurrency. It felt like the perfect beginner project for me. I faced challenges, but with patience and guidance, I made it work!
What I Used
-
Python programming language
-
PyCharm (my code editor)
-
The requests library
-
CoinGecko API
What Went Wrong (And How I Fixed It)
Installing Python Packages
Even though I knew my Python version, I had never installed a package before. This was my first time, so I used PyCharm’s built-in package manager to install the requests library instead of using the terminal.
Network Issues While Testing
Sometimes my internet wasn’t stable, so the API wouldn’t respond. I had to keep retrying until I got a successful response and the price displayed correctly.
Wrong Coin or Coin Not Found
I noticed that typing a short or simple name like "sol" didn’t always bring up Solana — instead, it returned a different coin with a similar name. This was because CoinGecko searches based on the name string. The fix was to use the correct coin ID from the CoinGecko website.
Decimal and Rounding Errors
Some coins like AURA or PEPE showed a price of $0.00 even though they had real value. That was because I used only two decimal places in the output. I fixed it by adjusting the code to display more decimal places (up to 5), so even tiny prices could be seen.
Price Differences from CoinGecko Website
Sometimes the price I saw on the terminal didn’t match the one on CoinGecko exactly. I later learned that this can be caused by:
-
CoinGecko returning cached or slightly delayed data
-
Rounding differences
-
Time differences between request and website refresh
How It Felt
It honestly felt amazing to build something that works. Even though it looked simple, it showed me how code and real data come together. I felt like I had achieved something real — not just copying from a tutorial but solving problems and getting results.
Did It Work?
Yes! It works. I can enter any coin's correct name or ID and get its current price in USD. For example, typing bitcoin returns the current price with proper formatting. And for very cheap coins like pepe, it now shows the price more accurately because of the decimal fix.
Coins I Tested
Some of the coins I tested include:
-
bitcoin
-
solana
-
bnb (binancecoin)
-
mantle
-
ice
-
monero
-
aura
Some gave wrong results at first, but after using their proper CoinGecko IDs, it worked perfectly.
Lessons I Learned
-
Real coding means solving real problems
-
Errors are not the end — they’re part of the journey
-
Even small wins matter. I learned more fixing bugs than I did watching tutorials
-
Always check the API docs when things seem off
My Advice to Other Beginners
If you're just starting out with Python or exploring crypto, start with a small project like this. You’ll run into problems — that’s guaranteed — but you’ll also grow faster by figuring things out one step at a time.
Final Note
I’ve known about crypto for a while, but this was my first time building something practical with it using code. I’m glad I didn’t give up when things got confusing. This project gave me the confidence to keep going, and I look forward to building even better tools in the future.
Thanks for reading! 🙌