Navigation

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

    websocket what is feed_token and client_code.

    Python SDK
    3
    6
    78
    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.
    • M
      MAWJ104 last edited by

      In below code what is Feed_token and client_code. In API i can only see api_key and secret_key

      Where do I find this ?

      WebSocket

      from smartapi import WebSocket
      FEED_TOKEN= "your feed token"
      CLIENT_CODE="your client Id"

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

        @aalokkeshri

        Are you a angel client ? then login code is your client code.

        M 1 Reply Last reply Reply Quote 0
        • M
          MAWJ104 @Surya 1 last edited by

          @rajanprabu I have client code, and what is Feed_token

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

            @aalokkeshri

            you generate it like the following

            # package import statement
            from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
            #import smartapi.smartExceptions(for smartExceptions)
            
            #create object of call
            obj=SmartConnect(api_key="your api key")
            
            #login api call
            
            data = obj.generateSession("Your Client ID","Your Password")
            refreshToken= data['data']['refreshToken']
            
            #fetch the feedtoken
            feedToken=obj.getfeedToken()
            
            M 1 Reply Last reply Reply Quote 0
            • A
              admin last edited by

              Hi @aalokkeshri client code is the same which you use to login in to the angel broking trading platform Feed token need to be generated using the code which we have mentioned below.

              from smartapi import SmartConnect

              obj=SmartConnect(api_key="your api key")

              data = obj.generateSession("Your Client ID","Your Password")
              refreshToken= data['data']['refreshToken']

              #fetch the feedtoken
              feedToken=obj.getfeedToken()

              1 Reply Last reply Reply Quote 0
              • M
                MAWJ104 @Surya 1 last edited by

                @rajanprabu Thanks for the response.

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