---
title: "Rank indices by return"
description: "Rank indices by return. Rank ~140 NSE indices by return over completed weeks or months using official closing levels. Use `category=sectoral` for sector rankings."
canonical: "https://developers.tapetide.com/api/operations/getindexperformance/"
---

# Rank indices by return

GET

/v1/indices

```js
const url = 'https://api.tapetide.com/v1/indices?granularity=week&names=Nifty%20IT%2CNifty%20Bank&order=gainers';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request GET \
  --url 'https://api.tapetide.com/v1/indices?granularity=week&names=Nifty%20IT%2CNifty%20Bank&order=gainers' \
  --header 'Authorization: Bearer <token>'
```

Rank ~140 NSE indices by return over completed weeks or months using official closing levels. Use `category=sectoral` for sector rankings.

## Authorizations

-   **[bearer](/api/#bearer)**

## Parameters

### Query Parameters

**periods**

integer

\>= 1 <= 12

Completed periods to measure (default 3).

**granularity**

string

Allowed values: week month

Period length (default week).

**category**

string

Index family: sectoral, broad, thematic, strategy, …

**names**

Comma-separated list.

string

Explicit index names, comma-separated. Overrides category.

#### Example

```plaintext
Nifty IT,Nifty Bank
```

**limit**

integer

\>= 1 <= 50

Indices to return after ranking (default 10).

**order**

string

Allowed values: gainers losers

Sort direction (default gainers).

## Responses

### 200

OK. Costs one request unit.

Media typeapplication/json

object

**data**

required

The document. Shape is route-specific and never truncated.

**meta**

required

Paging and window information where the route pages (e.g. `window.next_cursor` on price history).

object

**as\_of**

When this response was assembled (UTC).

string format: date-time

**route**

The operationId that served it.

string

**_key_**

additional properties

any

#### Example generated

```json
{
  "data": "example",
  "meta": {
    "as_of": "2026-04-15T12:00:00Z",
    "route": "example"
  }
}
```

#### Headers

**X-RateLimit-Reset**

integer

Unix seconds when the binding quota window resets (IST boundaries).

### 400

Malformed or out-of-range parameter. Not charged.

Media typeapplication/json

object

**error**

required

object

**code**

required

string

Allowed values: authentication\_required invalid\_token invalid\_request route\_not\_found not\_found method\_not\_allowed rate\_limited quota\_exhausted upstream\_unavailable service\_unavailable tool\_error internal\_error

**message**

required

string

**details**

object

**_key_**

additional properties

any

#### Example

```json
{
  "error": {
    "code": "authentication_required"
  }
}
```

### 401

Missing or invalid bearer token.

Media typeapplication/json

object

**error**

required

object

**code**

required

string

Allowed values: authentication\_required invalid\_token invalid\_request route\_not\_found not\_found method\_not\_allowed rate\_limited quota\_exhausted upstream\_unavailable service\_unavailable tool\_error internal\_error

**message**

required

string

**details**

object

**_key_**

additional properties

any

#### Example

```json
{
  "error": {
    "code": "authentication_required"
  }
}
```

### 404

The symbol, index or document does not exist. Not charged.

Media typeapplication/json

object

**error**

required

object

**code**

required

string

Allowed values: authentication\_required invalid\_token invalid\_request route\_not\_found not\_found method\_not\_allowed rate\_limited quota\_exhausted upstream\_unavailable service\_unavailable tool\_error internal\_error

**message**

required

string

**details**

object

**_key_**

additional properties

any

#### Example

```json
{
  "error": {
    "code": "authentication_required"
  }
}
```

### 429

Per-minute burst cap or plan quota reached.

Media typeapplication/json

object

**error**

required

object

**code**

required

string

Allowed values: authentication\_required invalid\_token invalid\_request route\_not\_found not\_found method\_not\_allowed rate\_limited quota\_exhausted upstream\_unavailable service\_unavailable tool\_error internal\_error

**message**

required

string

**details**

object

**_key_**

additional properties

any

#### Example

```json
{
  "error": {
    "code": "authentication_required"
  }
}
```

#### Headers

**Retry-After**

integer

**X-RateLimit-Reset**

integer

Unix seconds when the binding quota window resets (IST boundaries).

### 502

A data dependency was unavailable. Not charged.

Media typeapplication/json

object

**error**

required

object

**code**

required

string

Allowed values: authentication\_required invalid\_token invalid\_request route\_not\_found not\_found method\_not\_allowed rate\_limited quota\_exhausted upstream\_unavailable service\_unavailable tool\_error internal\_error

**message**

required

string

**details**

object

**_key_**

additional properties

any

#### Example

```json
{
  "error": {
    "code": "authentication_required"
  }
}
```
