NepseAlpha APInepsealpha.com ↗
Access NEPSE live prices, historical OHLCV, technical signals, fundamental ratios, sector summaries, and risk metrics via the NepseAlpha API.
What is the NepseAlpha API?
The NepseAlpha API exposes 10 endpoints covering the Nepal Stock Exchange (NEPSE), returning live market prices, historical OHLCV data, sector performance, and trading signals. The get_technical_signals endpoint alone surfaces RSI 14, MACD, Bollinger Bands, SMA crossovers, and trend indicators for every listed stock. You can also query adjusted or unadjusted historical prices, retrieve per-symbol risk metrics like beta and Sharpe ratio, and search the NEPSE symbol universe by keyword.
curl -X GET 'https://api.parse.bot/scraper/646d18ff-34ab-4123-becc-9b1b6b35031e/search_symbol?limit=10&query=NABIL' \ -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 nepsealpha-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 Alpha Market Data SDK — bounded, re-runnable; every call capped."""
from parse_apis.nepse_alpha_market_data_api import (
NepseAlpha, TimeFrame, PriceType, Resolution, SymbolNotFound
)
client = NepseAlpha()
# Search for stocks matching a keyword — limit caps total items fetched.
for stock in client.stocks.search(query="NABIL", limit=3):
print(stock.symbol, stock.description, stock.sector)
# Construct a stock by symbol and fetch its price history.
nabil = client.stock(symbol="NABIL")
for price in nabil.prices.list(time_frame=TimeFrame.DAILY, limit=5):
print(price.date, price.close, price.percent_change)
# Fetch TradingView-compatible chart data for the same stock.
chart = nabil.chart.get(resolution=Resolution.ONE_DAY)
print(f"Chart points: {len(chart.close)}, latest close: {chart.close[-1]}")
# List all sectors with performance metrics.
for sector in client.sectors.list(limit=3):
print(sector.index_name, sector.full_name, sector.pe, sector.daily_gain)
# Fetch technical signals — one call, bounded iteration.
signal = client.technicalsignals.list(limit=1).first()
if signal:
print(signal.symbol, signal.technical_summary, signal.rsi_14)
# Typed error handling around a risk signal lookup.
try:
for risk in client.risksignals.list(limit=2):
print(risk.symbol, risk.f_score, risk.sharpe_ratio, risk.var_95)
except SymbolNotFound as exc:
print(f"Symbol not found: {exc.symbol}")
print("exercised: stocks.search / stock.prices.list / stock.chart.get / sectors.list / technicalsignals.list / risksignals.list")
Full-text search over NEPSE-listed stocks by company name or ticker symbol. Returns matching stocks with metadata including symbol, name, sector, and exchange. The limit parameter caps total results returned by the upstream API.
| Param | Type | Description |
|---|---|---|
| limit | integer | Maximum number of results to return from the search |
| queryrequired | string | Search keyword matching company name or stock symbol (e.g. NABIL, Himalayan) |
{
"type": "object",
"fields": {
"total": "integer count of results returned",
"results": "array of stock objects each with symbol, full_name, description, exchange, type, sector"
},
"sample": {
"data": {
"total": 9,
"results": [
{
"type": "stock",
"sector": "BANKING",
"symbol": "NABIL",
"exchange": "Commercial Banks src:Nepsealpha.com",
"full_name": "NABIL",
"is_master": true,
"logo_urls": [
"/storage/stock-full-names/alpha-stocks/66e4090d005f21726220557.png"
],
"description": "Nabil Bank Limited",
"exchange_logo": [
"/storage/stock-full-names/alpha-stocks/66e4090d005f21726220557.png"
]
}
]
},
"status": "success"
}
}About the NepseAlpha API
Market Data Coverage
The get_live_market endpoint returns a snapshot of the entire NEPSE session: individual stock prices (live_stock_price, latest_price), a ranked list of top gainers and losers (looser_gainer), sector-level data, and a boolean is_market_open flag alongside a marketSummary object. All live data is tagged with an asOf timestamp so you know exactly when the snapshot was taken.
Historical Prices and Chart-Ready Feeds
get_historical_price_data accepts a symbol (stock or index such as NEPSE), a start_date and end_date in YYYY-MM-DD format, a price_type of either adjusted or unadjusted, and a time_frame of daily, weekly, or monthly. Each record returns open, high, low, close, volume, turnover, and percent_change. For charting libraries, get_tradingview_history returns the same price history in array form (o, h, l, c, v, t) keyed to a status string s. The 1D resolution is the most reliable; 1W and 1M may be subject to tighter rate limits.
Signals and Risk
get_technical_signals covers every listed stock with RSI 14, MACD, Bollinger Band position, SMA crossover state, a composite Technical Summary, and an entry-risk rating. get_fundamental_signals pairs PE, PB, ROE, ROA, PEG, dividend yield, and payout ratio with a sector-relative Ratios Summary. get_risk_assessment adds quantitative risk fields per symbol: 3-month beta, alpha, Sharpe ratio, daily volatility, 95% VaR, Piotroski F-score, Altman Z-score, and a G-score. These three endpoints return data for all stocks in a single call, making them practical for screener-style workflows.
Sectors and Daily Summary
get_sector_summary returns each NEPSE sector's PE, PB, ROE, sparkline data, and daily index gain. get_daily_market_summary delivers intraday gainers, losers, volume leaders, and turnover leaders as structured arrays. Symbol discovery is handled by search_symbol, which accepts a query string and an optional limit and returns symbol, full_name, sector, exchange, type, and description for each match.
The NepseAlpha API is a managed, monitored endpoint for nepsealpha.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when nepsealpha.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 nepsealpha.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?+
- Build a NEPSE stock screener filtering by RSI, MACD, and Bollinger Band signals from
get_technical_signals - Backtest trading strategies using adjusted or unadjusted OHLCV data from
get_historical_price_data - Display live NEPSE gainers and losers on a dashboard using the
looser_gainerfield fromget_live_market - Rank sectors by PE, PB, and daily gain using
get_sector_summaryfor sector-rotation analysis - Assess portfolio risk by pulling beta, Sharpe ratio, and 95% VaR from
get_risk_assessment - Populate chart widgets with TradingView-compatible OHLCV arrays via
get_tradingview_history - Monitor high-turnover and high-volume stocks daily using turnover and volume leader arrays from
get_daily_market_summary
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does NepseAlpha offer an official developer API?+
What does `get_historical_price_data` return, and can I get adjusted prices?+
open, high, low, close, volume, turnover, f_date, and percent_change. Set the price_type parameter to adjusted to get bonus- and rights-adjusted prices, or unadjusted for raw exchange-reported figures. Omitting end_date defaults to the current date.Are intraday tick-by-tick prices available?+
get_historical_price_data and get_tradingview_history is daily. You can fork this API on Parse and revise it to add an intraday endpoint if that data becomes accessible.What does `get_floorsheet_live` return?+
props object containing live floorsheet transaction data — the record of buyer and seller broker IDs and quantities for each trade. The current response shape exposes a top-level props object; specific nested fields may vary by session. You can fork this API on Parse and revise it to normalize or filter specific floorsheet columns.