The documentation is relatively free flowing, NSE throws a lot of data which might not be relevant or may be repetitive. Please feel free to skip sections not relevant to you.
If you are a beginner in Python, I highly recommend you to master concepts in dictionaries and lists, because often you’ll have often have to filter out information from heaps of data you receive.
from jugaad_data.nse import NSELive
n = NSELive()
status = n.market_status()
status['marketState']
[{'market': 'Capital Market',
'marketStatus': 'Close',
'tradeDate': '22-Dec-2023 15:30',
'index': 'NIFTY 50',
'last': 21349.4,
'variation': 94.35000000000218,
'percentChange': 0.44,
'marketStatusMessage': 'Market is Closed'},
{'market': 'Currency',
'marketStatus': 'Close',
'tradeDate': 'Invalid date',
'index': '',
'last': '',
'variation': '',
'percentChange': '',
'marketStatusMessage': 'Market is Closed'},
{'market': 'Commodity',
'marketStatus': 'Close',
'tradeDate': 'Invalid date',
'index': '',
'last': '',
'variation': '',
'percentChange': '',
'marketStatusMessage': 'Market is Closed'},
{'market': 'Debt',
'marketStatus': 'Close',
'tradeDate': 'Invalid date',
'index': '',
'last': '',
'variation': '',
'percentChange': '',
'marketStatusMessage': 'Market is Closed'},
{'market': 'currencyfuture',
'marketStatus': 'Close',
'tradeDate': 'Invalid date',
'index': '',
'last': '83.1650',
'variation': '',
'percentChange': '',
'marketStatusMessage': 'Market is Closed',
'expiryDate': '27-Dec-2023',
'underlying': 'USDINR',
'updated_time': '22-Dec-2023 17:00',
'tradeDateFormatted': '22-Dec-2023 17:00',
'slickclass': 'slick-item'}]
all_indices = n.all_indices()
all_indices.keys()
dict_keys(['data', 'timestamp', 'advances', 'declines', 'unchanged', 'dates', 'date30dAgo', 'date365dAgo'])
data
contains multiple indices, let’s look at first one. Most of the fields are self explanatory.
all_indices['timestamp']
'25-Jan-2021 15:30:00'
all_indices['data'][0]
{'key': 'BROAD MARKET INDICES',
'index': 'NIFTY 50',
'indexSymbol': 'NIFTY 50',
'last': 14238.9,
'variation': -133,
'percentChange': -0.93,
'open': 14477.8,
'high': 14491.1,
'low': 14218.6,
'previousClose': 14371.9,
'yearHigh': 14753.55,
'yearLow': 7511.1,
'pe': '38.42',
'pb': '4.04',
'dy': '1.11',
'declines': '31',
'advances': '18',
'unchanged': '1',
'perChange365d': 17.49,
'date365dAgo': '27-Jan-2020',
'chart365dPath': 'https://static.nseindia.com/sparklines/365d/NIFTY-50.jpg',
'date30dAgo': '24-Dec-2020',
'perChange30d': 3.56,
'chart30dPath': 'https://static.nseindia.com/sparklines/30d/NIFTY-50.jpg',
'chartTodayPath': 'https://static.nseindia.com/sparklines/today/NIFTY-50.jpg',
'previousDay': 14371.9,
'oneWeekAgo': 14644.7,
'oneMonthAgo': 13749.25,
'oneYearAgo': 12119}
Lets look at all the indices available and its value
for idx in all_indices['data']:
print("{} - {}".format(idx['index'], idx['last']))
NIFTY 50 - 14238.9
NIFTY NEXT 50 - 33080.45
NIFTY 100 - 14348.45
NIFTY 200 - 7373.3
NIFTY 500 - 11743.7
NIFTY MIDCAP 50 - 6183.6
NIFTY MIDCAP 100 - 21455.2
NIFTY SMALLCAP 100 - 7261.6
INDIA VIX - 23.245
NIFTY MIDCAP 150 - 8064.3
NIFTY SMALLCAP 50 - 3700.45
NIFTY SMALLCAP 250 - 6199.7
NIFTY MIDSMALLCAP 400 - 7397.6
NIFTY BANK - 31198.4
NIFTY AUTO - 10433.5
NIFTY FINANCIAL SERVICES - 15143.65
NIFTY FINANCIAL SERVICES 25/50 - 14784.65
NIFTY FMCG - 34178.6
NIFTY IT - 26023.3
NIFTY MEDIA - 1680.05
NIFTY METAL - 3236.35
NIFTY PHARMA - 12756.75
NIFTY PSU BANK - 1843.9
NIFTY PRIVATE BANK - 17043.9
NIFTY REALTY - 317.9
NIFTY DIVIDEND OPPORTUNITIES 50 - 2951.75
NIFTY GROWTH SECTORS 15 - 7005.45
NIFTY100 QUALITY 30 - 3382.6
NIFTY50 VALUE 20 - 7191.75
NIFTY50 TR 2X LEVERAGE - 8335.25
NIFTY50 PR 2X LEVERAGE - 6271.5
NIFTY50 TR 1X INVERSE - 268.1
NIFTY50 PR 1X INVERSE - 308.95
NIFTY50 DIVIDEND POINTS - 85.33
NIFTY ALPHA 50 - 19835.45
NIFTY50 EQUAL WEIGHT - 15129.25
NIFTY100 EQUAL WEIGHT - 16011.6
NIFTY100 LOW VOLATILITY 30 - 11114.7
NIFTY200 QUALITY 30 - 12614.25
NIFTY ALPHA LOW-VOLATILITY 30 - 13929.4
NIFTY200 MOMENTUM 30 - 13932.3
NIFTY COMMODITIES - 3846.2
NIFTY INDIA CONSUMPTION - 6087.35
NIFTY CPSE - 1607.75
NIFTY ENERGY - 16772.3
NIFTY INFRASTRUCTURE - 3801.75
NIFTY100 LIQUID 15 - 3405.1
NIFTY MIDCAP LIQUID 15 - 5527.55
NIFTY MNC - 16075
NIFTY PSE - 2793.6
NIFTY SERVICES SECTOR - 20024.3
NIFTY100 ESG SECTOR LEADERS - 2470.8
NIFTY 8-13 YR G-SEC - 2254.14
NIFTY 10 YR BENCHMARK G-SEC - 2030.98
NIFTY 10 YR BENCHMARK G-SEC (CLEAN PRICE) - 963.09
NIFTY 4-8 YR G-SEC INDEX - 2396.47
NIFTY 11-15 YR G-SEC INDEX - 2431.49
NIFTY 15 YR AND ABOVE G-SEC INDEX - 2703.59
NIFTY COMPOSITE G-SEC INDEX - 2295.32
Advances and declines
print(all_indices['advances'], all_indices['declines'])
816 1976
NSELive
is the main class which holds all the methods to fetch live data. Let’s import and create an instance of the same (this step is common across all threads for live data)
nifty = n.live_index("NIFTY 50")
Lets look at different attributes available
nifty.keys()
dict_keys(['name', 'advance', 'timestamp', 'data', 'metadata', 'marketStatus', 'date30dAgo', 'date365dAgo'])
Name of the index
nifty['name']
'NIFTY 50'
Time stamp of last traded price (It’ll change contineously when market is live)
nifty['timestamp']
'25-Jan-2021 16:00:00'
Status of the market, it also provides last value of index along with change and percentage change.
nifty['marketStatus']
{'market': 'Capital Market',
'marketStatus': 'Closed',
'tradeDate': '27-Jan-2021',
'index': 'NIFTY 50',
'last': 14238.9,
'variation': -133,
'percentChange': -0.93,
'marketStatusMessage': 'Normal Market has Closed'}
Now coming to the most important information, the price information. Most of the field names are self explanatory.
nifty['data'][0]
{'priority': 1,
'symbol': 'NIFTY 50',
'identifier': 'NIFTY 50',
'open': 14477.8,
'dayHigh': 14491.1,
'dayLow': 14218.6,
'lastPrice': 14238.9,
'previousClose': 14371.9,
'change': -133,
'pChange': -0.93,
'ffmc': 613970256.48,
'yearHigh': 14753.55,
'yearLow': 7511.1,
'totalTradedVolume': 618631493,
'totalTradedValue': 422780289981.22,
'lastUpdateTime': '25-Jan-2021 16:00:00',
'nearWKH': 3.488312982299173,
'nearWKL': -89.57143427726962,
'perChange365d': 17.49,
'date365dAgo': '27-Jan-2020',
'chart365dPath': 'https://static.nseindia.com/sparklines/365d/NIFTY-50.jpg',
'date30dAgo': '24-Dec-2020',
'perChange30d': 3.56,
'chart30dPath': 'https://static.nseindia.com/sparklines/30d/NIFTY-50.jpg',
'chartTodayPath': 'https://static.nseindia.com/sparklines/today/NIFTY-50.jpg'}
Number of stocks advanced, declined or unchanged
nifty['advance']
{'declines': '31', 'advances': '18', 'unchanged': '1'}
The same pricing information is repeated in metadata
nifty['metadata']
{'indexName': 'NIFTY 50',
'open': 14477.8,
'high': 14491.1,
'low': 14218.6,
'previousClose': 14371.9,
'last': 14238.9,
'percChange': -0.93,
'change': -133,
'timeVal': '25-Jan-2021 15:33:22',
'yearHigh': 14753.55,
'yearLow': 7511.1,
'totalTradedVolume': 618631493,
'totalTradedValue': 422780289981.22,
'ffmc_sum': 613970256.48}
turnover = n.market_turnover()
# Turnovers across different segments
for t in turnover['data']:
print("{} - {}".format(t['name'], t['today']))
Equities - {'volume': 3084758529, 'value': 741716707310.68, 'oivalue': None, 'date': '25-Jan-2021 15:30:00'}
Index Futures - {'volume': 546588, 'value': 500538458452.75, 'oivalue': 272925, 'date': '25-Jan-2021 15:30:00'}
Index Options - {'volume': 33300559, 'value': 165917919231.25, 'oivalue': 3038888, 'date': '25-Jan-2021 15:30:00'}
Stock Futures - {'volume': 1926757, 'value': 1603202243634.3499, 'oivalue': 1630178, 'date': '25-Jan-2021 15:30:00'}
Stock Options - {'volume': 2858181, 'value': 28906841458.09998, 'oivalue': 1214706.9417301659, 'date': '25-Jan-2021 15:30:00'}
Currency Futures - {'volume': 4732718, 'value': 362084763650.99994, 'oivalue': 11470665, 'date': '25-Jan-2021 17:00:00'}
Currency Options - {'volume': 3736045, 'value': 572559597.5, 'oivalue': 5041278, 'date': '25-Jan-2021 17:00:00'}
Commodity Futures - {'volume': 164, 'value': 158842160, 'oivalue': 69, 'date': '25-Jan-2021 23:46:59'}
Commodity Options - {'volume': 4055, 'value': 10591805, 'oivalue': 722, 'date': '25-Jan-2021 23:19:08'}
Interest Rate Futures - {'volume': 27105, 'value': 5345329230, 'oivalue': 50880, 'date': '25-Jan-2021 17:00:00'}
Interest Rate Options - {}
q = n.stock_quote("HDFC")
q['priceInfo']
{'lastPrice': 2560,
'change': -29.449999999999818,
'pChange': -1.137307150167017,
'previousClose': 2589.45,
'open': 2630.45,
'close': 2551.4,
'vwap': 2611.45,
'lowerCP': '2330.55',
'upperCP': '2848.35',
'pPriceBand': 'No Band',
'basePrice': 2589.45,
'intraDayHighLow': {'min': 2543, 'max': 2670, 'value': 2560},
'weekHighLow': {'min': 1473.45,
'minDate': '24-Mar-2020',
'max': 2777.15,
'maxDate': '13-Jan-2021',
'value': 2560}}
General information on stock
q['info']
{'symbol': 'HDFC',
'companyName': 'Housing Development Finance Corporation Limited',
'industry': 'FINANCE - HOUSING',
'activeSeries': ['EQ', 'W3'],
'debtSeries': [],
'tempSuspendedSeries': ['W1', 'W2'],
'isFNOSec': True,
'isCASec': False,
'isSLBSec': True,
'isDebtSec': False,
'isSuspended': False,
'isETFSec': False,
'isDelisted': False,
'isin': 'INE001A13049',
'isTop10': False,
'identifier': 'HDFCEQN'}
Stock metadata
q['metadata']
{'series': 'EQ',
'symbol': 'HDFC',
'isin': 'INE001A01036',
'status': 'Listed',
'listingDate': '23-Oct-1996',
'industry': 'HOUSING FINANCE',
'lastUpdateTime': '25-Jan-2021 16:00:00',
'pdSectorPe': 30.46,
'pdSymbolPe': 0,
'pdSectorInd': 'NIFTY FINANCIAL SERVICES '}
Security info
q['securityInfo']
{'boardStatus': 'Main',
'tradingStatus': 'Active',
'tradingSegment': 'Normal Market',
'sessionNo': '-',
'slb': 'Yes',
'classOfShare': 'Equity',
'derivatives': 'Yes',
'surveillance': '-',
'faceValue': 2,
'issuedCap': 1800191002}
Pre-open markets
q['preOpenMarket']
{'preopen': [{'price': 2330.55, 'buyQty': 0, 'sellQty': 57},
{'price': 2400, 'buyQty': 0, 'sellQty': 7},
{'price': 2408.2, 'buyQty': 0, 'sellQty': 253},
{'price': 2449, 'buyQty': 0, 'sellQty': 10},
{'price': 2630.45, 'buyQty': 0, 'sellQty': 0, 'iep': True},
{'price': 2705.95, 'buyQty': 306, 'sellQty': 0},
{'price': 2710.5, 'buyQty': 8864, 'sellQty': 0},
{'price': 2718.9, 'buyQty': 16076, 'sellQty': 0},
{'price': 2750, 'buyQty': 100, 'sellQty': 0}],
'ato': {'buy': 1329, 'sell': 169},
'IEP': 2630.45,
'totalTradedVolume': 51122,
'finalPrice': 0,
'finalQuantity': 0,
'lastUpdateTime': '25-Jan-2021 09:07:41',
'totalBuyQuantity': 79071,
'totalSellQuantity': 58736,
'atoBuyQty': 1329,
'atoSellQty': 169}
tick_data = n.tick_data("HDFC")
tick_data['grapthData'][0:10]
[[1611566100000, 2635],
[1611566101000, 2636.25],
[1611566102000, 2634.65],
[1611566103000, 2634.75],
[1611566104000, 2633.65],
[1611566105000, 2633.3],
[1611566106000, 2642.1],
[1611566107000, 2642.55],
[1611566108000, 2647],
[1611566109000, 2657.6]]
trade_info = n.trade_info("HDFC")
trade_info
{'noBlockDeals': True,
'bulkBlockDeals': [{'name': 'Session I'}, {'name': 'Session II'}],
'marketDeptOrderBook': {'totalBuyQuantity': 1602,
'totalSellQuantity': 0,
'bid': [{'price': 2551.4, 'quantity': 1602},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0}],
'ask': [{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0},
{'price': 0, 'quantity': 0}],
'tradeInfo': {'totalTradedVolume': 7761405,
'totalTradedValue': 202685.21,
'totalMarketCap': 46084889.65,
'ffmc': 45851691.180862,
'impactCost': 0.02},
'valueAtRisk': {'securityVar': 15.94,
'indexVar': 0,
'varMargin': 15.94,
'extremeLossMargin': 3.5,
'adhocMargin': 6.43,
'applicableMargin': 25.87}},
'securityWiseDP': {'quantityTraded': 7761405,
'deliveryQuantity': 5387037,
'deliveryToTradedQuantity': 69.41,
'seriesRemarks': None,
'secWiseDelPosDate': '25-JAN-2021 EOD'}}
option_chain = n.index_option_chain("NIFTY") # Index Option chains
eq_option_chain = n.equities_option_chain("RELIANCE") # Equity option chains
curr_option_chain = n.currency_option_chain("USDINR") # Currency option chains
Fetch expiry dates
option_chain['records']['expiryDates']
['28-Jan-2021',
'04-Feb-2021',
'11-Feb-2021',
'18-Feb-2021',
'25-Feb-2021',
'04-Mar-2021',
'10-Mar-2021',
'18-Mar-2021',
'25-Mar-2021',
'01-Apr-2021',
'24-Jun-2021',
'30-Sep-2021',
'30-Dec-2021',
'30-Jun-2022',
'29-Dec-2022',
'29-Jun-2023',
'26-Jun-2025']
Quick option chain
print("----Index option chain-----")
print("CE\tStrike\tPE")
for option in option_chain['filtered']['data'][80:100]:
print("{}\t{}\t{}".format(option['CE']['lastPrice'], option['strikePrice'], option['PE']['lastPrice']))
---Index option chain-----
CE Strike PE
604 20800 14
558.95 20850 18
509.05 20900 16.7
462 20950 19.95
414.6 21000 24
365.8 21050 27.4
320.1 21100 32.05
282.5 21150 39.95
239 21200 50
203.4 21250 60
167.6 21300 76
135.15 21350 92.55
105 21400 115.55
82.5 21450 140.4
62.55 21500 169.15
45.2 21550 204.45
32.7 21600 244.45
25 21650 284.25
18.7 21700 329.45
15 21750 369.7
print("-----Equity option chain-----")
print("CE\tStrike\tPE")
for option in eq_option_chain['filtered']['data'][30:50]:
print("{}\t{}\t{}".format(option['CE']['lastPrice'], option['strikePrice'], option['PE']['lastPrice']))
---Equity option chain-----
CE Strike PE
122.6 2440 0.6
104.6 2460 0.7
85.6 2480 1.3
65.45 2500 2.65
49.9 2520 5.35
33.6 2540 9.9
22.5 2560 17.5
13.75 2580 30.45
8.4 2600 44.1
4.55 2620 60.15
2.45 2640 77.85
1.75 2660 98
1.2 2680 116.55
1 2700 132
0.7 2720 154.5
0.65 2740 173.5
0.6 2760 179.65
0.5 2780 182.35
0.45 2800 236.15
0.55 2820 247.5
print("----Currency option chain ----")
print("CE\tStrike\tPE")
for option in curr_option_chain['filtered']['data'][10:30]:
print("{}\t{}\t{}".format(option['CE']['lastPrice'], option['strikePrice'], option['PE']['lastPrice']))
----Currency option chain ----
CE Strike PE
0.9075 82.375 0.0025
0.735 82.5 0.0025
0.65 82.625 0.0025
0.485 82.75 0.0025
0.355 82.875 0.0025
0.2325 83 0.0025
0.1075 83.125 0.0025
0.0025 83.25 0.02
0.0025 83.375 0.145
0.0025 83.5 0.27
0.0025 83.625 0.4
0.0025 83.75 0.5175
0.0025 84 0.765
0.0025 84.25 1.18
0 84.5 1.245
0.0025 84.75 0
0.0025 85 0
0 85.25 0
0 85.5 0
0 85.75 0
turnover = n.eq_derivative_turnover()
Let’s look at the top the derivative contracts with highest turnover
for t in turnover['value']:
print("{} \t {}".format(t['identifier'], t['totalTurnover']))
FUTIDXNIFTY28-01-2021XX0.00 1993001.4325575
FUTIDXBANKNIFTY28-01-2021XX0.00 1971646.452105
FUTIDXNIFTY25-02-2021XX0.00 639651.073635
FUTSTKRELIANCE28-01-2021XX0.00 481936.0667
FUTSTKTATAMOTORS28-01-2021XX0.00 411916.428
FUTSTKKOTAKBANK28-01-2021XX0.00 342169.4506
FUTIDXBANKNIFTY25-02-2021XX0.00 317728.786825
FUTSTKHDFCBANK28-01-2021XX0.00 300168.45705
FUTSTKBHARTIARTL28-01-2021XX0.00 297890.25741900003
FUTSTKRELIANCE25-02-2021XX0.00 288693.0396
FUTSTKBAJFINANCE28-01-2021XX0.00 272159.20905
FUTSTKICICIBANK28-01-2021XX0.00 270931.0758
FUTSTKBHARTIARTL25-02-2021XX0.00 247874.5618938
FUTSTKINFY28-01-2021XX0.00 235133.2647
FUTSTKAXISBANK28-01-2021XX0.00 224137.1448
FUTSTKSBIN28-01-2021XX0.00 220771.3536
FUTSTKHDFC28-01-2021XX0.00 211855.64148
FUTSTKTATASTEEL28-01-2021XX0.00 207522.36192
FUTSTKHDFCBANK25-02-2021XX0.00 207458.4039
FUTSTKULTRACEMCO28-01-2021XX0.00 207429.98906
turnover['value'][0]
{'underlying': 'NIFTY',
'identifier': 'FUTIDXNIFTY28-01-2021XX0.00',
'instrumentType': 'FUTIDX',
'instrument': 'Index Futures',
'expiryDate': '28-Jan-2021',
'optionType': '-',
'strikePrice': 0,
'lastPrice': 14254,
'pChange': -0.8772509327093225,
'openPrice': 14475,
'highPrice': 14497.75,
'lowPrice': 14233.6,
'numberOfContractsTraded': 185139,
'totalTurnover': 1993001.4325575,
'premiumTurnover': 199300143255.75,
'openInterest': 127322,
'underlyingValue': 14238.9}
quotes = n.stock_quote_fno("HDFC")
Let’s look at all the contracts avaialbe for HDFC along with their last traded price
for quote in quotes['stocks']:
print("{}\t{}".format(quote['metadata']['identifier'], quote['metadata']['lastPrice']))
FUTSTKHDFC28-01-2021XX0.00 2565.85
FUTSTKHDFC25-02-2021XX0.00 2575.35
OPTSTKHDFC28-01-2021CE2700.00 3.9
OPTSTKHDFC28-01-2021CE2650.00 6
OPTSTKHDFC28-01-2021CE2800.00 1.9
OPTSTKHDFC28-01-2021PE2600.00 43.65
OPTSTKHDFC28-01-2021PE2500.00 9.95
OPTSTKHDFC28-01-2021CE2750.00 2.5
OPTSTKHDFC28-01-2021PE2550.00 22
OPTSTKHDFC28-01-2021CE2680.00 4.3
OPTSTKHDFC28-01-2021CE2660.00 4.6
OPTSTKHDFC28-01-2021CE2600.00 14
OPTSTKHDFC28-01-2021CE2720.00 2.7
OPTSTKHDFC28-01-2021CE2640.00 7
OPTSTKHDFC28-01-2021PE2520.00 12.6
OPTSTKHDFC25-02-2021CE2600.00 100
OPTSTKHDFC28-01-2021PE2560.00 26.4
OPTSTKHDFC28-01-2021PE2450.00 5
OPTSTKHDFC28-01-2021CE2620.00 10
OPTSTKHDFC28-01-2021CE2850.00 1.15
OPTSTKHDFC28-01-2021PE2580.00 29.3
OPTSTKHDFC28-01-2021PE2540.00 17.2
OPTSTKHDFC28-01-2021PE2620.00 65.4
OPTSTKHDFC28-01-2021CE2740.00 2.4
OPTSTKHDFC25-02-2021CE2700.00 64.5
OPTSTKHDFC28-01-2021PE2650.00 91.9
OPTSTKHDFC28-01-2021CE2780.00 1.8
OPTSTKHDFC28-01-2021CE2760.00 2.4
OPTSTKHDFC28-01-2021CE2900.00 0.7
OPTSTKHDFC28-01-2021PE2640.00 80.9
OPTSTKHDFC28-01-2021PE2400.00 1.95
OPTSTKHDFC28-01-2021CE2500.00 71.55
OPTSTKHDFC25-02-2021PE2600.00 128.65
OPTSTKHDFC25-02-2021CE2800.00 41.35
OPTSTKHDFC25-02-2021PE2400.00 48.7
OPTSTKHDFC28-01-2021CE2820.00 1.65
OPTSTKHDFC25-02-2021PE2500.00 81.5
OPTSTKHDFC28-01-2021CE2840.00 1.4
OPTSTKHDFC28-01-2021CE2580.00 21.2
OPTSTKHDFC28-01-2021PE2700.00 140
OPTSTKHDFC28-01-2021CE2880.00 0.5
OPTSTKHDFC28-01-2021CE3000.00 0.55
OPTSTKHDFC28-01-2021CE2550.00 36.5
OPTSTKHDFC28-01-2021PE2660.00 107.2
OPTSTKHDFC28-01-2021CE2860.00 1
OPTSTKHDFC28-01-2021PE2200.00 0.55
OPTSTKHDFC25-02-2021CE2900.00 23.15
OPTSTKHDFC28-01-2021PE2300.00 1.95
OPTSTKHDFC28-01-2021PE2680.00 120.1
OPTSTKHDFC28-01-2021CE2560.00 29.8
OPTSTKHDFC28-01-2021PE2350.00 2
OPTSTKHDFC25-02-2021CE3000.00 16.3
OPTSTKHDFC28-01-2021CE2960.00 1
OPTSTKHDFC28-01-2021CE2200.00 364.4
OPTSTKHDFC25-02-2021CE2650.00 80
OPTSTKHDFC25-02-2021CE2500.00 151
OPTSTKHDFC25-02-2021CE2750.00 52
FUTSTKHDFC25-03-2021XX0.00 2567
OPTSTKHDFC28-01-2021CE2300.00 261.95
OPTSTKHDFC25-02-2021CE2300.00 287
OPTSTKHDFC28-01-2021CE2400.00 157.1
OPTSTKHDFC25-02-2021PE2300.00 25
OPTSTKHDFC28-01-2021PE2000.00 1.25
OPTSTKHDFC25-02-2021CE2850.00 39.9
OPTSTKHDFC28-01-2021PE2750.00 176.45
OPTSTKHDFC28-01-2021CE3100.00 0.5
OPTSTKHDFC25-02-2021PE2200.00 8.5
OPTSTKHDFC28-01-2021PE2100.00 0.55
OPTSTKHDFC28-01-2021CE2450.00 117.35
OPTSTKHDFC28-01-2021CE3060.00 0.65
OPTSTKHDFC25-02-2021PE2550.00 105
OPTSTKHDFC25-02-2021PE2650.00 138.15
OPTSTKHDFC28-01-2021CE2920.00 1
OPTSTKHDFC25-02-2021PE2700.00 161.25
OPTSTKHDFC25-02-2021CE2200.00 374
OPTSTKHDFC25-02-2021CE2400.00 218
OPTSTKHDFC28-01-2021CE1600.00 1045
OPTSTKHDFC28-01-2021PE2800.00 190.45
OPTSTKHDFC28-01-2021PE2720.00 92.3
OPTSTKHDFC25-02-2021PE2000.00 1.95
OPTSTKHDFC28-01-2021CE2000.00 624
OPTSTKHDFC28-01-2021PE2250.00 0.7
OPTSTKHDFC25-02-2021CE3100.00 12.4
OPTSTKHDFC25-02-2021CE2000.00 564
OPTSTKHDFC25-02-2021CE2220.00 440
OPTSTKHDFC28-01-2021CE2100.00 558
OPTSTKHDFC25-02-2021CE2660.00 73.05
OPTSTKHDFC28-01-2021PE2740.00 122.25
OPTSTKHDFC25-02-2021CE2100.00 464.5
OPTSTKHDFC25-02-2021CE2550.00 138.15
OPTSTKHDFC28-01-2021PE2760.00 190
OPTSTKHDFC25-02-2021CE3160.00 15.65
OPTSTKHDFC25-02-2021PE2640.00 154.9
OPTSTKHDFC25-02-2021CE2680.00 69.9
OPTSTKHDFC28-01-2021PE2150.00 0.15
OPTSTKHDFC28-01-2021CE2540.00 0
OPTSTKHDFC25-02-2021CE2720.00 128.3
OPTSTKHDFC28-01-2021PE3120.00 0
OPTSTKHDFC28-01-2021CE2350.00 303.3
OPTSTKHDFC28-01-2021PE2920.00 0
OPTSTKHDFC28-01-2021CE2480.00 203
OPTSTKHDFC28-01-2021PE3000.00 0
OPTSTKHDFC25-02-2021CE2180.00 0
OPTSTKHDFC25-02-2021PE2980.00 0
OPTSTKHDFC28-01-2021PE2820.00 0
OPTSTKHDFC25-02-2021PE3100.00 0
OPTSTKHDFC25-02-2021PE2880.00 0
OPTSTKHDFC25-02-2021PE2450.00 75
OPTSTKHDFC25-02-2021CE2460.00 0
OPTSTKHDFC25-02-2021CE2380.00 0
OPTSTKHDFC28-01-2021PE2840.00 0
OPTSTKHDFC28-01-2021PE1250.00 1
OPTSTKHDFC25-02-2021CE2280.00 0
OPTSTKHDFC28-01-2021CE1700.00 0
OPTSTKHDFC25-02-2021CE2350.00 0
OPTSTKHDFC25-02-2021CE2320.00 0
OPTSTKHDFC25-02-2021CE2250.00 0
OPTSTKHDFC25-02-2021PE2840.00 0
OPTSTKHDFC25-02-2021CE2150.00 0
OPTSTKHDFC25-02-2021CE2620.00 172.8
OPTSTKHDFC25-02-2021PE2900.00 0
OPTSTKHDFC28-01-2021PE2480.00 42.55
OPTSTKHDFC25-02-2021PE2580.00 0
OPTSTKHDFC25-02-2021PE2680.00 0
OPTSTKHDFC25-02-2021CE2640.00 0
OPTSTKHDFC28-01-2021PE3060.00 0
OPTSTKHDFC25-02-2021CE2160.00 0
OPTSTKHDFC28-01-2021CE1800.00 870
OPTSTKHDFC28-01-2021PE3020.00 0
OPTSTKHDFC28-01-2021PE2880.00 0
OPTSTKHDFC28-01-2021PE2940.00 0
OPTSTKHDFC28-01-2021PE2860.00 0
OPTSTKHDFC25-02-2021CE2260.00 0
OPTSTKHDFC25-02-2021CE2420.00 0
OPTSTKHDFC25-02-2021PE3020.00 0
OPTSTKHDFC25-02-2021CE2480.00 0
OPTSTKHDFC25-02-2021CE2880.00 0
OPTSTKHDFC28-01-2021CE2360.00 0
OPTSTKHDFC28-01-2021CE2050.00 399.95
OPTSTKHDFC28-01-2021PE2960.00 0
OPTSTKHDFC25-02-2021PE2760.00 0
OPTSTKHDFC25-02-2021CE2360.00 0
OPTSTKHDFC25-02-2021PE2960.00 0
OPTSTKHDFC28-01-2021PE2900.00 300
OPTSTKHDFC28-01-2021CE2520.00 95.3
OPTSTKHDFC28-01-2021CE1750.00 0
OPTSTKHDFC28-01-2021CE1400.00 0
OPTSTKHDFC28-01-2021CE1350.00 0
OPTSTKHDFC25-02-2021PE2050.00 2.3
OPTSTKHDFC28-01-2021CE1650.00 0
OPTSTKHDFC25-02-2021PE2250.00 0
OPTSTKHDFC25-02-2021PE2560.00 0
OPTSTKHDFC28-01-2021PE3100.00 0
OPTSTKHDFC28-01-2021PE3040.00 0
OPTSTKHDFC25-02-2021PE2350.00 0
OPTSTKHDFC28-01-2021CE2460.00 0
OPTSTKHDFC28-01-2021CE2420.00 0
OPTSTKHDFC25-02-2021PE3000.00 430.95
OPTSTKHDFC28-01-2021CE2340.00 0
OPTSTKHDFC28-01-2021CE2320.00 0
OPTSTKHDFC28-01-2021PE2780.00 139
OPTSTKHDFC25-02-2021PE2800.00 230
OPTSTKHDFC28-01-2021CE2380.00 0
OPTSTKHDFC28-01-2021CE2150.00 0
OPTSTKHDFC25-02-2021PE2850.00 0
OPTSTKHDFC25-02-2021CE2340.00 0
OPTSTKHDFC25-02-2021PE3040.00 0
OPTSTKHDFC28-01-2021CE2280.00 0
OPTSTKHDFC28-01-2021PE2980.00 0
OPTSTKHDFC28-01-2021PE1600.00 1
OPTSTKHDFC28-01-2021PE2850.00 191.85
OPTSTKHDFC25-02-2021PE3160.00 0
OPTSTKHDFC28-01-2021CE2940.00 3.1
OPTSTKHDFC28-01-2021PE3160.00 0
OPTSTKHDFC28-01-2021PE3140.00 0
OPTSTKHDFC25-02-2021PE3080.00 0
OPTSTKHDFC28-01-2021PE3080.00 0
OPTSTKHDFC25-02-2021PE2940.00 0
OPTSTKHDFC28-01-2021CE2980.00 1.2
OPTSTKHDFC25-02-2021PE2620.00 76.9
OPTSTKHDFC25-02-2021CE2240.00 0
OPTSTKHDFC28-01-2021CE2260.00 0
OPTSTKHDFC25-02-2021PE2780.00 0
OPTSTKHDFC28-01-2021CE2240.00 0
OPTSTKHDFC25-02-2021PE2740.00 0
OPTSTKHDFC28-01-2021CE2220.00 0
OPTSTKHDFC28-01-2021CE2180.00 0
OPTSTKHDFC28-01-2021CE2160.00 0
OPTSTKHDFC25-02-2021PE3120.00 0
OPTSTKHDFC25-02-2021PE2720.00 0
OPTSTKHDFC25-02-2021PE3140.00 0
OPTSTKHDFC28-01-2021CE2250.00 363
OPTSTKHDFC25-02-2021PE2920.00 0
OPTSTKHDFC25-02-2021PE2660.00 0
OPTSTKHDFC28-01-2021CE2440.00 0
OPTSTKHDFC28-01-2021PE1450.00 0.25
OPTSTKHDFC25-02-2021PE2820.00 0
OPTSTKHDFC25-02-2021PE2860.00 0
OPTSTKHDFC25-02-2021PE3060.00 0
OPTSTKHDFC28-01-2021CE3160.00 4.8
OPTSTKHDFC25-02-2021CE2740.00 100.4
OPTSTKHDFC25-03-2021PE2460.00 80
OPTSTKHDFC25-02-2021CE2540.00 0
OPTSTKHDFC25-02-2021CE2520.00 0
OPTSTKHDFC25-02-2021PE2520.00 77
OPTSTKHDFC25-02-2021CE2440.00 0
Let’s look at what information is available for each contract individually.
quotes['stocks'][0]
{'metadata': {'instrumentType': 'Stock Futures',
'expiryDate': '28-Jan-2021',
'optionType': '-',
'strikePrice': 0,
'identifier': 'FUTSTKHDFC28-01-2021XX0.00',
'openPrice': 2635.15,
'highPrice': 2677.75,
'lowPrice': 2550.1,
'closePrice': 2559.5,
'prevClose': 2595.2,
'lastPrice': 2565.85,
'change': -29.34999999999991,
'pChange': -1.1309340320591827,
'numberOfContractsTraded': 26898,
'totalTurnover': 211855.64},
'underlyingValue': 2560,
'volumeFreezeQuantity': 0,
'marketDeptOrderBook': {'totalBuyQuantity': 51600,
'totalSellQuantity': 284100,
'bid': [{'price': 2564.5, 'quantity': 300},
{'price': 2564.45, 'quantity': 300},
{'price': 2564.1, 'quantity': 300},
{'price': 2564, 'quantity': 300},
{'price': 2563.4, 'quantity': 300}],
'ask': [{'price': 2567.9, 'quantity': 300},
{'price': 2564.45, 'quantity': 900},
{'price': 2568, 'quantity': 300},
{'price': 2568.25, 'quantity': 300},
{'price': 2568.3, 'quantity': 300}],
'carryOfCost': {'price': {'bestBuy': 2564.5,
'bestSell': 2567.9,
'lastPrice': 2565.85},
'carry': {'bestBuy': 64.10383148359519,
'bestSell': 112.46328053425722,
'lastPrice': 83.31304767247387}},
'tradeInfo': {'tradedVolume': 26898,
'value': 211855.64,
'vmap': 2625.42,
'premiumTurnover': 211855.64148,
'openInterest': 38711,
'changeinOpenInterest': -12922,
'pchangeinOpenInterest': -25.02663025584413,
'marketLot': 300},
'otherInfo': {'settlementPrice': 2559.5,
'dailyvolatility': 2.47,
'annualisedVolatility': 47.1,
'impliedVolatility': 0,
'clientWisePositionLimits': 0,
'marketWidePositionLimits': 359161186}}}