Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    header details needed?

    Python SDK
    3
    9
    70
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sayed last edited by

      What are the things to be filled please help!
      payload = "{\n"clientcode":"S162966",\n"password":"**********"\n}"
      headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'X-UserType': 'USER',
      'X-SourceID': 'WEB',
      'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
      'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
      'X-MACAddress': 'MAC_ADDRESS',
      'X-PrivateKey': 'API_KEY'
      }

      A R 2 Replies Last reply Reply Quote 0
      • A
        admin @sayed last edited by

        @sayed Please find the details as follow. https://smartapi.angelbroking.com/docs/ResponseStructure.

        S 1 Reply Last reply Reply Quote 0
        • S
          sayed @admin last edited by

          @admin

          do i need to provide public ip & my local; ip address?

          S 1 Reply Last reply Reply Quote 0
          • S
            sayed @sayed last edited by

            @sayed

            I dont have public ip, i am using mobile hotspot.. plz help

            D 1 Reply Last reply Reply Quote 0
            • D
              djdenish @sayed last edited by

              @sayed

              Just put client Id, password and API key.
              Leave rest as it is, it will still work.

              S 1 Reply Last reply Reply Quote 0
              • S
                sayed @djdenish last edited by

                @djdenish Okay now i am able to login & establish tokens response, but could not get logout or fetch profile.

                error:
                conn.request("POST","/rest/secure/angelbroking/user/v1/logout",payload,headers)
                for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
                socket.gaierror: [Errno 11004] getaddrinfo failed

                D 1 Reply Last reply Reply Quote 0
                • D
                  djdenish @sayed last edited by

                  @sayed
                  Upload screenshot of your full code and Output.

                  1 Reply Last reply Reply Quote 0
                  • R
                    rahulvishwakarma @sayed last edited by

                    @sayed Hi, please help me, I am also stuck on this, I am confused from where and how can I fill the required header details,

                    headers = {
                    'Content-Type': 'application/json',
                    'Accept': 'application/json',
                    'X-UserType': 'USER',
                    'X-SourceID': 'WEB',
                    'X-ClientLocalIP': 'CLIENT_LOCAL_IP',
                    'X-ClientPublicIP': 'CLIENT_PUBLIC_IP',
                    'X-MACAddress': 'MAC_ADDRESS',
                    'X-PrivateKey': 'API_KEY'
                    }

                    M 1 Reply Last reply Reply Quote 0
                    • M
                      Moderator_2 @rahulvishwakarma last edited by

                      Hi @rahulvishwakarma

                      Kindly refer to the header parameter to fill the respective keys
                      https://smartapi.angelbroking.com/docs/ResponseStructure

                      Thanks & Regards,
                      SmartAPI team

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post