API reference

Base URL https://fin.ejiapi.com. All endpoints are GET and return JSON. End-of-day data from the exchange's own public files.

Quickstart

  1. Request a key. It arrives by email. The same key works for the Mutual Fund API.
  2. Send it in the x-api-key header.
curl -H "x-api-key: YOUR_KEY" \
  "https://fin.ejiapi.com/api/market/indices"
import requests

r = requests.get("https://fin.ejiapi.com/api/market/indices",
                 headers={"x-api-key": "YOUR_KEY"}, timeout=30)
for i in r.json()["data"][:5]:
    print(i["indexName"], i["close"], i["pe"])
const res = await fetch("https://fin.ejiapi.com/api/market/indices", {
  headers: { "x-api-key": "YOUR_KEY" },
});
const { data } = await res.json();
console.log(data[0].indexName, data[0].close);
Keep your key on a server or in Apps Script properties. Do not put it in a web page or app that other people can open.

Authentication

Send your key as the x-api-key header. One endpoint is open and needs no key: GET /api/market/coverage. A missing, wrong or revoked key gets 401. A key is shared with the Mutual Fund API, so calls to both count against the same monthly quota.

Response format

Success is 200 with the same envelope as the Mutual Fund API; the rows are in data. Dates are YYYY-MM-DD in requests and responses. Amounts are in rupees; fields ending in Cr are rupees crore and Lacs are lakhs.

{ "status": "success", "statusCode": 200, "message": "Indices fetched successfully", "data": [ ... ] }

Errors

Errors are application/problem+json with title, status, detail and instance.

StatusWhen
400A parameter is not valid, for example an unknown by in movers.
401Missing or invalid key.
404Nothing for that symbol, index or date. A date that was not a trading session also answers 404.
429Rate limit or monthly quota reached.

Limits

120 requests a minute per key, and a monthly request quota per key that we raise on request. The X-RateLimit-Remaining header tells you what is left in the current minute. See pricing.

Indices

GET/api/market/indices?date=2026-11-02key

Every NSE index for one session (default the newest): open, high, low, close, change %, volume, turnover, P/E, P/B, dividend yield. /api/market/indices/{name}/history?start=&end= is one index over time; the name is not case sensitive.

Response data (one row)
{"indexName":"Nifty 50","date":"2026-11-02","close":23440.8,"changePct":1.68,"pe":19.43,"pb":2.88,"divYield":1.39}

Equity end of day

GET/api/market/equity/search?q=reliancekey
GET/api/market/news?symbol=RELIANCE&limit=20key
GET/api/market/equity/{symbol}/history?start=2026-10-01key

Daily open, high, low, close, volume, trades and delivery quantity and percent for an NSE symbol. series is EQ by default.

Response data (one row)
{"date":"2026-11-02","close":1300.0,"volume":88121121,"deliveryQty":49083159,"deliveryPct":55.7}

Movers

GET/api/market/equity/movers?by=deliveryPct&limit=20key

Ranking of EQ-series stocks for one session. by: changePct, deliveryPct, turnover, volume. order: desc or asc. minTurnoverLacs (default 100) keeps illiquid names out. date picks a session. ETFs trade in the EQ series and can appear.

FII / DII flows

GET/api/market/flows/fii-diikey

Cash-market buy, sell and net in rupees crore. NSE publishes only the newest day, so history begins on the day this API first stored it.

Response data (one row)
{"date":"2026-11-02","category":"FII/FPI","buyCr":16499.46,"sellCr":13384.78,"netCr":3114.68}

Participant open interest

GET/api/market/derivatives/participant-oikey

Contracts held in index and stock futures and options by Client, DII, FII and Pro, plus TOTAL, for one session (date, default the newest).

Bulk and block deals

GET/api/market/deals?symbol=AARTECHkey

Client, side, quantity and price. Filter by kind (bulk or block), symbol, start and end. Without dates it returns the newest session. NSE publishes the newest session only, so history begins when this API first stored it.

Futures

GET/api/market/derivatives/futures?symbol=NIFTYkey

Per expiry: prices, settlement, open interest and its change, volume and lot size. With symbol and optional start and end it is that underlying's history; without, one session (date, default the newest). kind is index or stock.

Response data (one row)
{"date":"2026-11-02","symbol":"NIFTY","expiry":"2026-11-23","close":23098.9,"openInterest":15599220,"lotSize":65}

Options summary

GET/api/market/derivatives/options-summary?symbol=NIFTYkey

Call and put open interest and volume summed over all strikes, per underlying and expiry, with put/call ratios. Individual strikes are not stored.

Response data (one row)
{"date":"2026-11-02","symbol":"NIFTY","expiry":"2026-11-03","callOi":142579710,"putOi":237873350,"pcrOi":1.6684}

Corporate actions

GET/api/market/corporate-actions?type=dividend&start=2026-11-01key

Dividends, splits, bonus, rights, buybacks, mergers and distributions by ex-date (record date when there is none). type is dividend, split, bonus, rights, buyback, merger, distribution or other. amount is the rupee dividend per share. Without dates it lists from today on.

Response data (one row)
{"symbol":"POWERGRID","type":"dividend","subject":"Interim Dividend - Rs 3.5 Per Share","exDate":"2026-11-14","amount":3.5}

Results and board meetings

GET/api/market/events?symbol=POWERGRIDkey

Dates announced to the exchange with the purpose and description. Without dates, from today on.

IPOs

GET/api/market/ipos?status=Activekey

Price band, issue size, subscription (times), status and listing date when known, newest opening date first. Filter by symbol, status, start and end.

Currency

GET/api/market/fx?currency=USD&start=2026-01-01key

Rupees for one unit of USD, EUR, GBP, JPY, AUD, CAD, CHF, CNY, SGD, HKD, KRW, NZD, SEK or THB, daily from 2020, computed from ECB reference rates. These are not RBI or FBIL rates. Without currency it returns the newest day for all of them.

Response data (one row)
{"date":"2026-11-02","currency":"USD","inr":94.91}

Coverage

GET/api/market/coverageno key

Rows held with first and latest date for every table, and when each background loader last ran. This is what the status page shows. GET /api/market/status (key needed) returns the table counts alone.

Freshness and history

DataRefreshedHistory
Indices, stocks, participant OIEvery 2 hours; a session appears once NSE publishes it, usually in the eveningFrom the first load, extended by dated files
Futures, options summaryEvery 2 hoursLast two months at launch
FII/DII, bulk and block dealsEvery 2 hoursNewest session only at the source, so stored from the first poll
Corporate actions, events, IPOsEvery 2 hoursActions for one year; events from three days back; IPOs since 2012
CurrencyEvery 2 hours; ECB publishes once a working dayDaily since 2020
End-of-day data only, not a trading feed. It can contain errors or delays and is not investment advice.