Discover/Hdfcsec API
live

Hdfcsec APIhdfcsec.com

Access real-time NSE and BSE equity data via the HDFC Securities API: top gainers, losers, most active stocks, 52-week highs/lows, index overviews, and stock quotes.

Endpoint health
verified 4d ago
get_52_week_high_stocks
get_most_active_nse_stocks
get_top_gainers_nse
get_top_losers_nse
get_stock_quote
8/8 passing latest checkself-healing
Endpoints
8
Updated
26d ago

What is the Hdfcsec API?

The HDFC Securities API covers 8 endpoints for real-time Indian equity market data across NSE and BSE. You can retrieve top gainers and losers, most active stocks by volume, 52-week high and low listings, index overviews, and detailed per-stock quotes — including fields like ltp, market_cap, pe_ratio, fifty_two_wk_high, and isin — all filterable by exchange and index code.

Try it
Index code to filter by (e.g., 20559 for Nifty 50, 20558 for Sensex)
Time period: I (Intra Day), W (Week), M (Month)
Exchange code: NSE or BSE
api.parse.bot/scraper/b58bc736-5f89-43ac-b79d-9cc4508f29fb/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/b58bc736-5f89-43ac-b79d-9cc4508f29fb/get_most_active_nse_stocks?index=20559&period=I&exchange=NSE' \
  -H 'X-API-Key: $PARSE_API_KEY'
Python SDK · recommended

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 hdfcsec-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: HDFC Securities Market Data — bounded, re-runnable; every call capped."""
from parse_apis.hdfc_securities_market_data_api import (
    HDFCSecurities, Exchange, Period, StockNotFound
)

client = HDFCSecurities()

# List top gainers on NSE for intra-day, capped at 5 results.
for stock in client.stocks.top_gainers(exchange=Exchange.NSE, period=Period.INTRA_DAY, limit=5):
    print(stock.stock_name, stock.ltp, stock.percent_change)

# Get all available NSE indices — discover index codes for filtering.
for idx in client.indexes.list(exchange=Exchange.NSE, limit=3):
    print(idx.index_name, idx.index_code, idx.ltp)

# Search for a stock and drill into its full quote.
result = client.searchresults.search(query="Reliance", limit=1).first()
if result:
    print(result.stock_name, result.isin, result.exchange)

# Fetch a detailed stock quote with typed-error handling.
try:
    quote = client.stockquotes.get(symbol="INFY")
    print(quote.stock_name, quote.ltp, quote.sector, quote.fifty_two_wk_high)
except StockNotFound as exc:
    print(f"Stock not found: {exc.symbol}")

# 52-week highs on BSE — market momentum scan.
for high in client.weekhighstocks.list(exchange=Exchange.BSE, limit=3):
    print(high.stock_name, high.ltp, high.prev_day_high)

print("exercised: stocks.top_gainers / indexes.list / searchresults.search / stockquotes.get / weekhighstocks.list")
All endpoints · 8 totalmissing one? ·

Get the most active stocks for a given exchange and index, sorted by trading volume descending. Each result includes last traded price, change, percent change, day range, and volume. Supports filtering by exchange and index code, and time period.

Input
ParamTypeDescription
indexstringIndex code to filter by (e.g., 20559 for Nifty 50, 20558 for Sensex)
periodstringTime period: I (Intra Day), W (Week), M (Month)
exchangestringExchange code: NSE or BSE
Response
{
  "type": "object",
  "fields": {
    "items": "array of stock objects with stock_name, symbol, ltp, change, percent_change, day_low, day_high, volume, co_code, isin"
  },
  "sample": {
    "data": {
      "items": [
        {
          "ltp": "198.35",
          "isin": "INE081A01020",
          "change": "-0.96",
          "symbol": "",
          "volume": "38288607",
          "co_code": "566",
          "day_low": "196.05",
          "day_high": "199.35",
          "stock_name": "Tata Steel Ltd",
          "percent_change": "-0.48"
        }
      ]
    },
    "status": "success"
  }
}

About the Hdfcsec API

Market Movers and Activity

get_most_active_nse_stocks, get_top_gainers_nse, and get_top_losers_nse each return arrays of stock objects sorted by volume or percent change. All three accept an exchange param (NSE or BSE), an index code (e.g., 20559 for Nifty 50, 20558 for Sensex), a period flag (I for intraday, W for week, M for month), and an optional limit. Each result includes stock_name, symbol, ltp, change, percent_change, day_low, day_high, volume, co_code, and isin.

52-Week Extremes and Index Overview

get_52_week_high_stocks and get_52_week_low_stocks return stocks currently at their highest or lowest prices over the trailing 52 weeks, with prev_day_high or prev_day_low included for comparison. Both accept an optional index filter and exchange code. get_equity_market_overview lists all available indices for a given exchange, returning index_name, index_code, ltp, change, and percent_change — useful for discovering valid index codes to pass to the other endpoints.

Stock Search and Detailed Quotes

search_stock accepts a free-text query (name or symbol) and returns up to 10 matches, each with stock_name, co_code, ltp, change, percent_change, isin, and exchange. For deeper detail, get_stock_quote takes a trading symbol and returns a single object with fields including open, prev_close, high, low, volume, market_cap, fifty_two_wk_high, pe_ratio, and sector, making it the primary endpoint for per-company fundamental and price data.

Reliability & maintenanceVerified

The Hdfcsec API is a managed, monitored endpoint for hdfcsec.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when hdfcsec.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 hdfcsec.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.

Last verified
4d ago
Latest check
8/8 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a live NSE/BSE market dashboard showing top gainers and losers filtered by Nifty 50 or Sensex index
  • Alert system that monitors get_52_week_high_stocks and get_52_week_low_stocks to notify users of breakout or breakdown events
  • Screen most active stocks by intraday volume using the period=I filter on get_most_active_nse_stocks
  • Portfolio tracker that calls get_stock_quote for each held symbol to display current ltp, market_cap, and pe_ratio
  • Index discovery tool that uses get_equity_market_overview to enumerate all available BSE and NSE indices and their current values
  • Stock autocomplete search widget backed by search_stock returning ISIN and exchange for each match
  • Weekly performance report comparing percent_change across gainers and losers using the period=W parameter
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo1005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 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.

Frequently asked questions
Does HDFC Securities offer an official developer API?+
HDFC Securities does not publish a public developer API or API documentation for external developers. Market data access is available through their trading platform and SmartAPI (offered by Angel One), but HDFC Securities itself has no documented third-party API program.
How do I find the correct index code to filter endpoints like `get_top_gainers_nse`?+
Call get_equity_market_overview with your target exchange (NSE or BSE). The response returns an array of index objects each containing index_name and index_code. Pass that index_code value to the index parameter on any of the movers or 52-week endpoints.
Does `get_stock_quote` return historical OHLCV data or only the current quote?+
It returns only the current snapshot: fields like open, high, low, ltp, prev_close, and volume reflect the current trading session. Historical candlestick or OHLCV series data is not covered by any endpoint in this API. You can fork it on Parse and revise to add a historical data endpoint if that coverage is needed.
Is derivatives or F&O (futures and options) data available?+
No derivatives, futures, or options data is currently exposed. The API covers equity cash-market data: price quotes, market movers, 52-week ranges, and index overviews for NSE and BSE. You can fork it on Parse and revise to add F&O-specific endpoints.
How many results does `search_stock` return, and can that be increased?+
Results are capped at 10 matches per query. There is no pagination or limit parameter for this endpoint. If you need broader search coverage, you can fork the API on Parse and revise the endpoint to adjust the result handling.
Page content last updated . Spec covers 8 endpoints from hdfcsec.com.
Related APIs in FinanceSee all →
nseindia.com API
Track live NSE stock prices, monitor indices, analyze option chains, and access corporate announcements with real-time market data from India's National Stock Exchange. View equity quotes with full order books, identify top gainers/losers, analyze 52-week highs/lows, and explore historical price trends all in structured JSON format.
bseindia.com API
Retrieve live BSE India market data including top gainers and losers, 52-week highs and lows, bulk deals, and block deals for the most recent trading day.
nepalstock.com.np API
Access real-time stock prices, market indices, and trading data from Nepal's stock exchange (NEPSE). Retrieve live price updates, market summaries, top performers, and detailed information on listed securities.
stockanalysis.com API
Access comprehensive stock market data including real-time financials, income statements, statistics, and IPO calendars to research individual stocks and identify market movers. Search stocks, view detailed overviews, and monitor premarket activity all in structured, easy-to-use format.
niftyindices.com API
niftyindices.com API
nasdaq.com API
Track real-time and historical stock prices, ETF and mutual fund quotes, cryptocurrency data, and comprehensive company financials including earnings, dividends, and SEC filings all from one source. Research market trends with institutional holdings, short interest data, retail trading activity, and market movers to make informed investment decisions.
nepsealpha.com API
Track Nepal's stock market in real-time with live prices, historical OHLCV data, and detailed sector summaries, while leveraging technical and fundamental analysis signals to make informed trading decisions. Monitor floorsheet transactions, assess investment risks, and search specific symbols all from a single comprehensive market data platform.
kotaksecurities.com API
Access mutual fund listings, NAV data, holdings, and sector allocations from Kotak Securities. Retrieve brokerage plan details and live market data including major indices and top-gaining stocks.