Hey @Sravanthi_bh , you referred me to a thread regarding token expiration. From what I understood, the token is supposed to remain valid throughout the day. However, since I’m generating it during market hours, it keeps expiring again and again.
An access token is valid for one whole day. Unless you log out and don't request for access token in every run. Once you have generated access_token, store it in a variable and keep using it for other API calls throughout(until performing logout or fresh login).