Endpoint Migration

A developer-friendly guide for moving from the old flat JSON endpoints to the new folder-based YONEPSE API paths.

Legacy support ends November 18, 2026
New endpoints are canonical now

What Changed

YONEPSE data files are being grouped by domain so the API is easier to scan and extend. Market support files now live under /data/market/, IPO files under /data/ipo/, and LTP history under /data/ltp/.

Old endpoint paths remain available for six months, until November 18, 2026. After that date, old paths will stop being updated and may be removed.

View endpoint mapping

New Integrations

Use only the new folder-based paths. They are the canonical endpoints and will receive future additions first.

Existing Integrations

Old paths are supported temporarily. Update your URLs during the six-month window to avoid a production break later.

Code Changes

Most migrations are simple string replacements. No auth, headers, pagination, or response parsing changes are required for these moved files.

Endpoint Mapping

Old endpoint New endpoint Notes
/data/indices.json /data/market/indices.json Main index rows.
/data/sector_indices.json /data/market/sector_indices.json Sector index rows.
/data/top_stocks.json /data/market/top_stocks.json Top gainers, losers, turnover, trades, and transactions.
/data/market_status.json /data/market/status.json Shorter name because it is already inside the market folder.
/data/market_summary.json /data/market/summary.json Current market summary metrics.
/data/market_summary_history.json /data/market/history.json Historical market summary rows.
/data/supply_demand.json /data/market/supply_demand.json Supply and demand snapshots.
/data/live_trades.json /data/market/live.json New live file mirrors /data/nepse_data.json. The old live-trades feed is not continued.
/data/upcoming_ipo.json /data/ipo/upcoming.json Current and upcoming IPO records.
/data/oldipo.json /data/ipo/old.json IPO archive.
/data/notices.json /data/notify/notices.json General notices bundle.
/data/disclosures.json /data/notify/disclosures.json Company disclosures and news.
/data/exchange_messages.json /data/notify/exchange_messages.json Exchange-level messages and circulars.
/data/brokers.json /data/other/brokers.json Broker directory.
/data/all_securities.json /data/other/securities.json Master list of securities metadata.
/data/nepse_sector_wise_codes.json /data/other/sector_codes.json Sector-to-symbol mapping for filtering.

JavaScript Example

Before:

const status = await fetch('/data/market_status.json').then(r => r.json());
const ipos = await fetch('/data/upcoming_ipo.json').then(r => r.json());

After:

const status = await fetch('/data/market/status.json').then(r => r.json());
const ipos = await fetch('/data/ipo/upcoming.json').then(r => r.json());

Python Example

Before:

import requests

base = "https://shubhamnpk.github.io/yonepse"
rows = requests.get(f"{base}/data/ltp/manifest.json", timeout=20).json()

After:

import requests

base = "https://shubhamnpk.github.io/yonepse"
rows = requests.get(f"{base}/data/market/history.json", timeout=20).json()

Copy-Paste AI Prompt

Paste this into your coding assistant with your project open. It asks the AI to make only the endpoint migration changes and then verify the result.

Please update this codebase to use the new YONEPSE JSON API endpoints.

Rules:
- Change only endpoint paths and closely related docs/tests.
- Do not rewrite unrelated code.
- Keep response parsing the same unless the code depends on removed dividend fields: company_url, status, or JSON null fields.
- After editing, search the repo for old endpoint strings and report anything intentionally left.

Endpoint replacements:
/data/indices.json -> /data/market/indices.json
/data/sector_indices.json -> /data/market/sector_indices.json
/data/top_stocks.json -> /data/market/top_stocks.json
/data/market_status.json -> /data/market/status.json
/data/market_summary.json -> /data/market/summary.json
/data/market_summary_history.json -> /data/market/history.json
/data/supply_demand.json -> /data/market/supply_demand.json
/data/live_trades.json -> /data/market/live.json
/data/upcoming_ipo.json -> /data/ipo/upcoming.json
/data/oldipo.json -> /data/ipo/old.json
/data/notices.json -> /data/notify/notices.json
/data/disclosures.json -> /data/notify/disclosures.json
/data/exchange_messages.json -> /data/notify/exchange_messages.json
/data/brokers.json -> /data/other/brokers.json
/data/all_securities.json -> /data/other/securities.json
/data/nepse_sector_wise_codes.json -> /data/other/sector_codes.json

Canonical endpoints that should remain unchanged:
/data/nepse_data.json
/data/OMF.json
/data/ltp/manifest.json
/data/ltp/monthly/YYYY-MM.json
/data/ltp/daily/YYYY-MM-DD.json
/data/proposed_dividend/latest_1y.json
/data/proposed_dividend/history_all_years.json
/data/proposed_dividend/meta.json

Migration Checklist

  • Replace old endpoint strings with the new folder-based paths.
  • Prefer /data/market/live.json for a folder-based alias of /data/nepse_data.json.
  • Update tests, docs, env examples, and dashboards that hard-code old URLs.
  • Deploy before November 18, 2026.
  • Keep response parsing unchanged unless you were depending on removed dividend fields like company_url, status, or JSON null fields.
No auth changes Same JSON format Six-month legacy support