NEPSE Trading APInepsetrading.com ↗
Access NEPSE-listed stocks, daily OHLCV history with RSI(14), and bullish RSI divergence scans via the nepsetrading.com API.
What is the NEPSE Trading API?
The nepsetrading.com API exposes three endpoints covering the full universe of NEPSE-listed equities: real-time daily quotes for every listed stock via list_stocks, per-ticker OHLCV history with a computed Wilder RSI(14) on each bar via get_price_history, and a market-wide bullish RSI divergence scanner via scan_bullish_rsi_divergence. Each endpoint returns structured JSON with named fields including symbol, sector, sub_index, rsi_14, and divergence metadata.
curl -X GET 'https://api.parse.bot/scraper/70c93abc-a650-499e-86ae-4a3c2214b74e/list_stocks' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace nepsetrading-com-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: NEPSE Trading SDK — list stocks, fetch price history, scan for RSI divergence."""
from parse_apis.nepsetrading_com_api import Nepse, StockNotFound
client = Nepse()
# List a handful of stocks and print their latest quotes.
for stock in client.stocks.list(limit=5):
print(stock.symbol, stock.name, stock.last_price, stock.point_change)
# Drill into one stock's daily price history (most recent 10 bars).
pick = client.stocks.list(sub_index="COMMERCIAL BANKS", limit=1).first()
if pick is not None:
try:
history = pick.price_history(days=10)
except StockNotFound:
print(f"{pick.symbol} has no price history")
else:
print(history.symbol, f"{history.count} bars, site holds {history.total_available}")
for bar in history.bars[:3]:
print(bar.date, bar.close, bar.volume, bar.rsi_14)
# Scan the same sub-index for bullish RSI divergence.
result = client.stocks.scan_divergence(sub_index="HYDRO POWER", lookback_days=2, batch_size=10)
print(f"scanned {result.scanned_count}, flagged {result.flagged_count}, has_more={result.has_more}")
for div in result.divergences or []:
print(div.symbol, div.divergence_date, f"RSI {div.rsi_value}", f"+{div.pct_from_low_today}%")
for err in result.scan_errors:
print(f"skipped {err.symbol}: {err.reason}")
print("exercised: stocks.list / price_history / scan_divergence")
Returns the full list of NEPSE-listed stocks with their latest daily quote (last price, previous close, open/high/low, volume, change) plus sector and sub-index, in one round trip. `sub_indices` lists every sub-index label present in the full universe so callers can filter. When a sub-index filter is supplied only stocks in that sub-index are returned (case-insensitive exact match); a label matching nothing returns an empty `stocks` list. Prices are in NPR. `data_date` is the trading date the quote refers to (YYYY-MM-DD).
| Param | Type | Description |
|---|---|---|
| sub_index | string | NEPSE sub-index label to restrict the list to, exactly as it appears in `sub_indices` (e.g. COMMERCIAL BANKS). Omitted = all stocks. |
{
"type": "object",
"fields": {
"count": "number of records in `stocks`",
"stocks": "array of stock quote records (symbol, name, sector, sub_index, last_price, previous_close, open, high, low, volume, point_change, percentage_change, data_date)",
"sub_indices": "array of all sub-index labels in the full universe (unfiltered)"
},
"sample": {
"data": {
"count": 19,
"stocks": [
{
"low": 552,
"high": 554.9,
"name": "Nabil Bank Limited",
"open": 552,
"sector": "COMMERCIAL BANKS",
"symbol": "NABIL",
"volume": 415005,
"data_date": "2026-09-11",
"sub_index": "COMMERCIAL BANKS",
"last_price": 553,
"point_change": 0.5,
"previous_close": 552.5,
"percentage_change": 0.0905
}
],
"sub_indices": [
"COMMERCIAL BANKS",
"DEVELOPMENT BANKS",
"FINANCE",
"HOTELS AND TOURISM",
"HYDRO POWER",
"INVESTMENT",
"LIFE INSURANCE",
"MANUFACTURING AND PROCESSING",
"MICROFINANCE",
"NON LIFE INSURANCE",
"OTHERS",
"TRADINGS"
]
},
"status": "success"
}
}About the NEPSE Trading API
Stock Universe and Quotes
The list_stocks endpoint returns the full NEPSE-listed universe in a single call. Each record in the stocks array includes symbol, name, sector, sub_index, last_price, previous_close, open, high, low, volume, point_change, and percentage change. The response also returns a sub_indices array listing every sub-index label present across the full universe — for example COMMERCIAL BANKS or HYDRO POWER — so you can pass one of those labels back via the sub_index parameter to filter the list to a single segment.
Daily Price History with RSI
get_price_history accepts a required symbol (any ticker from list_stocks, or NEPSE for the index) and an optional days parameter (1–500) that trims the response to the most recent N bars. RSI(14) is computed over the full available history before trimming, so values near the start of a short slice are still well-seeded. Each bar in the bars array carries date, open, high, low, close, volume, and rsi_14 (null on early bars before 14 closes are available). The response also exposes total_available and first_date so you know the full depth the source holds for that ticker.
Bullish RSI Divergence Scanner
scan_bullish_rsi_divergence tiles the entire NEPSE universe (or a filtered sub-index, or a comma-separated symbols list of up to 40 tickers) and applies a Wilder RSI(14) divergence rule: within the last lookback_days trading bars (1–3) it looks for a bar whose low is the lowest recent close while its rsi_value is higher than a prior swing low's RSI, signaling potential bullish divergence. Results in divergences include divergence_date, price_low, rsi_value, prior_low_date, prior_price_low, and prior_rsi_value. Pagination is handled via offset, batch_size, has_more, and next_offset, letting you tile large universes across multiple calls. Tickers skipped due to missing history appear in the errors array with a reason.
The NEPSE Trading API is a managed, monitored endpoint for nepsetrading.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when nepsetrading.com changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official nepsetrading.com API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Screen the full NEPSE market for bullish RSI divergence setups before the trading session opens
- Build a sector-level dashboard by filtering list_stocks with sub_index to compare last_price and volume across COMMERCIAL BANKS or HYDRO POWER
- Plot 200-bar candlestick charts for individual NEPSE tickers using OHLCV bars from get_price_history
- Overlay RSI(14) on price charts using the pre-computed rsi_14 field without running your own indicator calculations
- Backtest divergence-based entry signals using prior_low_date, prior_price_low, and prior_rsi_value fields from the scanner
- Monitor a watchlist of specific tickers by passing a comma-separated symbols list to scan_bullish_rsi_divergence
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does nepsetrading.com offer an official developer API?+
What does get_price_history return for the RSI field, and how far back does it go?+
bars array includes an rsi_14 field computed using Wilder's smoothing method over the full available history for that ticker before any days trimming is applied. rsi_14 is null on early bars until 14 closes have accumulated. The response's total_available and first_date fields tell you how many bars the source holds and when the history begins.Can I retrieve intraday (tick or minute-level) price data?+
How does pagination work in scan_bullish_rsi_divergence when scanning the full market?+
offset and batch_size (1–40 tickers per call) to tile the universe. Each response returns has_more, next_offset, scanned_count, and universe_total. Pass the previous response's next_offset as offset in the next call to continue. When has_more is false, the universe is exhausted. You can also skip pagination entirely by passing a symbols list of up to 40 specific tickers.