# Niftyindices — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Niftyindices provides 7 callable API endpoints through the Parse marketplace.

**Category:** Finance & Markets | **Website:** [niftyindices.com/](https://niftyindices.com/) | **Docs:** [parse.bot/marketplace/cc31af5a-888a-4ecd-b4eb-825a31f9f414/niftyindices-com-api](https://parse.bot/marketplace/cc31af5a-888a-4ecd-b4eb-825a31f9f414/niftyindices-com-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_index_constituents

Retrieve the list of constituent stocks for a given index, including stock ticker name, percentage weight, sector classification, and effective date. Returns all constituents in a single response.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `index_name` | string | No | Index name as listed in get_indices_list (e.g., NIFTY 50, NIFTY NEXT 50, NIFTY BANK). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_index_constituents \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"index_name":"<string>"}'
```

### get_index_historical_data

Retrieve historical OHLC (Open, High, Low, Close) price data for a specific index over a user-specified date range. Returns daily records with turnover and volume where available. Date range must not exceed roughly 1 year per request. Weekend/holiday dates are skipped in results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | Yes | End date in DD-Mon-YYYY format (e.g., 10-Jun-2026). |
| `index_name` | string | No | Index name as listed in get_indices_list (e.g., NIFTY 50, NIFTY NEXT 50, NIFTY BANK). |
| `start_date` | string | Yes | Start date in DD-Mon-YYYY format (e.g., 01-Jun-2026). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_index_historical_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","index_name":"<string>","start_date":"<string>"}'
```

### get_index_movers

Retrieve the top 10 gaining and top 10 losing indices for the current trading day, sorted by percentage change. Gainers are sorted descending; losers ascending. Data is derived from the live indices feed.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_index_movers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_indices_list

List all available equity indices, returning the trading name and long descriptive name for each index. Useful for discovering valid index_name values to pass to other endpoints. No pagination — the full catalogue is returned.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_indices_list \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_live_indices

Retrieve live/real-time index values for all available equity indices. Returns current price, change, percentage change, year high/low, and timestamp for every tracked index. No pagination — the full list is returned in one response. Data reflects the most recent trading session close or intraday snapshot.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_live_indices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_sectoral_distribution

Fetch the sector-wise weight distribution for a specific index. Returns each sector name and its percentage weight in the index. All sectors sum to approximately 100%.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `index_name` | string | No | Index name as listed in get_indices_list (e.g., NIFTY 50, NIFTY NEXT 50, NIFTY BANK). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_sectoral_distribution \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"index_name":"<string>"}'
```

### get_total_return_index_data

Retrieve Total Return Index (TRI) values for a specific equity index over a user-defined date range. TRI reflects index performance including dividends reinvested. Returns daily records with TotalReturnsIndex and Net Total Return (NTR) values. Date range must not exceed roughly 1 year per request.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | Yes | End date in DD-Mon-YYYY format (e.g., 10-Jun-2026). |
| `index_name` | string | No | Index name as listed in get_indices_list (e.g., NIFTY 50, NIFTY NEXT 50, NIFTY BANK). |
| `start_date` | string | Yes | Start date in DD-Mon-YYYY format (e.g., 01-Jun-2026). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-niftyindices-com-api-cc31af5a/get_total_return_index_data \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","index_name":"<string>","start_date":"<string>"}'
```
