Navigation

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

    namit

    @namit

    2
    Reputation
    12
    Posts
    6
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    namit Follow

    Best posts made by namit

    • RE: How do I get historical Index Data for NIFTY/SENSEX?

      @admin Hello admin, why angel is not offering the index historical data? For options trading specifically for Nifty and Banknifty, their historical data is very very important for algo traders. However you are providing the future data of index then why not of the index directly?

      posted in General Discussion
      N
      namit

    Latest posts made by namit

    • RE: Unable to unsubscribe the symbol in WebSocket and close the connection

      @Moderator_2 Have you analysed it yet?

      posted in Python SDK
      N
      namit
    • RE: Explore the Smart API WebSocket 2.0 User Guide (Depth 20) - Beta Testing

      @dev11 Hi, try removing 999 from each index and then fetch the data

      posted in General Discussion
      N
      namit
    • Unable to unsubscribe the symbol in WebSocket and close the connection

      Hi I am unable to unsubscribe the symbol when i don't need it. Even after unsubscribing it using sws.unsubscribe(correlation_id, mode, token_list) and trying to close the connection using sws.close_connection(), it doesn't close the connection but the symbol gets re-subscribe.
      What is the issue?

      for more details sharing the code.

      global correlation_id, mode, sws

          AUTH_TOKEN = credential.range('b8').value
          angelapikey = credential.range('b4').value
          feed_token = credential.range('b7').value
          client_code = credential.range('b2').value
          correlation_id = "option_live_data"
          action = 1
          mode = 1
          sws = SmartWebSocketV2(AUTH_TOKEN, angelapikey, client_code, feed_token)
      
          token_list = [{"exchangeType": 1, "tokens": [token_Nifty,token_Bank,token_Fin,token_Mid]}]
          
          token_Nifty = "26000"
          token_Bank = "26009"
          token_Fin = "26037"
          token_Mid = "26074" 
          def on_data(wsapp, message):
              # print("Ticks: {}".format(message))
              
              token = message['token']
              last_price = message['last_traded_price']
              last_price = last_price/100
              print(last_price)
      
      
          def on_open(wsapp):
              print("\n------Options Live LTP subscribed------")
              sws.subscribe(correlation_id, mode, token_list)
      
      
          def on_error(wsapp, error):
              print(error)
      
      
          def on_close(wsapp):
              print("Close")
      
          sws.on_open = on_open
          sws.on_data = on_data
          sws.on_error = on_error
          sws.on_close = on_close
      
          threading.Thread(target = sws.connect).start()
      
      def ws_disconnect():
          print("\n------ Unsubscribed Options ------")
          sws.unsubscribe(correlation_id, mode, token_list)
          sws.close_connection()
      
      posted in Python SDK
      N
      namit
    • RE: SEBI circular on algo trading and it's impact

      @softice Can pls share the link of that circular so others can also read it.

      posted in General Discussion
      N
      namit
    • RE: How to fetch live data for indices using websockets

      @sevrus
      from smartWebSocketV2 import SmartWebSocketV2

      For Live NIFTY, BANKNIFTY LTP

         AUTH_TOKEN = 
         angelapikey = 
         feed_token = 
         client_code = 
         correlation_id = "live_data"
         action = 1
         mode = 1
         sws = SmartWebSocketV2(AUTH_TOKEN, angelapikey, client_code, feed_token)
      
         token_Nifty = "26000"
         token_Bank = "26009"
         token_Fin = "26037"
         token_Mid = "26074"
      
         token_list = [{"exchangeType": 1, "tokens": [token_Nifty,token_Bank,token_Fin,token_Mid]}]
      
         def on_data(wsapp, message):
           # print("Ticks: {}".format(message))
           token = message['token']
           last_price = message['last_traded_price']
           last_price = last_price/100
             
          def on_open(wsapp):
              print("\n------Options Live LTP subscribed------")
              sws.subscribe(correlation_id, mode, token_list)
      
      
          def on_error(wsapp, error):
              print(error)
      
      
          def on_close(wsapp):
              print("Close")
      
          sws.on_open = on_open
          sws.on_data = on_data
          sws.on_error = on_error
          sws.on_close = on_close
      
          threading.Thread(target = sws.connect).start()
      

      "" Do check the indent correctly ""

      posted in Python SDK
      N
      namit
    • RE: Connection problem with websocket2.0

      @Moderator_2 Hi this issue is not about having more than three connections. This issue comes even with only one connection with only one token subscribed. And this happens lot of time.
      Not only that, even if you unsubscribe the token using sws.unsubscribe(correlation_id, mode, token_list) and sws.close_connection(), it doesn't close and gets resubscribed.

      posted in Python SDK
      N
      namit
    • RE: How do I get historical Index Data for NIFTY/SENSEX?

      @admin Hello admin, why angel is not offering the index historical data? For options trading specifically for Nifty and Banknifty, their historical data is very very important for algo traders. However you are providing the future data of index then why not of the index directly?

      posted in General Discussion
      N
      namit
    • 'Ping_payload' error

      Re: Getting error in websocketV2
      File "C:\Users\Namit\OneDrive\Desktop\Option_Chain\Angel\smartWebSocketV2.py", line 264, in connect
      self.wsapp.run_forever(sslopt={"cert_reqs": ssl.CERT_NONE}, ping_interval=self.HEAR_BEAT_INTERVAL,
      TypeError: run_forever() got an unexpected keyword argument 'ping_payload'

      Why this is happening?

      posted in Python SDK
      N
      namit
    • RE: what is AMX Error - AB1007

      @SSumit said in what is AMX Error - AB1007:

      @admin what is AMX Error - AB1007. I am getting this error for rms limit API only.

      @admin i'm also getting this error .. don't know if admin would ever reply to this.

      posted in General Discussion
      N
      namit
    • Max Retries Error !! again and again

      error: HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/getLtpData (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0000022F2C395160>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=20)'))

      This is coming again and again. With this my whole algo trading logic gets destroyed as i am not able to execute trade.

      What is the use of SmartApi if the connection time out is happening again and again.

      @Admin should we stop using SmartApi and move to another broker?

      posted in Bugs
      N
      namit