Skip to content

Get Index List

The Get Index List APIs enable you to find all index name and sript code for getting index value.

POST: /api/indexList

https://connect.thefirstock.com/api/indexList

Request Details

Parameter Description
userId Logged in User Id
exchange Exchange
jKey Key Obtained on login success.

Code

from thefirstock import thefirstock

IL = thefirstock.firstock_IndexList(
exchange="NSE"
)
curl -X POST 'https://connect.thefirstock.com/api/indexList' \
    -H 'Content-Type: application/json' \
         -d '{
          "userId": "",
          "jKey": "",
           "exchange": "NSE"
         }'
const Firstock = require('thefirstock');

const firstock = new Firstock();

firstock.getIndexList({exchange: ""},(err, result)=>{
console.log("Error, ", err)
console.log("Result: ", result)
})
using thefirstock;

class Program
{
public static void Main()
{
    Firstock firstock = new Firstock();
    var result = firstock.getIndexList(exchange: "NSE");
}
}

Response Details

Parameter Description
stat Ok or Not_Ok
TopListNames success or failure indication.
values Array Of Basket, Criteria pair.
request_time It will be present only on successful response.
emsg This will be present only in case of errors.

Basket, Criteria pair Object

Parameter Description
idxname Index Name
token Index token used to subscribe

Sample Response

{
"request_time":"01:11:06 30-05-2022",
"values":
[
{"idxname":"HangSeng BeES-NAV","token":"26016"},
{"idxname":"India VIX","token":"26017"},
{"idxname":"Nifty 50","token":"26000"},
{"idxname":"Nifty IT","token":"26008"},
{"idxname":"Nifty Next 50","token":"26013"},
{"idxname":"Nifty Bank","token":"26009"},
{"idxname":"Nifty 500","token":"26004"},
{"idxname":"Nifty 100","token":"26012"},
{"idxname":"Nifty Midcap 50","token":"26014"},
{"idxname":"Nifty Realty","token":"26018"},
{"idxname":"Nifty Infra","token":"26019"},
{"idxname":"Nifty Energy","token":"26020"},
{"idxname":"Nifty FMCG","token":"26021"},
{"idxname":"Nifty MNC","token":"26022"},
{"idxname":"Nifty Pharma","token":"26023"},
{"idxname":"Nifty PSE","token":"26024"},
{"idxname":"Nifty PSU Bank","token":"26025"},
{"idxname":"Nifty Serv Sector","token":"26026"},
{"idxname":"Nifty Auto","token":"26029"},
{"idxname":"Nifty Metal","token":"26030"},
{"idxname":"Nifty Media","token":"26031"},
{"idxname":"Nifty 200","token":"26033"},
{"idxname":"Nifty Div Opps 50","token":"26034"},
{"idxname":"Nifty Commodities","token":"26035"},
{"idxname":"Nifty Consumption","token":"26036"},
{"idxname":"Nifty Fin Service","token":"26037"},
{"idxname":"Nifty50 Div Point","token":"26038"},
{"idxname":"Nifty100 Liq 15","token":"26040"},
{"idxname":"Nifty CPSE","token":"26041"},
{"idxname":"Nifty GrowSect 15","token":"26001"},
{"idxname":"Nifty50 PR 2x Lev","token":"26002"},
{"idxname":"Nifty50 PR 1x Inv","token":"26042"},
{"idxname":"Nifty50 TR 2x Lev","token":"26043"},
{"idxname":"Nifty50 TR 1x Inv","token":"26044"},
{"idxname":"Nifty50 Value 20","token":"26045"},
{"idxname":"Nifty Mid Liq 15","token":"26046"},
{"idxname":"Nifty Pvt Bank","token":"26047"},
{"idxname":"NIFTY100 Qualty30","token":"26048"},
{"idxname":"NIFTY MIDCAP 100","token":"26011"},
{"idxname":"NIFTY SMLCAP 100","token":"26032"},
]