I am getting this error I tried trouble shooting many different ways but not able to get any solution please help me:
from dhanhq import dhanhq
client_id = “hidden”
access_token = “hidden”
dhan = dhanhq(client_id,access_token)
def get_holdings(dhan):
data = dhan.get_holdings()
print(data)
get_holdings(dhan)
I am getting this error, but there is no extra indentation, also in code I have not written Dhan.getholdings() still it is showing this error
KeyboardInterrupt
get_holdings(dhan)
Traceback (most recent call last):
File “”, line 1, in
get_holdings(dhan)
~~~~~~~~~~~~^^^^^^
File “”, line 2, in get_holdings
data = dhan.getholdings()
^^^^^^^^^^^^^^^^
AttributeError: ‘dhanhq’ object has no attribute ‘getholdings’. Did you mean: ‘get_holdings’?