Torus Digital Open API
  • Introduction
  • Get Started
  • Authentication
    • Login
    • Session Token
  • SDK
    • Self Generated SDK'S
  • Orders
    • Order Entry
    • Order Modify
    • Order Cancel
    • Order Convert To delivery
    • Order Margin
    • Order Book
    • Order Details
  • Holdings and Portfolio
    • Portfolio
    • Holding
    • Holding Details
    • Net Positions
  • Market
    • Market Status
  • Trade
    • Trade Book
    • Trade Details
  • Funds
    • Fund limits
    • Fund limits details
  • Historical Data
    • Search Stock
    • Company Basic Detail
    • Indices List
    • Monthly/Yearly Returns
    • Share Holding Pattern
    • Balance Sheet
    • Cash Flow
    • Profit and Loss
Powered by GitBook
On this page
  1. Historical Data

Indices List

The API retrieves index data for major stock indices such as NIFTY, BANKNIFTY, FINNIFTY, SENSEX, and BANKEX. It provides key information about these indices, including their current values, percentage changes, and other relevant market data.

Endpoint

https://connects.torusdigital.com/api/v1/indices

Request

cURL
curl -X 'GET' \
  'https://connects.torusdigital.com/api/v1/indices' \
  -H 'accept: application/json'
Java-Unirest
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://connects.torusdigital.com/api/v1/indices")
  .header("Content-Type", "application/json")
  .asString();
Go-Native
package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"strings"
)

func main() {
	url := "https://connects.torusdigital.com/api/v1/indices"
	method := "GET"

	client := &http.Client{}
	req, err := http.NewRequest(method, url, nil)

	if err != nil {
		fmt.Println(err)
		return
	}
	req.Header.Add("Content-Type", "application/json")

	res, err := client.Do(req)
	if err != nil {
		fmt.Println(err)
		return
	}
	defer res.Body.Close()

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		fmt.Println(err)
		return
	}
	fmt.Println(string(body))
}
JavaScript-jQuery
var settings = {
  "url": "https://connects.torusdigital.com/api/v1/indices",
  "method": "GET",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json"
  },
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

Response

[
  {
    "code": 20559,
    "exchange": "NSE",
    "name": "Nifty50",
    "price": 25383.75,
    "priceChange": 27.25,
    "changePercent": 0.10746751326089958
  },
  {
    "code": 26753,
    "exchange": "NSE",
    "name": "BankNifty",
    "price": 52153.15,
    "priceChange": 215.09999999999854,
    "changePercent": 0.41414723887400184
  },
  {
    "code": 41384,
    "exchange": "NSE",
    "name": "FINNifty",
    "price": 23989.85,
    "priceChange": 10.299999999999272,
    "changePercent": 0.0429532664291001
  },
  {
    "code": 20558,
    "exchange": "BSE",
    "name": "Sensex",
    "price": 82988.78,
    "priceChange": 97.83999999999651,
    "changePercent": 0.11803461270917727
  },
  {
    "code": 23998,
    "exchange": "BSE",
    "name": "BANKEX",
    "price": 58908.78,
    "priceChange": 179.22999999999593,
    "changePercent": 0.30471384399961077
  }
]

Response Parameter

Parameter
Description

code

Unique identifier for the index.

exchange

The stock exchange where the index is listed (e.g., "NSE", "BSE").

name

The name of the index (e.g., "Nifty50", "BankNifty").

price

The current value or price of the index.

priceChange

The absolute change in the index value compared to the previous close.

changePercent

The percentage change in the index value compared to the previous close.

PreviousCompany Basic DetailNextMonthly/Yearly Returns

Last updated 8 months ago