



Hi @Dev28 ,
Instead of generating and updating the access token every day, you can use this PIN + TOTP login method. It automatically generates a fresh access token, so you don’t need to update it daily. Check the Client ID, PIN, and TOTP secret carefully, and make sure there are no leading or trailing spaces.
from Dhan_Tradehull import Tradehull
client_code = "123456578"
pin = "258536"
totp_secret = "CK32EV76JP3RZQZPFSGPIGXYFXOHBKHD"
tsl = Tradehull(ClientCode=client_code,mode="pin_totp",pin=pin,totp_secret=totp_secret)