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: /apiV2/indexList

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

Request Details

Parameter Description
userId User Id of the login user
exchange Exchange
jKey Key Obtained on login success.

Code

curl -X POST 'https://connect.thefirstock.com/apiV2/indexList' \
    -H 'Content-Type: application/json' \
         -d '{
          "userId": "",
          "jKey": "",
          "exchange": ""
         }'
from thefirstock import thefirstock

getIndexList = thefirstock.firstock_getIndexList(
    exchange=""
)
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");
}
}

Success Response Details

Parameter Description
Status Success
values Array Of Basket, Criteria pair.
data.requestTime It will be present only on successful response.

Basket, Criteria pair Object

Parameter Description
value.idxname Index Name
value.token Index token used to subscribe

Sample Response

{
"Status": "Success",
"data": {
    "requestTime": "",
    "values": [
        {
            "idxname": "",
            "token": ""
        },
        {
            "idxname": "",
            "token": ""
        },
        {
            "idxname": "",
            "token": ""
        }
      ]
    }
}
{
  "Status": "Failed",
  "data": "Session Expired :  Invalid Session Key"
}