I have following script for stock data...
import pandas as pd
import requests
import json
baseurl = "https://www.nseindia.com/"
url = f'https://www.nseindia.com/api/quote-derivative?symbol=ACC'
headers = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, ''like Gecko) ''Chrome/80.0.3987.149 Safari/537.36','accept-language': 'en,gu;q=0.9,hi;q=0.8', 'accept-encoding': 'gzip, deflate, br'}
session = requests.Session()
request = session.get(baseurl, headers=headers, timeout=30)
cookies = dict(request.cookies)
res = session.get(url, headers=headers, timeout=30, cookies=cookies)
data = res.json()
print(data)
Here I want to fetch "totalBuyQuantity" and "totalSellQuantity" for stock future for current expiry (27 Oct 2022). How to get that plz ???