Navigation

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

    Posts made by Kamal

    • RE: AB1004 error code

      @admin i have not seen response from 19days, responsibility and reliability are my new questions.

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin thanks for the response, I'm facing while generating the token.

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin thanks for the response, I'm facing while generating the token.

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin I'm facing the error while generating the token.

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin thanks for the response, I'm facing while generating the token.

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin any update?

      posted in Python SDK
      K
      Kamal
    • RE: AB1004 error code

      @admin i'm also facing same error.
      {"message":"Something Went Wrong, Please Try After Sometime","errorcode":"AB1004","status":false,"data":null}

      posted in Python SDK
      K
      Kamal
    • RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"

      @admin did you get any chance to take a look? why can't you automate these kind of routine activity?

      posted in General Discussion
      K
      Kamal
    • RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"

      @admin i reset my password but still not able to login, can you take a look?

      posted in General Discussion
      K
      Kamal
    • RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"

      @admin any update?

      posted in General Discussion
      K
      Kamal
    • RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"

      @admin usually how much time it will take to migrate? I submitted Google Sheet and updated the same here

      posted in General Discussion
      K
      Kamal
    • RE: "YOUR USER ID OR PASSWORD IS INVALID","errorcode":"AB1007"

      @admin Please migrate my id as well.
      Client ID: V183756

      posted in General Discussion
      K
      Kamal
    • RE: additional/user info needed in redirect url

      @admin any inputs?

      posted in General Discussion
      K
      Kamal
    • additional/user info needed in redirect url

      Is there any way i can get user information in redirect url (like user_id=ABC1234 or if i add any text during API call, it returns me along with redirect url)?

      https://smartapi.angelbroking.com/publisher-login?api_key=xxx

      I am building a app, it should identify which user has authenticated?

      posted in General Discussion
      K
      Kamal
    • RE: WebSocket functionality issue

      @admin

      Thanks for the response,

      I used same code for getting market depth. Total buy/sell volume. As per Official documentation says, "tbq/tsq" gives the numbers. But not present in API response.

      32 tbq Total buy quantity
      33 tsq Total sell quantity

      task="dp"

      Sample Output:
      Ticks: [{'bno': '5', 'bno1': '14', 'bno2': '29', 'bno3': '26', 'bno4': '40', 'bp': '430.40', 'bp1': '430.35', 'bp2': '430.30', 'bp3': '430.25', 'bp4': '430.20', 'bq': '2778', 'bq1': '6556', 'bq2': '15776', 'bq3': '8624', 'bq4': '17065', 'bs': '450', 'bs1': '2518', 'bs2': '13472', 'bs3': '5992', 'bs4': '8936', 'e': 'nse_cm', 'name': 'dp', 'sno': '1', 'sno1': '16', 'sno2': '34', 'sno3': '23', 'sno4': '43', 'sp': '430.50', 'sp1': '430.55', 'sp2': '430.60', 'sp3': '430.65', 'sp4': '430.70', 'tk': '3045'}]

      I am trying to get "bid/ask" volume along with LTP, any alternate?

      Thanks in advance,
      Kamal.

      posted in General Discussion
      K
      Kamal
    • RE: WebSocket functionality issue

      @admin

      Could you help or can you share working code including packages along with versions

      posted in General Discussion
      K
      Kamal
    • RE: WebSocket functionality issue

      @rajanprabu Thanks for your response

      smartapi-python==1.2.9
      websocket-client==1.1.0

      posted in General Discussion
      K
      Kamal
    • WebSocket functionality issue

      Hi All,
      I am using below code to get bid/ask volume.

      • from smartapi import SmartConnect
        #from smartapi import WebSocket
        from smartapi import SmartWebSocket

      obj=SmartConnect(api_key=api_key)
      data = obj.generateSession(clientId, password)
      FEED_TOKEN=obj.getfeedToken()

      ''' SBIN'''
      token="nse_cm|3045"
      task="dp" #'mw'|'sfi'|'dp'
      ws = SmartWebSocket(FEED_TOKEN, clientId)

      def on_tick(ws, tick):
      for i in tick:
      if 'tbq' in i.keys():
      print(i['tbq'])
      print(i['tsq'])
      ws.stop()

      def on_connect(ws, response):
      ws.send_request(token,task)

      def on_close(ws):
      ws.stop()

      ws.on_ticks = on_tick
      ws.on_connect = on_connect
      ws.on_close = on_close

      ws.connect()

      Challanges:

      1. While importing lib, from smartapi import WebSocket facing (C:\Users\kamal\anaconda3\lib\site-packages\smartapi_init_.py) error. Tried from smartapi import SmartWebSocket & it is working fine
      2. Ticker is not giving task 'dp', instead looping the task 'hb'.

      __on_open################
      {'task': 'cn', 'channel': 'NONLM', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
      2021-06-21 17:18:04.942797 : Start task in the background
      {'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
      2021-06-21 17:18:34.953644 : Start task in the background
      {'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
      2021-06-21 17:19:04.957672 : Start task in the background
      {'task': 'hb', 'channel': '', 'token': 'XXXXXX', 'user': 'XXXXXX', 'acctid': 'XXXXXX'}
      {'task': 'hb', 'channel': '', 'token': '0999895434', 'user': 'V183756', 'acctid': 'V183756'}
      HeartBeat Sending Failed --> this is in loop after stopping manually.

      1. I had to stop manually, tried but service running in background not able to stop.

      I just need market depth, can someone help me/correct my code?

      posted in General Discussion
      K
      Kamal
    • how to close websocket?

      I tried to get LTP using websockets and able to. However not able to close the connection, keep on getting the LTP for every tick. Can someone help me with the code, how to close the connection (ws.connect(threaded=True) opens the connection, but how to close or disconnect the connection).

      posted in Python SDK
      K
      Kamal