How to fetch Day low and day high for any index like nifty 50, sensex

I am using node.js to fetch day low day high using ‘v2/market-quote/ohlc’, I even tried ‘ltp’ api

Hi @SHUBHAM_3315357
You’ve selected the correct API to retrieve the day’s low and high. To do this, please pass 1d as a query parameter. You can refer to the example code here: OHLC Quotes | Upstox Developer API.

I recommend using the V3 market quote OHLC API: OHLC Quotes V3 | Upstox Developer API. It has additional live and previous candles for 1 minute and 30 minute time frames

Thanks!

Hi Ketan,

The status for my request is success, however the data remains empty. I replaced instrument key with Parle instrument key and data was returned just fine, I am facing issue in NSE Nifty 50 index,

Below are the details I have used to look up Nifty 50 index please let me know if I am wrong:
{
segment: ‘NSE_INDEX’,
name: ‘Nifty 50’,
exchange: ‘NSE’,
instrument_type: ‘INDEX’,
instrument_key: ‘NSE_INDEX|Nifty 50’,
exchange_token: ‘26000’,
trading_symbol: ‘NIFTY’
}

Thanks,
Shubham

Please use this as the query parameter, and ensure the interval is set to 1d. If you’re still experiencing issues, please share the curl request so we can investigate what might be going wrong. Thanks!

Thanks Ketan, I have replaced the instrument_key and it works fine now. My mistake was NIFTY 50 was in all caps.

1 Like