Navigation

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

    Topics created by piidus

    • P

      Publishing Data
      General Discussion • • piidus

      1
      0
      Votes
      1
      Posts
      14
      Views

      No one has replied

    • P

      RESUBSCRIBE TOKEN
      Python SDK • • piidus

      2
      0
      Votes
      2
      Posts
      28
      Views

      A

      Hi @piidus , Please read the websocket 2.0 documentation here - https://smartapi.angelbroking.com/docs/WebSocket2

      We have not defined re-subscribe in our documentation anywhere. There's only two types of action possible i.e. Subscribe and Unsubscribe. So if you need to re-subscribe , please send a new subscription request.

    • P

      takes 3 positional arguments but 4 were given
      Python SDK • • piidus

      3
      0
      Votes
      3
      Posts
      45
      Views

      A

      Hi @piidus ,

      Please use the following command to upgrade to the latest python release
      pip install smartapi-python --upgrade

      More details here -https://smartapi.angelbroking.com/topic/2377/guide-to-secure-your-smartapi-account-with-two-factor-authentication?_=1665641980748

    • P

      wrong totp, error code = AB1050
      Python SDK • • piidus

      4
      0
      Votes
      4
      Posts
      179
      Views

      B

      Error:
      Order placement failed for XXXXXPE. Error: string indices must be integers
      Invalid totp, error code = AB1050

      If you are facing above mentioned errors recently, This is due to the Implementation of totp while generating session.

      The version of smartapi and websocket-client pakages should be latest. ie., smartapi-python-1.3.0 & websocket-client-1.4.1

      Uninstall the existing packages and Install the latest one.

      Uninstall

      PS C:\Users> pip uninstall smartapi-python
      Found existing installation: smartapi-python 1.2.9
      Uninstalling smartapi-python-1.2.9:

      PS C:\Users> pip uninstall websocket-client
      Found existing installation: websocket-client 1.2.1
      Uninstalling websocket-client-1.2.1:
      Successfully uninstalled websocket-client-1.2.1

      Install

      PS C:\Users> pip install smartapi-python
      Collecting smartapi-python
      Downloading smartapi-python-1.3.0.tar.gz (13 kB)
      Preparing metadata (setup.py) ... done
      Successfully built smartapi-python
      Installing collected packages: smartapi-python
      Successfully installed smartapi-python-1.3.0

      PS C:\Users> pip install websocket-client
      Collecting websocket-client
      Downloading websocket_client-1.4.1-py3-none-any.whl (55 kB)
      ---------------------------------------- 55.0/55.0 kB 2.8 MB/s eta 0:00:00
      Installing collected packages: websocket-client
      Successfully installed websocket-client-1.4.1

      Cause: Older version of SmartConnect only takes 3 values Including apikey

      def generateSession(self,clientCode,password):

      params={"clientcode":clientCode,"password":password} Latest Version

      def generateSession(self,clientCode,password,totp):

      params={"clientcode":clientCode,"password":password,"totp":totp}
    • P

      INVALID TOTP, ERROR CODE AB1050
      Python SDK • • piidus

      2
      0
      Votes
      2
      Posts
      67
      Views

      S

      Hi @piidus,
      I think you need to provide correct TOTP code in following line of code:
      obj.generateSession("","","totp") # (if you are trying similar code )