We’ve all been there — staring at a price chart, switching tabs, doing other work… and boom — the market moves.
You come back, and it’s either a missed profit or an unnecessary loss.
That was me, multiple times, while trading on Delta Exchange. Delta Exchange offers a great trading experience but lacks real-time custom alerts for specific price points.
I knew I couldn’t sit and watch the chart all day.
I wanted a fast, resource-efficient, and reliable way to track prices and trigger alerts without constantly refreshing charts or relying on third-party apps.
Tech Stack Used
- Python – Core programming language.
- WebSocket – For real-time price streaming.
- JSON – To store and manage alert configurations.
- Plyer – For cross-platform desktop notifications.
Backend Logic
Here’s how the tool works under the hood:
- Connect to Delta Exchange WebSocket feed to get real-time price data.
- Compare latest price with stored alert conditions from a local JSON file.
- Trigger an alert when the price crosses the target threshold.
- Mark the alert as “triggered” so it’s not repeatedly fired.
- Send notifications via:
- Desktop notification using Plyer.
- Email notification for remote alerts.
Why WebSocket Instead of REST API?
Initially, I considered using the REST API for fetching prices, but there were a few drawbacks:
- REST is pull-based – I’d have to make repeated requests to get the latest price.
- This leads to API rate limits and unnecessary network usage.
- Even with short intervals, REST polling introduces latency in updates.
On the other hand, WebSocket:
- Pushes data in real-time as soon as the price changes.
- Reduces server load and network calls.
- Ensures alerts trigger instantly without delays.
For a price alert system, real-time updates are critical — so WebSocket was the obvious choice.
Sample Output
Future Developments
While the CLI works perfectly for my needs, I plan to:
- Containerize the application with Docker for easy deployment.
- Create a web-based UI for broader accessibility and a better user experience.
If you trade on Delta Exchange (or any platform without great alerting), I highly recommend building something like this. It’s not just about automation — it’s about peace of mind.
Checkout my project repo on GitHub
Top comments (0)