
Cancelled
Posted
Paid on delivery
I’ve written a Python-based trading script that consumes Dhan’s WebSocket feed for live market data (LTP) and places orders through the REST endpoints. The code runs smoothly until the very first SELL order is executed; immediately after that trade, the live market feed stops updating and the socket fails to close gracefully. In effect, I’m dealing with a runtime error inside the API integration layer that leaves the connection hanging and the algo without prices. What I need is straightforward: locate the exact point in the code where the disconnect handshake or event loop handling breaks, patch it so the stream stays alive after subsequent orders, and make sure the session shuts down cleanly when I call my exit routine. You’re free to refine how the asyncio event loop, reconnection logic, or callback handlers are organised, provided the overall architecture remains intact. Deliverables • Updated Python script(s) with the runtime fix applied • A short note (or inline comments) explaining what was changed and why • Quick test proof—CLI log or Jupyter snippet—showing the LTP feed still flowing after at least one SELL trade and then closing without errors You’ll likely touch Python 3.10, the official dhanhq WebSocket client, asyncio, and possibly websockets or requests; feel free to introduce lightweight helpers if it makes the flow more robust. Let’s get this feed stable.
Project ID: 40197894
6 proposals
Remote project
Active 2 mos ago
Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
6 freelancers are bidding on average ₹950 INR for this job

I can help you quickly identify and fix the runtime error in your Python trading script that consumes Dhan’s WebSocket live market feed. I work extensively with Python-based trading systems, WebSocket data streams, and brokerage APIs, so your issue is directly in my wheelhouse. I’ve debugged and stabilized similar live-feed integrations for algo traders, including handling connection drops, malformed payloads, and edge cases around reconnections and error handling. This includes work with broker APIs where reliability and low latency are critical. My approach would be to reproduce the error, inspect the WebSocket event lifecycle, harden the exception handling, and ensure robust reconnection and data validation logic. I’ll also add minimal logging so issues can be traced quickly in the future. I would love to chat more about your project! Regards
₹1,050 INR in 7 days
3.7
3.7

Readymade setups for Dhan Completed projects till now 1) Python + DhanAPI +Excel + VBA option scalping strategy 2) Python 21 EMA and 9 EMA crossover strategy on DhanAPI 3) Google sheet + FyersAPI trading 4) Google sheet + Algomojo + Upstox 5) Tradetron Banknifty option scalping strategy 6) Excel 2600 NSE 10 years data 7) Copytrading using python 8) Tradetron Supertrend + MACD Crossover Strategy 9) Dhan option chain with Greeks in Google spreadsheet via Google Appscript 10) Backtesting of Nifty options for wait and trade strategy 11) Trigger orders for Dhan Nifty options 12) Shoonya API:- Wait and trade strategy 13) Tradetron: RSI + ADX + EMA strategy 14) Python Moving avarage channel trading Algo 15) Kotak Neo: Turtle scalping strategy for options 16) Fyers Filtered option chain in Excel I can deliver any project in Trading. Readymade setups for Python available
₹1,050 INR in 7 days
3.0
3.0

EXPERT ((Software Testing, Python, Software Architecture, Software Development, JavaScript, PHP, REST API, Debugging, API Development and API Integration)) DEAR EMPLOYER, I’ve completed the exact same projects before successfully. Awarding me will be the fastest way to complete your task with the best rates possible. I CAN ASSURE YOU 100% THAT WE ARE FULLY CAPABLE OF EXECUTING ANY LEVEL OF TASK/PROJECT BASED ON THE SKILL REQUIRED. I am fully confident about our skills and my understanding of the project description and we are ready to go through any test or sample task you assign to acquire your trust. Let me know when are you available for an initial 15-30-minute discussion (FREE OF CHARGE) so we can discuss the requirement in detail and I can walk you through the mentioned systems to acquire your trust in my skill. REST ASSURED YOUR WORK IS IN VERY SAFE AND PROFESSIONAL HANDS. THANK YOU
₹600 INR in 4 days
0.0
0.0

Hello, I'm Rishil, a Python automation specialist with experience in API integrations, WebSocket handling, and asyncio event loops. I understand your Dhan trading script's WebSocket feed stops updating after the first SELL order and fails to close gracefully. My relevant experience: - Python scripting with API integrations and real-time data handling - WebSocket implementations and connection management - Asyncio event loop debugging and error handling - Automated workflow systems requiring stable API connections Deliverables: - Patched Python script with runtime fix - Inline comments explaining changes - Test proof (CLI log/Jupyter) showing continuous LTP feed after SELL trade and clean closure I'll need access to your current script and Dhan API credentials for testing environment. Ready to stabilize your trading script. Best regards, Rishil
₹800 INR in 3 days
0.0
0.0

Hello, I’ve carefully reviewed your issue with the Python-based trading script using Dhan WebSocket (LTP feed) and REST order placement. The behavior you’re seeing—where the live feed stops immediately after the first SELL order and the socket fails to close gracefully—is a classic asyncio + WebSocket lifecycle conflict, and I’ve handled similar issues in live trading systems. How I’ll Approach the Fix Trace the exact failure point Identify where the SELL order execution interferes with the WebSocket event loop Inspect callbacks, coroutine cancellation, and blocking REST calls inside async context Stabilize the event loop Ensure REST order placement does not block or corrupt the WebSocket loop Isolate order execution from the market data stream using proper task scheduling Fix WebSocket lifecycle & cleanup Patch disconnect/close handshake logic Ensure graceful shutdown on exit (no hanging sockets, no orphaned tasks) Add resilience Improve reconnection handling (if required) Guard against silent task failures after order execution Please connect for more details Regards Vivek
₹1,050 INR in 6 days
0.0
0.0

Chennai, India
Payment method verified
Member since Jan 30, 2026
₹1500-12500 INR
$8-15 USD / hour
$10-30 USD
₹600-1500 INR
£20-250 GBP
₹600-1500 INR
$250 USD
$5000-10000 USD
₹1500-12500 INR
₹600-1500 INR
£250-750 GBP
$250-750 USD
£250-750 GBP
$10-80 USD
₹100-400 INR / hour
$10-30 USD
$15-25 USD / hour
$30-250 USD
₹1500-12500 INR
₹600-1500 INR
$10-30 USD