Instruments and Market Quotes:

MethodsAPIsEndpointDescription
GETInstrument list API (download in json)/scrip-masterRetrive the json dump file for all instruments
GETInstrument list API (download in CSV)/scrip-master/csvRetrive the CSV dump file all instruments
GETExchange wise instrument list API (download in json)/scrip-master/exchangeRetrieve the json dump of instruments in the particular exchange (i.e. nse,bse,nfo,mcx,nsecd)
GETExchange wise instrument list API (download in CSV)/scrip-master/csv/exchangeRetrieve the CSV dump of instruments in the particular exchange (i.e. nse,bse,nfo,mcx,nsecd)
POSTMarket quotes API/quotesRetrive market quotes for one or more instruments
POSTOHLC quotes API/quotes/ohlcRetrive OHLC quotes for one or more instruments
POSTLTP quotes API/quotes/ltpRetrive LTP quotes for one or more instruments

Instruments

There are thousands of different kinds of instruments traded in between multiple exchanges & segments. Any application that facilitates trading needs to have a master list of these instruments. The instruments API provides a consolidated, import-ready CSV or json format list of instruments available for trading.

Fetching the full instrument list:

The instrument list API returns a gzipped CSV or json dump of instruments across all exchanges that can be imported into a database. The dump is generated once every day and hence last_price is not real time.

Sample Response

exchange,market_segment_id,token,symbol,symbol_description,series,instrument_type,option_type,expiry_date,lot_size,strike_price,isin_code,tick_size
NSE,1,17939,HINDCOPPER,HINDUSTAN COPPER LTD,EQ,EQUITIES,,,1,0,INE531E01026,5
BSE,3,535693,BRAHMINFRA,BRAHMAPUTRA INFRASTRUCTUR,X,EQUITIES,,,1,0,INE320I01017,1
NFO,2,79291,INDIAMART,INDIAMART23JUN2120PE,,OPTSTK,PE,28-06-2023,300,212000,,5
NSECD,13,2522,JPYINR,JPYINR2391554.25PE,,OPTCUR,PE,15-09-2023,1000,542500000,,25000
MCX,5,249565,GOLD,GOLD.995,,OPTFUT,CE,26-09-2023,1,5710000,,50

CSV response columns:-

ParametersDescription
exchangeName of the exchange
market_segment_idMarket segment id that instruments belongs to
tokenSymbol token is unique identifier
symbolExchange trading symbol of the instrument
symbol_descriptionTrading symbol description
seriesExchange provided security series
instrument_typeType of contract
option_typeApplicable of options only
expiry_dateExpiry date of contracts(applicable for options only)
lot_sizeQuantity of a single lot
strike_priceSrike price for scrip (applicable for options only)
isin_code12 digit code that assignes to every security issuance
tick_sizeValue of a single

Note:-

  1. For storage, it is recommended to use a combination of exchange and trading symbol as the unique key, not the numeric instrument token. Exchanges may reuse instrument tokens for different derivative instruments after each expiry.
  2. The instrument list API returns large amounts of data. It's good to request it once a day (ideally at around 08:30 AM) and store in a database at your end.

Retrieving full market quotes

This API returns the complete market data screenshot of up to 50 instruments in one go.It includes the last trade time,quantity,volume, average price,OHLC, Open Interest fields and the complete bid/ask market depth amongst others.

Instruments are identified by the “exchange":"exchange_name" and "token":"token of trading symbol" combination and are passed as values to the query parameter which is repeated for every instrument.

Sample Request (Body)

{
  "exchange": "NSE",
  "tokens": ["11536"]
}

Sample Response

{
  "status": "success",
  "data": [
    {
      "exchange": "NSE",
      "token": "11536",
      "last_trade_time": "12/07/2023 11:51:35",
      "last_trade_price": "3267.2",
      "last_trade_quantity": "5",
      "buy_quantity": "269",
      "buy_price": "3267.2",
      "sell_quantity": "2",
      "sell_price": "3267.3",
      "volume": "536535",
      "average_price": "3268.53",
      "open_interest": "0",
      "net_change_price": "-5.20000000000027",
      "percent_change": "-0.16",
      "ohlc": {
        "open": "3280.95",
        "high": "3289.15",
        "low": "3260",
        "close": "3272.4"
      },
      "depth": {
        "buy": [
          {
            "price": "3267.2",
            "quantity": "269",
            "orders": "1"
          },
          {
            "price": "3266.15",
            "quantity": "1",
            "orders": "1"
          },
          {
            "price": "3266.1",
            "quantity": "36",
            "orders": "2"
          },
          {
            "price": "3266.05",
            "quantity": "29",
            "orders": "4"
          },
          {
            "price": "3266",
            "quantity": "1",
            "orders": "1"
          }
        ],
        "sell": [
          {
            "price": "3267.3",
            "quantity": "2",
            "orders": "2"
          },
          {
            "price": "3267.5",
            "quantity": "1",
            "orders": "1"
          },
          {
            "price": "3267.55",
            "quantity": "27",
            "orders": "1"
          },
          {
            "price": "3267.6",
            "quantity": "10",
            "orders": "1"
          },
          {
            "price": "3267.7",
            "quantity": "13",
            "orders": "1"
          }
        ]
      }
    }
  ]
}

Response parameters

ParametersDescriptions
exchangeExchange name
tokenThe numerical identifier issued by the exchange representing the instrument
last_trade_timeLast trade timestamp
last_trade_priceLast traded market price
last_trade_quantityLast traded quantity
buy_quantityTotal quantity of buy orders pending at the exchange
buy_priceBuy price
sell_quantityTotal quantity of sell orders pending at the exchange
sell_priceSell price
volumeVolume traded today
average_priceThe volume weighted average price of a stock at a given time during the day
open_interestTotal number of outstanding contracts held by market participants exchange-wide (only F&O)
net_change_priceThe absolute change from yesterday's close to last traded price
percent_changeThe net change from yesterday's close to last traded price
ohlc.openPrice at market opening
ohlc.highHighest price today
ohlc.lowLowest price today
ohlc.closeClosing price of the instrument from the last trading day
depth.buy_pricePrice at which the depth stands
depth.buy_quantityNet quantity from the pending orders
depth.buy_ordersNumber of open BUY (bid) orders at the price
depth.sell_pricePrice at which the depth stands
depth.sell_quantityNet quantity from the pending orders
depth.sell_ordersNumber of open SELL (ask) orders at the price

Retrieving OHLC quotes

This API returns the OHLC + LTP snapshots of up to 50 instruments in one go.

Instruments are identified by the “exchange":"exchange_name" and "token":"token of trading symbol" combination and are passed as values to the query parameter which is repeated for every instrument.

Sample Request (Body)

{
  "exchange": "NSE",
  "tokens": ["11536"]
}

Sample Response

{
  "status": "success",
  "data": [
    {
      "exchange": "NSE",
      "token": "11536",
      "last_trade_time": "12/07/2023 11:51:44",
      "last_trade_price": "3267.3",
      "volume": "536558",
      "net_change_price": "-5.09999999999991",
      "percent_change": "-0.16",
      "ohlc": {
        "open": "3280.95",
        "high": "3289.15",
        "low": "3260",
        "close": "3272.4"
      }
    }
  ]
}

Response Parameters

ParametersDescriptions
exchangeExchange name
tokenThe numerical identifier issued by the exchange representing the instrument
last_trade_timeLast trade timestamp
last_trade_priceLast traded market price
volumeVolume traded today
net_change_priceThe absolute change from yesterday's close to last traded price
percent_changeThe net change from yesterday's close to last traded price
ohlc.openPrice at market opening
ohlc.highHighest price today
ohlc.lowLowest price today
ohlc.closeClosing price of the instrument from the last trading day

Retrieving LTP quotes

This API returns the LTPs of up to 50 instruments in one go.

Instruments are identified by the “exchange":"exchange_name" and "token":"token of trading symbol" combination and are passed as values to the query parameter which is repeated for every instrument.

Sample Request (Body)

{
  "exchange": "NSE",
  "tokens": ["11536"]
}

Sample Response

{
  "status": "success",
  "data": [
    {
      "exchange": "NSE",
      "token": "11536",
      "last_trade_price": "3266.4",
      "volume": "536919",
      "net_change_price": "-6",
      "percent_change": "-0.18"
    }
  ]
}

Response Parameters

ParametersDescriptions
exchangeExchange name
tokenThe numerical identifier issued by the exchange representing the instrument
last_trade_priceLast traded market price
volumeVolume traded today
net_change_priceThe absolute change from yesterday's close to last traded price
percent_changeThe net change from yesterday's close to last traded price