Intraday history API giving next candle data after 6-10 seconds

https://api-v2.upstox.com/historical-candle/intraday

what is the timedelta for getting next candle data through this API ?

We suggest utilizing real-time WebSocket to access the most recent two candles in the intraday timeframe. Specifically, for 1-minute- and 30-minute intervals, we provide two candles, including the current and previous ones.

Regarding the delay in the cache response, we have implemented caching for the intraday REST API to improve performance. We are examining the possibility of optimizing the current Time To Live (TTL) for the cache.

Can you give me refrence how to get 1 minute candle through webscoket

Older version API was returning historical data with in 2 seconds

You can locate the reference code for the full mode, which analyzes the current LTP (Last Traded Price) with the previous two candles for both 1-minute and 30-minute timeframes, in the following GitHub repository:

GitHub Repository: upstox/upstox-python

For further information and documentation, please refer to the following link:

Documentation: Upstox API Documentation - WebSocket Implementation / Market Data Stream

Websocket also not seems reliable it’s throwing error

Error during DataFrame creation: received 1001 (going away) CloudFlare WebSocket proxy restarting; then sent 1001 (going away) CloudFlare WebSocket proxy restarting

When we can expect the live candle data for our use . . Plz update

Requesting a healthy common voice for the sake of algo trader. Give us a facility where we can call api for continuously candle data in which their will be historical data till 3:30pm yesterday and below that today intraday data will be their starting from 9:15 and the last candle data will be from websocket. is it possible can anyone from technical engeering background confirm me.

Hi @ABHISHEK_2564441 @RAMESH_36584097,

Please find the documentation links below for your reference:

These should help you get started with both historical/intraday data and real-time market feeds. Let us know if you have any further questions.

Thanks

Thankyou Mr Anand, i will share by monday or before the critical issue i am facing while doing it so.

(.venv) F:\UPSTOX ALGO\upstox_instrument_query>py “BNF ATM EXPIRED CONTRACT.py”
Found 12 past monthly expiries:

— Processing Expiry: 2024-01-25 —
Bank Nifty closing price on 2024-01-25: 44866.15
Http Error for https://api.upstox.com/v2/expired-instruments/option/contract: 401 Client Error: Unauthorized for url: https://api.upstox.com/v2/expired-instruments/option/contract?instrument_key=NSE_INDEX|Nifty+Bank&expiry_date=2024-01-25
Response content: {“status”:“error”,“errors”:[{“errorCode”:“UDAPI1149”,“message”:“This API is available exclusively with an Upstox Plus plan subscription. Please upgrade to the Plus plan to gain access.”,“propertyPath”:null,“invalidValue”:null,“error_code”:“UDAPI1149”,“property_path”:null,“invalid_value”:null}]}
No expired option contracts found for Bank Nifty for expiry 2024-01-25. Skipping.. does this mean expired contract are chargeable