# Nepalstock (Nepal) — 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.

> Access real-time stock prices, market indices, and trading data from Nepal's stock exchange (NEPSE). Retrieve live price updates, market summaries, top performers, and detailed information on listed securities.

**Category:** Finance & Markets | **Website:** [nepalstock.com.np/](https://nepalstock.com.np/) | **Docs:** [parse.bot/marketplace/25cf98b0-d85e-484b-8c9b-a3f335e71768/nepalstock-com-np-api](https://parse.bot/marketplace/25cf98b0-d85e-484b-8c9b-a3f335e71768/nepalstock-com-np-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-nepalstock-com-np-api-25cf98b0/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_index_history

Get historical daily OHLC data for a specific index. Returns paginated results (20 per page) sorted by most recent date first. Includes turnover, volume, and transaction data for each trading day.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `index_id` | string | No | Index ID: 58 for NEPSE Index, 57 for Sensitive Index, 62 for Float Index, 63 for Sensitive Float Index |
| `page` | integer | No | Zero-based page number for pagination |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_index_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"index_id":"<string>","page":"<integer>"}'
```

### get_market_summary

Get a summary of the current market state including total turnover, traded shares, transactions, scrips traded, and market capitalization. Returns a list of key-value metric pairs.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_market_summary \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_nepse_index

Get current values and changes for various NEPSE indices including NEPSE Index, Sensitive Index, Float Index, and Sensitive Float Index. Returns all four indices with their current value, day range, 52-week range, and percentage change.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_nepse_index \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_stock_detail

Get detailed information for a specific stock including OHLC data, 52-week high/low, sector, and trade statistics. Accepts either a stock symbol (e.g. ADBL, NABIL) or a numeric security ID (e.g. 397). The symbol is resolved to an ID internally.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `symbol_or_id` | string | Yes | Stock symbol (e.g. ADBL, NABIL) or numeric security ID (e.g. 397, 131) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_stock_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"symbol_or_id":"<string>"}'
```

### get_stock_history

Get historical daily trade data for a specific stock. Returns paginated results (20 per page) sorted by most recent date first. Accepts a stock symbol or numeric security ID and an optional date range. When start_date and end_date are omitted, defaults to the last 365 days from today.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | No | End date for the history range in ISO format YYYY-MM-DD (e.g. 2026-08-01). Defaults to today if omitted. |
| `page` | integer | No | Zero-based page number for pagination. |
| `start_date` | string | No | Start date for the history range in ISO format YYYY-MM-DD (e.g. 2026-01-01). Defaults to 365 days before today if omitted. |
| `symbol_or_id` | string | Yes | Stock symbol (e.g. ADBL, NABIL) or numeric security ID (e.g. 397). Symbol is resolved to ID internally. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_stock_history \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","page":"<integer>","start_date":"<string>","symbol_or_id":"<string>"}'
```

### get_today_prices

Get today's price data for all securities traded on the main NEPSE index (index ID 58). Returns a list of all traded securities with their closing prices, volumes, and percentage changes.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_today_prices \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### get_top_performers

Get top performing stocks based on various criteria. Returns up to 10 securities ranked by the selected performance type for the current trading day.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `type` | string | No | Type of performance ranking. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/get_top_performers \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"<string>"}'
```

### search_stocks

Search for listed securities by symbol or company name. Returns all non-delisted securities matching the query via case-insensitive partial match. If no query is provided, returns all listed securities.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | No | Search keyword to filter by symbol or company name (case-insensitive partial match) |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-nepalstock-com-np-api-25cf98b0/search_stocks \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```
