Python Date parsing Error

why I am getting the error when trying to use python :-1:

dhan.historical_minute_charts(1594,dhan.NSE,‘EQUITY’,0, “2021-1-1”,“2021-12-31”)

{‘error_code’: ‘RS-9005’, ‘message’: 'JSON parse error: Cannot deserialize value of type java.time.LocalDate from String “2021-1-1”:

There is no date format is given in documentation:-

Historical Minute charts

dhan.historical_minute_charts(symbol,exchange_segment,instrument_type,expiry_code,from_date,to_date)

Thanks,
Sudesh

pd1 = dhan.intraday_daily_minute_charts(1594,dhan.NSE,‘EQUITY’) works but historical_minute_charts doesnt

@SudeshBhardwaj

I think the historical_minute_charts() takes symbol name as argument instead symbol code. The function is working for me and below is the screenshot of the code and output. Hope this helps.

2 Likes

Thank you Ravi, it worked

1 Like