Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. Chaitanya
    3. Posts
    C
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 2
    • Best 0
    • Groups 0

    Posts made by Chaitanya

    • Pledging from Kite to Angel One for Algotrading

      I have my majority of holdings with another broker(zerodha) and want to pledge those to get margin for intraday and FnO, fully automated. While i can do that using kite api it costs 2000/month

      I wanted to know if i can unpledge my holdings on kite(zerodha), pledge those here at angel one, get the margin and use angel one api for the automation and execution as it is completely free here.

      Please help.

      posted in General Discussion
      C
      Chaitanya
    • Blank Response From Curl

      Hi
      After getting token from https://smartapi.angelbroking.com/publisher-login?api_key=xxx

      when I use this token in other API
      I amgetting blank response.

      auth_token = request.args.get('auth_token', default = 1, type = str)
      conn = http.client.HTTPSConnection("apiconnect.angelbroking.com")
      payload = ""
      hostname = socket.gethostname() 
      clientLocalIP=socket.gethostbyname(hostname)
      clientPublicIP=get('https://api.ipify.org').text
      headers = {
        'Authorization': 'Bearer '+auth_token,
        'Content-Type': 'application/json',
        'Accept': 'application/json',
        'X-UserType': 'USER',
        'X-SourceID': 'WEB',
        'X-ClientLocalIP': clientLocalIP,
        'X-ClientPublicIP': clientPublicIP,
        'X-PrivateKey': 'XRAIVVdO'
      }	
      conn.request("POST","/rest/secure/angelbroking/user/v1/getProfile",payload,headers)
      res = conn.getresponse()
      data = res.read()
      print(data)
      return data.decode("utf-8")
      

      Response --> ''

      What is the error here?

      posted in Python SDK
      C
      Chaitanya