sir geeting this error on calling historical data
Hello Sir,
After running “Dhan_websocket.py”, I am getting this error. I have updated my client id and token id in codes. Please help me to solve this.
How can I use this code for getting option strikes of Crudeoil MCX here:
ce_name, pe_name, strike = tsl.ATM_Strike_Selection(‘NIFTY’, ‘31-10-2024’)
I tried many variables LIKE THIS but was not successful
ce_name, pe_name, strike = tsl.ATM_Strike_Selection(‘CRUDEOIL’, ‘15-11-2024’)
ce_name, pe_name, strike = tsl.ATM_Strike_Selection(‘CRUDEOIL’, ‘CRUDEOIL NOV 15’)
Please @Tradehull_Imran give codes for Crudeoil MCX options
Disconnected from WebSocket feed.
WebSocket connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
Sir Error coming pls help
Hi @Faham_Ali
Do check the link and follow each step … and run file again
do let me know if it works after the changes
Hi everyone,
please remove your api_key while sharing code on community or to tradehull_mentorship@tradehull.com
Hi @Zee2Zahid
MCX options is not supported in Dhan_Tradehull codebase as of now, will add this request in upcoming release.
chatgpt says that this line is not correct
].iloc[-1][‘SEM_SMST_SECURITY_ID’]
thats why im not able to proceed further in session 3
and so data frame in empty in our case says single positional indexer is out-of-bounds for SENSEX 06 SEP 78500 PUT
kindly help
@Tradehull_Imran Sir Activate Dhan Api & Dhan Data but & Update Dhan Websocket but showing this eror
Disconnected from WebSocket feed.
WebSocket connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
Hi @jain79
SENSEX 06 SEP 78500 PUT
is a expired contract. do remove these and try again
Do check the link and follow each step … and run file again
do let me know if it works after it
Hi @Dinesh_Sharma @ddeogharkar @Abhishek_Konda @ShantiPar66
In case of SSL: CERTIFICATE_VERIFY_FAILED Use below methods one by one,
after completing each method try to run the code again to check if SSL issue is still there, if it is… then goto next step
SSL issue is mostly created when we use office laptop or vpn
-
Install CERTIFI
Press Windows + R.
Type cmd and hit Enter. This opens the Command Prompt.
In the Command Prompt window, type the following command
pip install certifi --upgrade
and press Enter, (this will update cerifi package) -
Disable SSL check
I am giving you a new file Dhan_websocket SSL_issue_fixed.py
instead of running Dhan_websocket.py, now run Dhan_websocket SSL_issue_fixed.py
Dhan_websocket SSL_issue_fixed.py - Google Drive -
Update Certificates
Press Win + S to open the search bar.
Type PowerShell.
Right-click on Windows PowerShell from the search results.
Select Run as administrator.
If prompted by User Account Control (UAC), click Yes.Now run following two commands one by one:
certutil -generateSSTFromWU roots.sst
certutil -addstore -f root roots.sstThanks @ABCDIt for PowerShell solution
-
Change Laptop and Network
Most probably the issue is fixed by now, but if we still we find SSL issue, maybe a quicker method would be toa) run the code on your home laptop and your home internet
b) install files on AWS free 2GB server and test the same. There we would have a Free + Dedicated + Secure + Enough Bandwidth environment, and the files would run normally there.
Thank you sir @Tradehull_Imran n thanks to @Zee2Zahid for asking this valuable question
Hi @ashish_jain
-
Send me error and code screenshot also
-
Did you make any changes to Dhan_Tradehull.py
-
You seems to be running Dhan_codebase usage -copy.py.
try running it on Dhan_codebase usage.py and see if any difference -
previous_hist_data = tsl.get_historical_data(‘ACC’,‘NSE’,12) was hit inside pdb
try running the same command without pdb -
Let me know if you have subscription to Data api
Try above solutions one by one. and also let me know if it is solved
Its working fine now… LTP sheet is updating in Live market only… Thanks for the reply…
@Tradehull_Imran Sir problem is resolve thank you
Hi Sir, Can anyone help me install Algo Trading (AnyDesk Platform) with Python Episode 2 - as per instructions by Ali sir. I am a senior citizen. I have downloaded but got heldup with cmd command. Please help me to resolve the issue. VBR Prasad - 9949324446
Sir, I could not find the code in this window for Episode 3
Sir, I could not trace out the full code of Episode 3 here anywhere. Please guide me.
Session 3 :3. Session3 - Codebase.zip - Google Drive
Session 4: 4. Session4- Python Part 1.zip - Google Drive
Hi @Tradehull_Imran ,
Thanks a lot.
I can crack it by using the below solution
Update Certificates
Press Win + S to open the search bar.
Type PowerShell.
Right-click on Windows PowerShell from the search results.
Select Run as administrator.
If prompted by User Account Control (UAC), click Yes.
Now run following two commands one by one:
certutil -generateSSTFromWU roots.sst
certutil -addstore -f root roots.sst
and I have used the attached updated websocket file
Thanks,
Devendra