Getting an error while getting an positions

<function get_positions at 0x000001E593CBA2A0>

Hi @shrivallabh,

As discussed, kindly help us with the API you are using and the entire message for the error you are facing so we can review this.

from dhanhq import dhanhq
import pandas as pd

Dhan api key and login id

client_id=“”
access_token=“”
dhan = dhanhq(“client_id”,“access_token”)

x = dhan.get_positions()

print(x)

Hello @shrivallabh

Can you help us with the entire error message so that it is possible for us to debug?
Also, looks like you are passing inside dhanhq function both client_id and access_token as strings, which should be variables that you have defined in the code above.

can you show corrected version

{‘status’: ‘failure’, ‘remarks’: {‘error_code’: ‘RS-9005’, ‘message’: ‘The token was expected to have 3 parts, but got 1.’}, ‘data’: ‘’}

Hey @shrivallabh

Make sure that when you are adding access token in python, you use

dhan = dhanhq(client_id,access_token)

And mention client_id = "1000000xxx"
along with access_token = "eYxxxxxxxx...."