Hi ,
i did take latest Session 8 file. but still getting error in placement of order.
KeyError: ‘orderId’
Traceback (most recent call last):
File “C:\Users\singhvi\Downloads\virender\Dhan\Setup\8. Session 8 Dhan_Tradehull_V2\Dhan_Tradehull_V2.py”, line 139, in order_placement
orderid = order[“data”][“orderId”]
KeyError: ‘orderId’
SBIN
SBIN is in downtrend, Sell this script
Session 8 latest files but error in order placement
KeyError: ‘orderId’
Traceback (most recent call last):
File “C:\Users\singhvi\Downloads\virender\Dhan\Setup\8. Session 8 Dhan_Tradehull_V2\Dhan_Tradehull_V2.py”, line 139, in order_placement
orderid = order[“data”][“orderId”]
KeyError: ‘orderId’
SBIN
SBIN is in downtrend, Sell this script
What is this Error:
step Value DF is not generated due to Error from NSE India site: invalid syntax (init .py, line 1187)
Hi @virender_singh
KeyError: ‘orderId’ This error is okey,
since now the market is closed, its not able to place order,
do try the same code on Monday, it would work fine
for reaching till session 8
Hi @Zee2Zahid
step value is the difference between the options strikes.
example, Nifty has a step value of 50, and banknifty has step value of 100
sometimes it gives error in fetching all the steps value for fno scripts, so that the error
we will be removing dependency on NSE for step value in upcoming Dhan_Tradehull_V3.
1 Like
babji3
December 6, 2024, 5:45pm
1436
How to fix rate limit sir?
WebSocket connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)
please provide solution
Hi
I am getting the below error while running class 6 code
Microsoft Windows [Version 10.0.19045.5131]
(c) Microsoft Corporation. All rights reserved.
C:\RAMESH\0Algo with Python Coding\6. Session6- 1st Live Algo\6. Session6- 1st Live Algo\1st live Algo>py “Dhan_codebase usage.py”
-----Logged into Dhan-----
reading existing file all_instrument 2024-12-07.csv
Got the instrument file
MOTHERSON
intraday_minute_data() missing 2 required positional arguments: ‘from_date’ and ‘to_date’
Traceback (most recent call last):
File “C:\RAMESH\0Algo with Python Coding\6. Session6- 1st Live Algo\6. Session6- 1st Live Algo\1st live Algo\Dhan_Tradehull.py”, line 253, in get_intraday_data
ohlc = self.Dhan.intraday_minute_data(str(security_id),exchangeSegment,instrument_type)
TypeError: intraday_minute_data() missing 2 required positional arguments: ‘from_date’ and ‘to_date’
Traceback (most recent call last):
File “Dhan_codebase usage.py”, line 28, in
chart[‘rsi’] = talib.RSI(chart[‘close’], timeperiod=14) #pandas
TypeError: ‘NoneType’ object is not subscriptable
Hello @Tradehull_Imran Sir
otm strike or itm strike ka error aa rha hai… please Help
Hi @SWARUP_NANDI
we get SSL issue while implementing WebSocket to get ltp,
however we have now upgraded to Dhan_Tradehull_V2 which fixes this issue
see : Learn Algo Trading with Python | Codes | Youtube Series - #952 by Tradehull_Imran
Hi @vinay_kumaar
use this code
ce_strike, pe_strike, strike = tsl.ATM_Strike_Selection(Underlying ='NIFTY',Expiry ='12-12-2024')
ce_strike, pe_strike, ce_OTM_price, pe_OTM_price = tsl.OTM_Strike_Selection(Underlying ='NIFTY',Expiry ='12-12-2024',OTM_count=5)
ce_strike, pe_strike, ce_ITM_price, pe_ITM_price = tsl.ITM_Strike_Selection(Underlying = 'NIFTY',Expiry = '12-12-2024',ITM_count=1)
Hi, @Tradehull_Imran , sir…
In next live session please cover this topic, sir…
How to manage multiple open position and tp/sl orders with trade_info dictionary
And in Dhan_Tradehull_V3 , please add function for get_position
1 Like
can we fetch intraday data from api of within specific time period on the data, i don’t to give unnecessory load on API and on my system, this is for purpose to get increment data only beween time period in minutes not in dates.
example :
from_date = “2024-12-06 09:30:00”
today_date = “2024-12-06 09:45:00”
Very good evening sir,
I would like to understand the purpose of using ‘f’ in the following code line sir?
print(f"for {script_name} the ltp is {ltp}")
VBR Prasad
@Tradehull_Imran Sir, Have u checked it
Hi @Vinod_Kumar1
If we call only specific data in historical api, that will be still counted as 1 API call.
The load remains same
Also , if the strategy includes indicator then trimmed data will not give correct indicator values.
let me know a specific use can, so we can explore more on this.