Skip to content

Instruments

This endpoint provides a downloadable CSV file containing a list of all tradable instruments and their properties for a given market segment. This is essential for fetching the correct security_id to be used in other API calls, such as placing orders or subscribing to market data feeds.

Request Type Path Description
GET /market/instruments Fetches the CSV file for a specific market segment.

Get Instrument List

Retrieves a CSV file (often called a scrip master or instrument master) containing all tradable symbols for the specified segment.

Endpoint

Text Only
GET /market/instruments

Query Parameters

Parameter Description
source The market segment for which to fetch instruments.
Enum: equity, fno, index

Example Request

Bash
curl --location 'https://api.indstocks.com/market/instruments?source=fno' \
--header 'Authorization: YOUR_ACCESS_TOKEN' \
--output instruments.csv

Note

The response for this endpoint is not JSON, but a raw CSV file. The example above shows how to save it directly to a file named instruments.csv using the --output flag in curl.

CSV File Structure

The downloaded file will contain the following columns:

Column Name Description
EXCH The exchange identifier (e.g., NSE, BSE).
SEGMENT The market segment (e.g., E for Equity, FNO).
SECURITY_ID The unique ID for the instrument.
INSTRUMENT_NAME The type of instrument (e.g., EQUITY, FUTCUR).
EXPIRY_CODE Numeric code for the expiry; 0 for non-derivatives.
TRADING_SYMBOL The symbol used for trading on the exchange.
LOT_UNITS The lot size for F&O contracts.
CUSTOM_SYMBOL A more descriptive symbol for the instrument.
EXPIRY_DATE The expiry date for derivative contracts.
STRIKE_PRICE The strike price for options contracts.
OPTION_TYPE The option type (CE for Call, PE for Put).
TICK_SIZE The minimum price movement for the instrument.
EXPIRY_FLAG Flag indicating expiry type (e.g., M for monthly).
SEM_EXCH_INSTRUMENT_TYPE The instrument type as defined by the exchange.
SERIES The series code (e.g., EQ).
SYMBOL_NAME The base symbol name (e.g., HDFCBANK).

source=index returns a different, three-column file

The 16-column structure above applies to source=equity and source=fno. The index file is three columns onlyEXCH, SEGMENT, SECURITY_ID — for example:

Text Only
EXCH,SEGMENT,SECURITY_ID
NSE,NIFTY 50,40000001
NSE,NIFTY IT,40000004
BSE,BSE Focused IT,40000129

Be aware that in this file the second column is labelled SEGMENT but contains the index name, so parsing it by header name is misleading. Read it positionally.

Getting an underlying's SECURITY_ID for the option chain

The Option Chain endpoint's underlying-scrip parameter takes the SECURITY_ID of the underlying, which you look up here:

  • Index underlyingsource=index (e.g. 40000001 for NIFTY 50)
  • Stock underlyingsource=equity, using the cash-market row (e.g. 2885 for RELIANCE on NSE)

Do not use a SECURITY_ID from source=fno — those identify individual option and futures contracts, not the underlying.


See Also