Hi i have been trying to recreate the Trin strategy in indian context with nse data.But i am facing some difficulties in getting the data live from market.To solve this i am using a screner from the broker alice blue.But again even though i am getting the data i am unable to convert it into pandas dataframe.I am sharing the code as follows:
#Fetching the data
import requests
Making a GET request
r = requests.get('ANT Web Trading Platform - AliceBlue)
check status code for response received
success code - 200
print(r)
print content of request
print(r.json())
–This part gives me a dictionary of the advancing and declining stocks in nifty 50
#converting it to dataframe
import pandas as pd
r=r['data']
df=pd.DataFrame('r')
df.head()
–This gives me an error relating to reading the 'data' part of the derived dictionary