# Nepalstock — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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.

> Monitor live and historical trading data from Nepal's stock market, including real-time price quotes, market summaries, and detailed price history for all listed securities. Track daily trading statistics and analyze individual stock performance to make informed investment decisions.

**Category:** Finance & Markets | **Website:** [www.nepalstock.com/](https://www.nepalstock.com/) | **Docs:** [parse.bot/marketplace/421db2f5-fb04-4472-9c2e-aced9a433012/nepalstock-com-api](https://parse.bot/marketplace/421db2f5-fb04-4472-9c2e-aced9a433012/nepalstock-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/nepalstock/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Get live trading

Get the latest daily trading statistics for all securities in the current or most recent trading session. Returns last traded price, percentage change from previous close, previous close price, close price, and total traded quantity for each security.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/nepalstock/get-live-trading \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get market summary

Get the current market summary for the most recent trading session. Returns total turnover, total traded shares, total transactions, total scrips traded, total market capitalization, and total float market capitalization as a key-value map.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/nepalstock/get-market-summary \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### Get stock history

Get historical trading data for a specific security within a date range. Returns daily aggregated data including total trades, traded quantity, traded value, high/low/close prices. Paginated with configurable page size. The security_id is obtained from the list_securities endpoint.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `end_date` | string | Yes | End date in YYYY-MM-DD format. |
| `page_size` | string | No | Number of records per page. |
| `security_id` | string | Yes | Numeric security ID from the list_securities endpoint (e.g. 397 for ADBL, 2790 for ACLBSL). |
| `start_date` | string | Yes | Start date in YYYY-MM-DD format. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/nepalstock/get-stock-history \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"end_date":"<string>","page_size":"<string>","security_id":"<string>","start_date":"<string>"}'
```

### List securities

List all non-delisted securities (scrips) currently listed on NEPSE. Returns security ID, symbol, full company name, and active status for each security. Use the security ID from this endpoint to query historical data via get_stock_history.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/nepalstock/list-securities \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://beta.paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://beta.paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://beta.paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://beta.paywithlocus.com/agent/index.md): every Locus agent page.