{'status': 'success', 'data': 'Take the red pill with Kite Connect v3'}

karthikdhanusu
When using funds and margins api using python requests I am getting the following error
{'status': 'success', 'data': 'Take the red pill with Kite Connect v3'}

Code:
api_key="xxx"
acs_tok = 'xxx'
baseurl = 'https://api.kite.trade'
headers = {'X-Kite-Version':'3','Authorization': 'token api_key:acs_tok'}
fnm = '/user/margins'

def funma():
fum_url = baseurl+fnm
fum_req = requests.get(baseurl, verify = False, headers=headers)
print(fum_req.json())

funma()

any assistance is appreciated
  • rakeshr
    @karthikdhanusu
    {'status': 'success', 'data': 'Take the red pill with Kite Connect v3'}
    It's the welcome message the root endpoint of the API gives -- https://api.kite.trade
    fum_req = requests.get(baseurl, verify = False, headers=headers)
    Instead of baseurl, it should be fum_url.
Sign In or Register to comment.