ltp is not fetching correctly

anil2609
anil2609 edited May 8 in Python client
@sujith @rakeshr I am trying to get current NIFTY and VIX values. Worked till last friday but started fatching no values from few days. Is anything changed? or Can you correct the code if anything changed?
conn    = http.client.HTTPSConnection("api.kite.trade")
payload = ''
headers = {
'X-Kite-Version': '3',
'Authorization' : f'token {api_<code class="CodeInline">
key}:{access_token}'
}

ltp_quote = '/quote?i=NIFTY+50:INDIA+VIX'
conn.request("GET", ltp_quote, payload, headers)
response = conn.getresponse()
ltp_byte = response.read()
ltp_info = json.loads(ltp_byte.decode("utf-8"))
print(ltp_info)

Output:
{'status': 'success', 'data': {}}
API call success but resulted empty dictionary.
Sign In or Register to comment.