hi @rahulcse56
Do double check if below details are okey and run it again
also let me know if it works for you after making changes
hi @rahulcse56
Do double check if below details are okey and run it again
also let me know if it works for you after making changes
in “Dhan_codebase usage.py”, line 33
ce_name, pe_name, strike = tsl.ATM_Strike_Selection('NIFTY','05-09-2024')
‘05-09-2024’ is a expired date for Nifty contract.
you need to place next expiries date here
@Tradehull_Imran Sir, Once you will free, please review this one
-----Logged into Dhan-----
reading existing file all_instrument 2024-10-16.csv
Got the instrument file
available_balance 686.15
Traceback (most recent call last):
File "c:\Users\Subhajit Panja\Documents\Algorithim_HQ\Dhan codebase\Dhan_Tradehull.py", line 132, in order_placement
security_id = self.instrument_df[((self.instrument_df['SEM_TRADING_SYMBOL']==tradingsymbol)|(self.instrument_df['SEM_CUSTOM_SYMBOL']==tradingsymbol))&(self.instrument_df['SEM_EXM_EXCH_ID']==instrument_exchange[exchange])].iloc[-1]['SEM_SMST_SECURITY_ID']
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1103, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1656, in _getitem_axis
self._validate_integer(key, axis)
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1589, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
Traceback (most recent call last):
File "c:\Users\Subhajit Panja\Documents\Algorithim_HQ\Dhan codebase\Dhan_Tradehull.py", line 132, in order_placement
security_id = self.instrument_df[((self.instrument_df['SEM_TRADING_SYMBOL']==tradingsymbol)|(self.instrument_df['SEM_CUSTOM_SYMBOL']==tradingsymbol))&(self.instrument_df['SEM_EXM_EXCH_ID']==instrument_exchange[exchange])].iloc[-1]['SEM_SMST_SECURITY_ID']
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1103, in __getitem__
return self._getitem_axis(maybe_callable, axis=axis)
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1656, in _getitem_axis
self._validate_integer(key, axis)
File "C:\Users\Subhajit Panja\AppData\Local\Programs\Python\Python38\lib\site-packages\pandas\core\indexing.py", line 1589, in _validate_integer
raise IndexError("single positional indexer is out-of-bounds")
IndexError: single positional indexer is out-of-bounds
It is triggering the order but still some error is showing to output
@Tradehull_Imran Sir
I have changed 05-09-2024 to17-10-2024
dear rahul sir
episode 4 codes link given in youtube description is not working pls look in to this
Now I got that issue is fixed
Thank you so much sir for your effort take my respect
@Tradehull_Imran Sir
HI @Tradehull_Imran, I am using windows
I have tried the attached file, but I am still facing the same issue. I am not sure I have tried many things by searching on Google but have had no luck.
Getting below error :
Reading existing file all_instrument 2024-10-16.csv
Watchlist changed. Reconnecting the feed…
Disconnected from WebSocket feed.
Thanks for your help and quick response.
@Tradehull_Imran
Output : Error
hi @ddeogharkar
Do send me complete zip of your folder, and share on the google drive link
share it with: tradehull_mentorship@tradehull.com
Do send me complete zip of your folder, and share on the google drive link
share it with: tradehull_mentorship@tradehull.com
Hi @Abhishek_Konda
No module named dhanhq, this means the installation was not completed
do visit Session 2 for installation
https://www.youtube.com/watch?v=YAyIoDJYorA
and download installation files from here
okay will try again.
hi @Mukesh_Upadhyay
It seems that you have subscribed to Dhan Trading api only,
you also need to subscribe to Dhan Data Api
for data api check this video at timestamp: 2:03
hi @ddeogharkar
SENSEX | BSE_IDX |
---|---|
BANKEX | BSE_IDX |
NIFTY | NSE_IDX |
BANKNIFTY | NSE_IDX |
FINNIFTY | NSE_IDX |
MIDCPNIFTY | NSE_IDX |
run it again and send me complete error screenshot. and the screenshot of the excel
also make sure while adding script in watchlist, dont keep a whitespace at the end of script name or exchange name
@Tradehull_Imran - The below error is poping out in loop when I run dhan websocket code.
after step 1 run and see if you still get error, If The error says SSL follow below steps
sir one request dont keep code files on google drive if possible keep it on git hub so in office environment we can download it because google drive is block in many organisation
Hi @Tradehull_Imran , today i tried adding ~300 symbols to the websocket excel file. I observed the data faced significant lag. Also the connection was disconnecting often (almost at every minute end) and reconnecting. Is it normal?
What is the limiting factor ?- computing power// the code/ dhan websocket