Hello Upstox Team,
I’ve created a developer app named RathiScanner on 06/09/2025 using the regular app flow. My access token works successfully for historical data APIs (e.g., /v2/historical-candle), but fails when I attempt to authorize the WebSocket v3 feed. I receive the following error:
Code
401 Unauthorized
Error Code: UDAPI100050
Message: Invalid token used to access API
Could you please confirm whether WebSocket v3 access is enabled for my app, or guide me on how to configure the necessary scopes or permissions to use the live market data feed?
I’ve also attached two scripts for your reference:
Looking forward to your guidance.
Best regards, RathinaKumar
Hi @RAMAKRISHN_23292962, You’re using an expired token. Access tokens must be regenerated daily. The Historical API is an open endpoint, so it doesn’t require a token — that’s why it still works even if you pass an invalid one.
Please refer below section for access token expiration
Thanks
Hi Anand,
The script now runs perfectly with the current day token to fetch live data.
I have one more question.
Today (03-10), I ran the /historical-candle API to fetch the last 1-minute candle for NIFTY Futures (NSE_FO|52168). But it returned an empty response.
https://api.upstox.com/v2/historical-candle/NSE_FO|52168/1minute/{date}/{date}
Is it possible to get the latest finished 1-minute candle for the current trading day using the historical API? Or does it only return data after market close or with a delay?
Thanks
Rathina Kumar R
Hi @RAMAKRISHN_23292962, For the current trading day, please use the Intraday Candle Data V3, and for data up to the previous trading day, use the Historical Candle Data V3.
Thanks
Thank you so much Anand . I captured the live tick data of Nifty future from Market feed v3. Bid qty and sell qty are passive orders or active orders??…If they are passive orders mean how to get the executed order
Hi Anand_Sajankar,
Hi Anand,
Intraday 1‑min candles arriving ~2 minutes late — is this expected or an API issue?
Example: fetched_at=2025-10-15T10:26:03 newest_end_ts=2025-10-15T10:24:00+05:30
Thanks,
Rathina Kumar
Hello!
MR. RAMAKRISHN I’m also creating a developer app and i having a problem I’m not able to get market data i try everything and it won’t work can you please guide or tech me how you can or able to get data what should i do to get market data.
Hi Nitin,
I ran python script to get the intraday candles. Intraday API fetches past 2 min candle but not the live one.
Thanks
Hi @RAMAKRISHN_23292962 There is no issue with the Intraday API, you can fetch the data till last minute, We suggest utilising real-time WebSocket V3 to access the most recent candle
Thanks