def getLTP(symbol):
#url = "https://api.upstox.com/v2/market-quote/quotes"
url = "https://api.upstox.com/v2/feed/market-data-feed"
params={
'symbol' : symbol #'NSE_INDEX|Nifty 50'
}
headers = {
'Accept': 'application/json',
'Api-Version' : '2.0',
'Authorization' : f'Bearer {access_token}'
}
requestpost = requests.request("GET", url, headers=headers, params=params)
response = requestpost.json()
df = pd.DataFrame(response['data']).transpose()
return df
price = getLTP(‘NSE_INDEX’)
response :
InvalidSchema: No connection adapters were found for ‘wss://wsfeeder-api.upstox.com/market-data-feeder/v2/upstox-developer-api/feeds?requestId=9c75ff1a-caab-4241-a227-5134afefab38&code=b7QUa-8b66bf0e-1f17-442e-abae-fefc766027c4’
It is working fine for quotes. but not working for websocket. and in market quotes it is not giving volume for the index. what should i do