Instruments csv depreciation : field last_price is not present in the json

Hi Team

I have come across the below announcement for the depreciation Notice for the CSV instruments file.

I’ve tried to port my implementation to the JSON equivalent and try to download the json from the stated url : https://assets.upstox.com/market-quote/instruments/exchange/complete.json.gz

However, while working on the json, I sense that the attribute last_price is not present. This breaks my existing design for the scanner, wherein I use the fileld last_price for filter criteria.

Kindly note that this attribute last_price is also NOT present in the list of MIS Instruments (https://assets.upstox.com/market-quote/instruments/exchange/NSE_MIS.json.gz) where at least this adds a great value.

{
“segment”: “NSE_EQ”,
“name”: “JOCIL LIMITED”,
“exchange”: “NSE”,
“isin”: “INE839G01010”,
“instrument_type”: “EQ”,
“instrument_key”: “NSE_EQ|INE839G01010”,
“lot_size”: 1,
“freeze_quantity”: 100000.0,
“exchange_token”: “16927”,
“tick_size”: 5.0,
“trading_symbol”: “JOCIL”,
“short_name”: “JOCIL”,
“security_type”: “NORMAL”
}

Excerpts from the .csv file (which is getting deprecated)

I request the team to kindly revisit this, and at least consider including the attribute last_price for the https://assets.upstox.com/market-quote/instruments/exchange/NSE_MIS.json.gz

Hi @Ushnota , I request if you may take it up with the respective team. I understand this depreciation and then moving to json is being considered on all the aspects, but here I see a field dropped out in the new json response..meaning that I need to look for different method all together to query LTP of 2000+ equities listed in NSE/BSE, while this information was already existing when we pulled this information from the CSV. Moving to JSON would mean additional new implementation and additional calls to get the LTP for all indices now.

It would be great if this field last_price is retained as an attribute in the json response.

Thanks in Advance

Hi Team

I will appreciate an update on this topic, please.

While it is okay to deprecate a feature/function, but that also calls for providing the newer alternatives and also ensuring for backward compatibility, but here this migration would be breaking my entire existing Scanner application.

I request the team to kindly revisit this, and at least consider including the attribute last_price for the https://assets.upstox.com/market-quote/instruments/exchange/NSE_MIS.json.gz

Awaiting for a response

-Nitish

Hi @NITISH_21951215,

Yes, you should use the LTP Quote API to fetch the latest last_price. The instrument CSV/JSON files are refreshed daily around 6 AM, so the last_price in those files always reflects the previous day’s closing LTP.

If you download the file during market hours, the last_price will not be accurate. This is why you must rely on the LTP Quote API to get the real-time last_price. You can also retrieve LTP quotes for multiple instrument keys in a single request.

Hope this clarifies your doubt.

Thanks

Hi @Anand_Sajankar

Thanks for looking into it.

Kindly note the concern that I stated here is about the JSON data does not have last_price at all, while the CSV dump (which would deprecate in the coming time) already had this data. (So that certainly breaks the standards when a software functionality is deprecated)

I went through the JSON feed, and understand that the obvious reasons for not taking along this attribute of last_price attribute could be the fact that there are many non-index based entities in the entire JSON/CSV dump, and may be that’s another reasons for separating out separate links each for mis-instruments (NSE and BSE stated at Instruments | Upstox Developer API ) while other all Instruments file are kept separately as mentioned here : Instruments | Upstox Developer API

(My scanner specific use-case was not around fetching the LTP during market-hours, and that was the reason I had raised this concern.)

However, I have explored on the LTP Quotes V3 | Upstox Developer API , and I am able to fetch the quotes for 500 instruments in 1 call. (Kindly confirm if that is correct, as accordingly I would tweak the batch size for subsequent calls).

I will adapt to these changes on my side in my application, but for the note I request to kindly have that mentioned in the Deprecation Announcement here : CSV Instruments File Deprecation Notice | Upstox Developer API

Thanks for looking into this.

Thanks @Ushnota

2 Likes