Skip to content

Instantly share code, notes, and snippets.

View ranjanprj's full-sized avatar

ranjanprj ranjanprj

  • Pune
View GitHub Profile
@j-thepac
j-thepac / India StockExchange Api.py
Last active November 4, 2024 19:05
Requests and Cookies with Example of NSE - Stock Exchange
# Session Management with API
import requests,httpx
def bse():
reqUrl = "https://api.bseindia.com/RealTimeBseIndiaAPI/api/GetSensexData/w"
headersList = {"Referer": "https://www.bseindia.com/" }
response = requests.GET(reqUrl, headers=headersList)
print(response.text)