codetradesalgo-cmyk/dhan-api-tradingview-webhook-python ? reverse-engineered prompt
Reverse engineered prompt
Build me a Python webhook service that takes TradingView alerts and routes them to the Dhan v2 API as fast as possible.
I want it to run as an async ASGI app, accept JSON on a webhook endpoint, handle multiple alerts at the same time without blocking, and avoid placing duplicate orders if the same signal comes in again or the broker times out. Keep the Dhan token out of the code and load it from an environment file instead. Use SQLite for simple state tracking so the app can recover cleanly after a restart.
It should be set up for deployment on a Linux server, and include clear instructions for running it with an ASGI server. If you need to check anything about the latest Dhan or TradingView webhook format, look up the current docs online first.
Are you gonna build this?
make sure you review the code using coderabbit