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
- Request a key. It arrives by email. The same key works for the Mutual Fund API.
- Send it in the
x-api-keyheader.
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);
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.
| Status | When |
|---|---|
400 | A parameter is not valid, for example an unknown by in movers. |
401 | Missing or invalid key. |
404 | Nothing for that symbol, index or date. A date that was not a trading session also answers 404. |
429 | Rate 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
/api/market/indices?date=2026-11-02keyEvery 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.
{"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
/api/market/equity/search?q=reliancekey/api/market/news?symbol=RELIANCE&limit=20key/api/market/equity/{symbol}/history?start=2026-10-01keyDaily open, high, low, close, volume, trades and delivery quantity and percent for an NSE symbol. series is EQ by default.
{"date":"2026-11-02","close":1300.0,"volume":88121121,"deliveryQty":49083159,"deliveryPct":55.7}Movers
/api/market/equity/movers?by=deliveryPct&limit=20keyRanking 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
/api/market/flows/fii-diikeyCash-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.
{"date":"2026-11-02","category":"FII/FPI","buyCr":16499.46,"sellCr":13384.78,"netCr":3114.68}Participant open interest
/api/market/derivatives/participant-oikeyContracts 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
/api/market/deals?symbol=AARTECHkeyClient, 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
/api/market/derivatives/futures?symbol=NIFTYkeyPer 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.
{"date":"2026-11-02","symbol":"NIFTY","expiry":"2026-11-23","close":23098.9,"openInterest":15599220,"lotSize":65}Options summary
/api/market/derivatives/options-summary?symbol=NIFTYkeyCall and put open interest and volume summed over all strikes, per underlying and expiry, with put/call ratios. Individual strikes are not stored.
{"date":"2026-11-02","symbol":"NIFTY","expiry":"2026-11-03","callOi":142579710,"putOi":237873350,"pcrOi":1.6684}Corporate actions
/api/market/corporate-actions?type=dividend&start=2026-11-01keyDividends, 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.
{"symbol":"POWERGRID","type":"dividend","subject":"Interim Dividend - Rs 3.5 Per Share","exDate":"2026-11-14","amount":3.5}Results and board meetings
/api/market/events?symbol=POWERGRIDkeyDates announced to the exchange with the purpose and description. Without dates, from today on.
IPOs
/api/market/ipos?status=ActivekeyPrice band, issue size, subscription (times), status and listing date when known, newest opening date first. Filter by symbol, status, start and end.
Currency
/api/market/fx?currency=USD&start=2026-01-01keyRupees 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.
{"date":"2026-11-02","currency":"USD","inr":94.91}Coverage
/api/market/coverageno keyRows 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
| Data | Refreshed | History |
|---|---|---|
| Indices, stocks, participant OI | Every 2 hours; a session appears once NSE publishes it, usually in the evening | From the first load, extended by dated files |
| Futures, options summary | Every 2 hours | Last two months at launch |
| FII/DII, bulk and block deals | Every 2 hours | Newest session only at the source, so stored from the first poll |
| Corporate actions, events, IPOs | Every 2 hours | Actions for one year; events from three days back; IPOs since 2012 |
| Currency | Every 2 hours; ECB publishes once a working day | Daily since 2020 |