Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Portfolio value tracker with PnL calculation

DEV Community·Lucas Gragg·about 1 month ago
#zwM511it
Reading 0:00
15s threshold
Cover image for Portfolio value tracker with PnL calculation

Lucas Gragg

Packaged crypto price alert bot this week after running it in production for ~60 days. Notes on what worked and what didn't.

The problem

Never miss a price move again. Set custom alerts for any cryptocurrency across major exchanges and get instant notifications via Telegram, email, or Discord when your targets hit.

What's in the box

  • Real-time price monitoring across 10+ exchanges
  • Custom alert conditions (above, below, percent change)
  • Telegram, Discord, and email notifications
  • Portfolio watchlist with live price tracking
  • Historical alert log and price snapshots

Code sample

# Basic structure
class Bot:
    def __init__(self, config):
        self.config = config

    def run(self):
        while True:
            self.scan()
            self.execute()

Enter fullscreen mode Exit fullscreen mode

If you want the full working version with all the battle-tested edge cases
handled, I packaged it here: Crypto Price Alert Bot

Happy to answer questions about the architecture in the comments.

Read More