Share Hub

Share Hub · NEPSE Market Data API

NEPSE Data API documentation

Live and historical NEPSE market data — index, prices, sectors, companies, fundamentals, dividends, announcements and public offerings — over a JSON REST API. The same feed powers Share Hub's website and apps, so your pages, apps and reports always show the same numbers.

Base URL

https://sharehubnepal.com/data/api/v1/nepse-data

Auth

Bearer token (email & password login)

Format

JSON · UTF-8 · times in UTC

Every call needs a Data API account (issued by Share Hub), an allow-listed server IP, and the service enabled on your licence. Use Sign in at the top right to try any endpoint from this page.

Packages

Each package includes everything in the one before it. The services on your licence are marked when you are signed in.

Package 1 — Essential

ServiceWhat's included
Live market
market
NEPSE and sub-index values, market open/closed status, session totals, advanced/declined counts and today's top movers.
Live stock prices
stock-prices
Symbol, name, LTP, change, % change and previous close for every listed stock.
Sector performance
sectors
Today's value, change, turnover and breadth for each sector index.
Company information
companies
Every listed company: name, symbol, sector, listed shares, paid-up capital, face value, listing date, trading status.

Package 2 — Professional

ServiceWhat's included
Index charts
index-charts
NEPSE, sensitive, float and sector index history over 1W, 1M, 3M, 6M, 1Y, 5Y and all time.
Movers over time
movers
Top gainers and losers over periods from 1 week to 1 year.
Full stock list & rankings
stocks
OHLCV, fundamentals (EPS, P/E, book value, net profit, market cap) and 52-week range for every stock; filter by sector and sort by any column.
Highs and lows
high-low
52-week high/low for every stock, and all-time high/low per stock.
Company profile
company-profile
Ownership split (promoter/public), capital, rating and registered company details.
Financial ratios
financial-ratios
EPS, P/E, book value, P/B, one-year yield and market capitalisation per stock.
All-time price chart
price-history
Daily OHLCV history per stock from listing to today.
Company announcements
announcements
Dated feed of company announcements, events and NEPSE news & alerts.
Dividend table
dividends
Bonus, cash and total dividend with book close date and fiscal year.
Holidays
holidays
Market holidays and trading calendar for the year.
Public offerings
public-offerings
IPO, FPO, rights, auctions, mutual funds and debentures — upcoming, open and recent.
Market heatmap
heatmap
Sector and stock change, turnover and market cap, ready to colour as a heatmap.
What moved the index
index-contribution
Points each stock and sector added to or took from the NEPSE index.
Price against volume
price-volume
Each stock's price change against its traded volume and volume change.

Response format

Every response — success or error — uses the same envelope. The payload is in data.

{
  "success": true,
  "code": "SUCCESS",
  "message": "Fetched Successfully from Share Hub",
  "data": { … }
}

Paged endpoints return data.content plus pageIndex, pageSize, totalItems and totalPages; pass Page and Size (max 500) to page through.

Login

Exchange your Data API account's email and password for an access token (valid 30 minutes) and a refresh token (valid 30 days).

POST https://sharehubnepal.com/account/api/v1/auth/login/email
curl -X POST https://sharehubnepal.com/account/api/v1/auth/login/email \
  -H "Content-Type: application/json" \
  -d '{ "email": "[email protected]", "password": "••••••••", "useOnCookies": false }'

Response (fields you need):

{
  "success": true,
  "data": {
    "accessToken": "eyJhbGciOi…",
    "accessTokenExpiration": "2026-09-21T10:30:00Z",
    "refreshToken": "eyJhbGciOi…",
    "refreshTokenExpiration": "2026-10-21T10:00:00Z"
  }
}

Accounts lock for 10 minutes after 5 wrong passwords. Store the tokens on your server — never in a browser.

Refresh token

Before the access token expires, send both tokens to get a new pair. Keep the new refresh token — use it for the next refresh.

POST https://sharehubnepal.com/account/api/v1/auth/login/refresh
curl -X POST https://sharehubnepal.com/account/api/v1/auth/login/refresh \
  -H "Content-Type: application/json" \
  -d '{ "accessToken": "<current access token>", "refreshToken": "<current refresh token>" }'

The response has the same shape as login. If the refresh token has expired, log in again.

Calling the API

Send the access token on every request:

curl https://sharehubnepal.com/data/api/v1/nepse-data/market \
  -H "Authorization: Bearer <access token>"

Cache responses on your side: live data refreshes every ~20 seconds during trading hours and every 5 minutes when the market is closed, so polling faster than that returns the same data and uses up your limits.

IP allow-list

Only your registered server IPs may call the API. Call GET /nepse-data/my-ip (no login needed) from each server and send the IPs to Share Hub to add to your licence.

curl https://sharehubnepal.com/data/api/v1/nepse-data/my-ip
# { "success": true, "data": { "ip": "203.0.113.25" } }

Rate limits

Your licence sets a per-minute and a per-day request limit. Every response reports where you stand:

HeaderMeaning
X-RateLimit-Limit Requests allowed per minute
X-RateLimit-Remaining Requests left in the current minute
X-RateLimit-Day-Limit Requests allowed per day (UTC)
X-RateLimit-Day-Remaining Requests left today
Retry-After Seconds to wait — only on a 429 response

Test mode

When Share Hub enables test mode on your licence, requests that carry X-DataApi-Test: true are accepted from any IP — that is how the Try-it consoles on this page work before your servers are registered. Test calls are limited to 10 per minute and 500 per day, and are logged separately.

Errors

Errors use the standard envelope with success: false and one of these codes:

HTTPCodeMeaning
401 UNAUTHORIZED Missing, invalid or expired access token — refresh or log in again.
403 NOT_A_DATA_CONSUMER The account is not a Data API account.
403 NO_ACCESS No licence on this account.
403 ACCESS_NOT_STARTED The licence starts on a later date.
403 ACCESS_EXPIRED The licence has expired — contact Share Hub to renew.
403 ACCESS_SUSPENDED The licence is suspended.
403 ACCESS_CANCELLED The licence has been cancelled.
403 SERVICE_NOT_ENABLED This endpoint's service isn't part of your licence.
403 IP_NOT_ALLOWED The calling IP isn't on your allow-list (the message shows the IP we saw).
429 RATE_LIMITED Per-minute or daily limit reached — wait for Retry-After seconds.
400 INVALID_TIME / INVALID_SORT A query parameter has an unsupported value.
503 ACCESS_CHECK_UNAVAILABLE / MARKET_UNAVAILABLE Temporary upstream problem — retry shortly.

My access & usage

Sign in with your Data API account to see your licence, enabled services and recent usage, and to run the Try-it consoles below.

Package 1 — Essential

Live market

Live market snapshot in one call: market status, session summary, breadth, indices and sub-indices, top gainers/losers/turnover/traded shares/transactions and every company's live price.

GET /data/api/v1/nepse-data/market

Live stock prices

Live price of every listed stock. Pass symbol to get one.

GET /data/api/v1/nepse-data/stock-prices

Parameters

  • symbol — One stock symbol; leave empty for every stock.

Sector performance

Today's value, change, turnover and breadth of each sector index.

GET /data/api/v1/nepse-data/sectors

Company information

Every listed company with sector, capital, listing date and trading status.

GET /data/api/v1/nepse-data/companies

Package 2 — Professional

Index charts

Daily history of an index (NEPSE, SENSITIVE, FLOAT or a sector index) for the chosen period.

GET /data/api/v1/nepse-data/index-charts/{symbol}

Parameters

  • symbol (required) — Index symbol: NEPSE, SENSITIVE, FLOAT, SENFLOAT or a sector index symbol (see symbol in /sectors). Options: NEPSE, SENSITIVE, FLOAT, SENFLOAT.
  • time — Period to return. Options: 1W, 1M, 3M, 6M, 1Y, 5Y, ALL.

Movers over time

Top gainers or losers over a period: 1w, 1m, 3m, 6m or 1y.

GET /data/api/v1/nepse-data/movers

Parameters

  • duration — Look-back period. Options: 2d, 3d, 5d, 7d, 1w, 1m, 3m, 4m, 6m, 1y.
  • type — Which list to return. Options: gainers, losers.

Full stock list & rankings

Full market table with OHLCV and fundamentals. Filter by sector, sort by any numeric column, limit with top.

GET /data/api/v1/nepse-data/stocks

Parameters

  • sector — Sector name, exactly as in /sectors (name).
  • sectorId — Sector id from /sectors (sectorId).
  • sortBy — Column to sort by; empty keeps the default (by symbol). Options: ltp, change, changePercent, turnover, volume, transactions, eps, pe, bookValue, pbv, netProfit, marketCap, paidUpCapital.
  • order — Sort direction. Options: desc, asc.
  • top — Return only the first N rows after sorting.

Highs and lows

52-week high and low for every stock.

GET /data/api/v1/nepse-data/high-low

Highs and lows

52-week and all-time high and low (with dates) for one stock.

GET /data/api/v1/nepse-data/high-low/{symbol}

Parameters

  • symbol (required) — Stock symbol.

Company profile

Registered details, ownership split, capital and rating for one company.

GET /data/api/v1/nepse-data/companies/{symbol}

Parameters

  • symbol (required) — Stock symbol.

Financial ratios

EPS, P/E, book value, P/B, yield, net profit and market cap for every stock.

GET /data/api/v1/nepse-data/financial-ratios

Financial ratios

Latest reported performance values for one stock.

GET /data/api/v1/nepse-data/financial-ratios/{symbol}

Parameters

  • symbol (required) — Stock symbol.

All-time price chart

Daily OHLCV history for one stock, from listing (ALL) or for a shorter period.

GET /data/api/v1/nepse-data/price-history/{symbol}

Parameters

  • symbol (required) — Stock symbol.
  • time — Period to return; ALL is from listing. Options: 1W, 1M, 3M, 6M, 1Y, 5Y, ALL.

Company announcements

Company announcements, events and NEPSE news & alerts, newest first (paged).

GET /data/api/v1/nepse-data/announcements

Parameters

  • Symbol — Stock symbol.
  • IsEvent — Only events (true) or only non-events (false). Options: true, false.
  • Type — Offering / announcement type. Options: Announcement, AnnouncementAndEvent, Event, NewsAndAlert.
  • Category — Announcement category. Options: Nepse Circular, Nepse News and Alert, Financials, IPO/FPO Update, Right Shares, Auction, AGM/SGM, Corporate Announcement, Dividend, Other.
  • Source — Who published the announcement. Options: Nepse, Company, Registrars, Other.
  • DateFrom — From date (YYYY-MM-DD).
  • DateTo — To date (YYYY-MM-DD).
  • Page — Page number, starting at 1.
  • Size — Rows per page, 1–500.

Dividend table

Bonus, cash and total dividend with book close date and fiscal year (paged).

GET /data/api/v1/nepse-data/dividends

Parameters

  • FiscalYear — Nepali fiscal year.
  • Symbol — Stock symbol.
  • ListedStocksOnly — Only stocks that are still listed. Options: true, false.
  • SectorId — Sector id from /sectors (sectorId).
  • InstrumentId — Instrument id.
  • IsPromoter — Promoter shares (true) or ordinary shares (false). Options: true, false.
  • Search — Free-text search.
  • OrderBy — Field to sort by.
  • Order — Sort direction for OrderBy. Options: asc, desc.
  • Page — Page number, starting at 1.
  • Size — Rows per page, 1–500.

Holidays

Market holidays for a year (defaults to the current year).

GET /data/api/v1/nepse-data/holidays

Parameters

  • year — Calendar year; defaults to the current year.

Public offerings

IPO, FPO, rights, auctions, mutual funds and debentures (paged; filter by Type).

GET /data/api/v1/nepse-data/public-offerings

Parameters

  • For — Who the offering is for. Options: LocalPeople, MigrantWorkers, GeneralPublic, EligibleInvestors.
  • Type — Offering / announcement type. Options: Ipo, Fpo, Right, MutualFund, BondOrDebenture, PreferenceShare, Auction.
  • Symbol — Stock symbol.
  • Search — Free-text search.
  • OrderBy — Field to sort by.
  • Order — Sort direction for OrderBy. Options: asc, desc.
  • Page — Page number, starting at 1.
  • Size — Rows per page, 1–500.

Market heatmap

Active equities grouped by sector with change, turnover and market cap — ready to colour.

GET /data/api/v1/nepse-data/heatmap

What moved the index

Points each stock and sector added to or took from the index on a day (default: latest).

GET /data/api/v1/nepse-data/index-contribution

Parameters

  • date — Trading day (YYYY-MM-DD); defaults to the latest.
  • indexId — Index id from /sectors (indexId); empty = NEPSE.

Price against volume

Each stock's price change against its traded volume and volume change.

GET /data/api/v1/nepse-data/price-volume

Frequently asked questions

What is the ShareHub NEPSE Data API?

⌄

A JSON REST API that delivers Nepal Stock Exchange (NEPSE) market data — live index, stock prices, sector performance, company information, fundamentals, dividends, announcements, holidays and public offerings — from the same feed that powers ShareHub Nepal's website and apps.

How do I get access to the NEPSE Data API?

⌄

Contact ShareHub Nepal for a Data API account. You receive a login for your organisation, a licence with the services in your package, and your server IP addresses are added to an allow-list.

Which NEPSE data is included?

⌄

Package 1 covers the live NEPSE index and market status, live stock prices, today's market summary, sector performance and company information. Package 2 adds index charts, movers over time, the full stock table with fundamentals and rankings, highs and lows, company profiles, financial ratios, price history, announcements, dividends, holidays, IPOs and other public offerings, a market heatmap, index contribution and price-volume analysis.

How do I authenticate?

⌄

Log in with your Data API account's email and password to get an access token (valid 30 minutes) and a refresh token (valid 30 days), then send the access token as a Bearer token on every request and refresh it before it expires.

Are there rate limits?

⌄

Yes. Each licence has a per-minute and a per-day request limit, reported on every response in the X-RateLimit headers. Requests over the limit get HTTP 429 with a Retry-After header.

How fresh is the live data?

⌄

Live market data refreshes about every 20 seconds during NEPSE trading hours and every 5 minutes when the market is closed.