[2026-07-09 10:20:48 IST] Starting executionβ¦
[2026-07-09 10:20:52 IST] Project mode detected
[2026-07-09 10:20:53 IST] Extracted: main.py
[2026-07-09 10:20:54 IST] Extracted: utils.py
[2026-07-09 10:20:54 IST] Extracted 2 files, entry point: main.py
[2026-07-09 10:20:55 IST] Installing requirementsβ¦
[2026-07-09 10:20:59 IST] [pip] Collecting dhanhq==2.2.0 (from -r /tmp/requirements.txt (line 1))
[2026-07-09 10:20:59 IST] [pip] Downloading dhanhq-2.2.0-py3-none-any.whl.metadata (13 kB)
[2026-07-09 10:21:00 IST] [pip] Collecting pandas==2.2.3 (from -r /tmp/requirements.txt (line 2))
[2026-07-09 10:21:00 IST] [pip] Downloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (89 kB)
[2026-07-09 10:21:00 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 89.9/89.9 kB 18.7 MB/s eta 0:00:00
[2026-07-09 10:21:00 IST] [pip] Collecting numpy==2.1.0 (from -r /tmp/requirements.txt (line 3))
[2026-07-09 10:21:00 IST] [pip] Downloading numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
[2026-07-09 10:21:00 IST] [pip] βββββββββββββββββββββββββββββββββββββββ 60.9/60.9 kB 107.2 MB/s eta 0:00:00
[2026-07-09 10:21:00 IST] [pip] Collecting pytz==2026.1.post1 (from -r /tmp/requirements.txt (line 4))
[2026-07-09 10:21:01 IST] [pip] Downloading pytz-2026.1.post1-py2.py3-none-any.whl.metadata (22 kB)
[2026-07-09 10:21:01 IST] [pip] Downloading dhanhq-2.2.0-py3-none-any.whl (36 kB)
[2026-07-09 10:21:01 IST] [pip] Downloading pandas-2.2.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.1 MB)
[2026-07-09 10:21:01 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 13.1/13.1 MB 90.2 MB/s eta 0:00:00
[2026-07-09 10:21:01 IST] [pip] Downloading numpy-2.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB)
[2026-07-09 10:21:01 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 16.3/16.3 MB 112.0 MB/s eta 0:00:00
[2026-07-09 10:21:01 IST] [pip] Downloading pytz-2026.1.post1-py2.py3-none-any.whl (510 kB)
[2026-07-09 10:21:01 IST] [pip] βββββββββββββββββββββββββββββββββββββββ 510.5/510.5 kB 101.5 MB/s eta 0:00:00
[2026-07-09 10:21:01 IST] [pip] Installing collected packages: pytz, dhanhq, pandas, numpy
[2026-07-09 10:21:14 IST] [pip] Successfully installed dhanhq-2.2.0 numpy-2.1.0 pandas-2.2.3 pytz-2026.1.post1
[2026-07-09 10:21:14 IST] [pip]
[2026-07-09 10:21:14 IST] [pip] [notice] A new release of pip is available: 24.0 β 26.1.2
[2026-07-09 10:21:14 IST] [pip] [notice] To update, run: pip install --upgrade pip
[2026-07-09 10:21:17 IST] [pip] Requirement already satisfied: dhanhq==2.2.0 in /tmp/pip/lib/python3.11/site-packages (from -r /tmp/requirements.txt (line 1)) (2.2.0)
[2026-07-09 10:21:17 IST] [pip] Requirement already satisfied: pandas==2.2.3 in /tmp/pip/lib/python3.11/site-packages (from -r /tmp/requirements.txt (line 2)) (2.2.3)
[2026-07-09 10:21:17 IST] [pip] Requirement already satisfied: numpy==2.1.0 in /tmp/pip/lib/python3.11/site-packages (from -r /tmp/requirements.txt (line 3)) (2.1.0)
[2026-07-09 10:21:17 IST] [pip] Requirement already satisfied: pytz==2026.1.post1 in /tmp/pip/lib/python3.11/site-packages (from -r /tmp/requirements.txt (line 4)) (2026.1.post1)
[2026-07-09 10:21:17 IST] [pip] Collecting requests>=2.28.1 (from dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:17 IST] [pip] Downloading requests-2.34.2-py3-none-any.whl.metadata (4.8 kB)
[2026-07-09 10:21:17 IST] [pip] Collecting websockets>=12.0.1 (from dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:17 IST] [pip] Downloading websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl.metadata (6.8 kB)
[2026-07-09 10:21:17 IST] [pip] Collecting pyOpenSSL>=20.0.1 (from dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:17 IST] [pip] Downloading pyopenssl-26.3.0-py3-none-any.whl.metadata (22 kB)
[2026-07-09 10:21:18 IST] [pip] Collecting python-dateutil>=2.8.2 (from pandas==2.2.3->-r /tmp/requirements.txt (line 2))
[2026-07-09 10:21:18 IST] [pip] Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
[2026-07-09 10:21:18 IST] [pip] Collecting tzdata>=2022.7 (from pandas==2.2.3->-r /tmp/requirements.txt (line 2))
[2026-07-09 10:21:18 IST] [pip] Downloading tzdata-2026.2-py2.py3-none-any.whl.metadata (1.4 kB)
[2026-07-09 10:21:18 IST] [pip] Collecting cryptography<50,>=49.0.0 (from pyOpenSSL>=20.0.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:18 IST] [pip] Downloading cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl.metadata (4.3 kB)
[2026-07-09 10:21:18 IST] [pip] Collecting typing-extensions>=4.9 (from pyOpenSSL>=20.0.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:18 IST] [pip] Downloading typing_extensions-4.16.0-py3-none-any.whl.metadata (3.3 kB)
[2026-07-09 10:21:18 IST] [pip] Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas==2.2.3->-r /tmp/requirements.txt (line 2))
[2026-07-09 10:21:18 IST] [pip] Downloading six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
[2026-07-09 10:21:19 IST] [pip] Collecting charset_normalizer<4,>=2 (from requests>=2.28.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading charset_normalizer-3.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (41 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 41.7/41.7 kB 87.5 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Collecting idna<4,>=2.5 (from requests>=2.28.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading idna-3.18-py3-none-any.whl.metadata (6.1 kB)
[2026-07-09 10:21:19 IST] [pip] Collecting urllib3<3,>=1.26 (from requests>=2.28.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading urllib3-2.7.0-py3-none-any.whl.metadata (6.9 kB)
[2026-07-09 10:21:19 IST] [pip] Collecting certifi>=2023.5.7 (from requests>=2.28.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading certifi-2026.6.17-py3-none-any.whl.metadata (2.5 kB)
[2026-07-09 10:21:19 IST] [pip] Collecting cffi>=2.0.0 (from cryptography<50,>=49.0.0->pyOpenSSL>=20.0.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading cffi-2.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.5 kB)
[2026-07-09 10:21:19 IST] [pip] Collecting pycparser (from cffi>=2.0.0->cryptography<50,>=49.0.0->pyOpenSSL>=20.0.1->dhanhq==2.2.0->-r /tmp/requirements.txt (line 1))
[2026-07-09 10:21:19 IST] [pip] Downloading pycparser-3.0-py3-none-any.whl.metadata (8.2 kB)
[2026-07-09 10:21:19 IST] [pip] Downloading pyopenssl-26.3.0-py3-none-any.whl (56 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 56.0/56.0 kB 85.5 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 229.9/229.9 kB 57.1 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading requests-2.34.2-py3-none-any.whl (73 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 73.1/73.1 kB 109.3 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading tzdata-2026.2-py2.py3-none-any.whl (349 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 349.3/349.3 kB 74.1 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl (184 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 184.6/184.6 kB 68.9 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading certifi-2026.6.17-py3-none-any.whl (133 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 133.3/133.3 kB 95.0 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading charset_normalizer-3.4.9-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (221 kB)
[2026-07-09 10:21:19 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 221.3/221.3 kB 92.1 MB/s eta 0:00:00
[2026-07-09 10:21:19 IST] [pip] Downloading cryptography-49.0.0-cp311-abi3-manylinux_2_34_x86_64.whl (4.7 MB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 4.7/4.7 MB 59.1 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Downloading idna-3.18-py3-none-any.whl (65 kB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 65.5/65.5 kB 104.2 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Downloading six-1.17.0-py2.py3-none-any.whl (11 kB)
[2026-07-09 10:21:20 IST] [pip] Downloading typing_extensions-4.16.0-py3-none-any.whl (45 kB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 45.6/45.6 kB 72.7 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Downloading urllib3-2.7.0-py3-none-any.whl (131 kB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 131.1/131.1 kB 76.3 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Downloading cffi-2.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (217 kB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 217.9/217.9 kB 69.6 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Downloading pycparser-3.0-py3-none-any.whl (48 kB)
[2026-07-09 10:21:20 IST] [pip] ββββββββββββββββββββββββββββββββββββββββ 48.2/48.2 kB 99.6 MB/s eta 0:00:00
[2026-07-09 10:21:20 IST] [pip] Installing collected packages: websockets, urllib3, tzdata, typing-extensions, six, pycparser, idna, charset_normalizer, certifi, requests, python-dateutil, cffi, cryptography, pyOpenSSL
[2026-07-09 10:21:22 IST] [pip] Successfully installed certifi-2026.6.17 cffi-2.1.0 charset_normalizer-3.4.9 cryptography-49.0.0 idna-3.18 pyOpenSSL-26.3.0 pycparser-3.0 python-dateutil-2.9.0.post0 requests-2.34.2 six-1.17.0 typing-extensions-4.16.0 tzdata-2026.2 urllib3-2.7.0 websockets-16.0
[2026-07-09 10:21:22 IST] [pip]
[2026-07-09 10:21:22 IST] [pip] [notice] A new release of pip is available: 24.0 β 26.1.2
[2026-07-09 10:21:22 IST] [pip] [notice] To update, run: pip install --upgrade pip
[2026-07-09 10:21:25 IST] ==================== SCRIPT OUTPUT START ====================
[2026-07-09 10:21:26 IST] Codebase Version 3.3.1
[2026-07-09 10:21:27 IST] System is fetching the latest instrument file from Dhan
[2026-07-09 10:21:28 IST] Instrument file retrieved successfully
[2026-07-09 10:21:28 IST] -----SUCCESSFULLY LOGGED INTO DHAN-----
[2026-07-09 10:21:29 IST] Trade DataFrame initialized.
[2026-07-09 10:21:29 IST] Signal DataFrame initialized.
[2026-07-09 10:21:29 IST] ================================================================================
[2026-07-09 10:21:29 IST] Starting PAPER TRADING engine (no real orders placed).
[2026-07-09 10:21:29 IST] Underlying=NIFTY Exchange=NSE Timeframe=1m ExpiryIdx=0 Lots/leg=1
[2026-07-09 10:21:29 IST] Entry ST=(10,3) Exit ST=(7,2) MaxLoss=5000 EODSquareoff=(15, 20)
[2026-07-09 10:21:29 IST] ================================================================================
[2026-07-09 10:21:41 IST] [10:21:41] Startup sync: entry ST is BULLISH β opening position.
[2026-07-09 10:21:41 IST] [10:21:41] Entry requested: BULLISH (startup sync)
[2026-07-09 10:22:16 IST] [10:22:16] BULLISH FLIP β buying 6 CE, selling 6 PE (paper)
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24050 CALL ( ATM) @ 143.35
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 24050 PUT ( ATM) @ 141.95
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24100 CALL ( ATM+1) @ 118.00
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 24000 PUT ( ATM-1) @ 120.05
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24150 CALL ( ATM+2) @ 96.35
[2026-07-09 10:22:25 IST] [10:22:25] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 23950 PUT ( ATM-2) @ 100.35
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24200 CALL ( ATM+3) @ 77.65
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 23900 PUT ( ATM-3) @ 84.20
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24250 CALL ( ATM+4) @ 62.40
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 23850 PUT ( ATM-4) @ 70.00
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] BUY 65 x NIFTY 14 JUL 24300 CALL ( ATM+5) @ 49.15
[2026-07-09 10:22:26 IST] [10:22:26] [PAPER OPEN] SELL 65 x NIFTY 14 JUL 23800 PUT ( ATM-5) @ 57.80
[2026-07-09 10:22:26 IST] [10:22:26] Pending BULLISH entry (startup sync) succeeded.
[2026-07-09 10:35:46 IST] [10:35:46] [RISK] Hard stop hit: unrealized -6467.50 <= -5000
[2026-07-09 10:35:46 IST] [10:35:46] EXIT ALL β hard stop loss (unrealized -6467.50)
[2026-07-09 10:35:47 IST] Exception at calling ltp as {βstatusβ: βfailureβ, βremarksβ: {βerror_codeβ: None, βerror_typeβ: None, βerror_messageβ: None}, βdataβ: ββ}
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24050 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24050 CALL ( ATM) entry=143.35 exit=143.35 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24050 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 24050 PUT ( ATM) entry=141.95 exit=141.95 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24100 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24100 CALL ( ATM+1) entry=118.00 exit=118.00 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24000 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 24000 PUT ( ATM-1) entry=120.05 exit=120.05 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24150 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24150 CALL ( ATM+2) entry=96.35 exit=96.35 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 23950 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 23950 PUT ( ATM-2) entry=100.35 exit=100.35 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24200 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24200 CALL ( ATM+3) entry=77.65 exit=77.65 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 23900 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 23900 PUT ( ATM-3) entry=84.20 exit=84.20 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24250 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24250 CALL ( ATM+4) entry=62.40 exit=62.40 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 23850 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 23850 PUT ( ATM-4) entry=70.00 exit=70.00 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 24300 CALL, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] BUY 65 x NIFTY 14 JUL 24300 CALL ( ATM+5) entry=49.15 exit=49.15 pnl=+0.00
[2026-07-09 10:35:47 IST] [WARN] No live LTP for NIFTY 14 JUL 23800 PUT, closing at entry price to avoid a bogus P&L.
[2026-07-09 10:35:47 IST] [10:35:47] [PAPER CLOSE] SELL 65 x NIFTY 14 JUL 23800 PUT ( ATM-5) entry=57.80 exit=57.80 pnl=+0.00
[2026-07-09 10:35:47 IST] β Batch P&L: +0.00 | Cumulative realized P&L: +0.00
or