Hello Team, I am facing problem in parsing RKD fundamental api data from json to pandas dataframe.
Code:
appid = ""
token = ""
# input_1 : appid and token
# RKD api request message headers
message_headers = {
'content-type': 'application/json;charset=utf-8' ,
'X-Trkd-Auth-ApplicationID': appid,
'X-Trkd-Auth-Token' : token
}
# input_2 : api url
# RKD FinancialStatements Service URL
# input 3 : message_request(api dependent)
company_id = 'IBM.N'
message_request = {
'GetFinancialStatementsReports_Request_1':{
'companyId': company_id,
'companyIdType': 'RIC'
}
}
# get api response
api_response = doSendRequest(api_url, message_request, message_headers)
print(api_response)
I have attached the api json response in the text file.
GetFinancialStatementsReports_Request_1_response.txt
PFB the screenshot of expected data format(similar format is required in pandas dataframe).