Navigation

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

    Topics created by J88913

    • J

      Free Python Code for Websocket 2.0 and Get Live Feed Data
      General Discussion • • J88913  

      2
      0
      Votes
      2
      Posts
      31
      Views

      O

      @J88913 Thank you Sir for sharing the video. Very grateful and Appreciate!! Request a clarification. on line 85 of the code which reads as below, we would be able to fetch the high, low , volume for the day. But how do we code it if we want the details for open, high , low , close, volume and open interest for all ticks say for 1 minute, so we can compile the date into candlestick data of for 1 minute LIVE_FEED_JSON[msg['token']] = {'1' :datetime.datetime.fromtimestamp(msg['exchange_timestamp']/1000).strftime('%Y-%m-%d %H:%M:%S') ,'3' :msg['last_traded_price']/100 ,'4' :msg['average_traded_price']/100 ,'5' :msg['high_price_of_the_day']/100 ,'6':msg['low_price_of_the_day']/100 ,'7' :msg['closed_price']/100 ,'8':msg['volume_trade_for_the_day'],'9':msg['open_interest']}
    • J

      WebSocketV2 not working to get Live Feed
      Python SDK • • J88913  

      2
      0
      Votes
      2
      Posts
      98
      Views

      H

      @J88913 said in WebSocketV2 not working to get Live Feed: from SmartApi.smartWebSocketV2 import SmartWebSocketV2 AUTH_TOKEN = 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6Iko4ODkxMyIsInJvbGVzIjowLCJ1c2VydHlwZSI6IlVTRVIiLCJpYXQiOjE2NjAxMDc2MDIsImV4cCI6MTc0NjUwNzYwMn0.GxHWWlTKnC-pGIyrz_PLBpwz4Dw2qYdQTTqum5KUKgSsaHFsts1gP1kzgkJELfTAbFmnlyA1dQtgruNP_5vWBQ' API_KEY = 'IpUZc95q' CLIENT_CODE = 'J77913' FEED_TOKEN = '0935239566' correlation_id = "erroroutp1" action = 1 mode = 3 token_list = [{"exchangeType": 1, "tokens": ["11536"]}] sws = SmartWebSocketV2(AUTH_TOKEN, API_KEY, CLIENT_CODE, FEED_TOKEN) def on_data(wsapp, message): print("Ticks: {}".format(message)) def on_open(wsapp): print("on open") sws.subscribe(correlation_id, mode, token_list) def on_error(wsapp, error): print(error) def on_close(wsapp): print("Close") Assign the callbacks. sws.on_open = on_open sws.on_data = on_data sws.on_error = on_error sws.on_close = on_close sws.connect() I am using the above code but do not get any live feed. Only received following output on open In on pong function==> b'\x00' In on pong function==> b'\x00' In on pong function==> b'\x00'
    • J

      Open Interest data for FO Index?
      General Discussion • • J88913  

      2
      0
      Votes
      2
      Posts
      29
      Views

      A

      HI @J88913 Currently we dont provide that.
    • J

      Error NoneType' object is not subscriptable
      General Discussion • • J88913  

      7
      0
      Votes
      7
      Posts
      70
      Views

      A

      HI @J88913 kindly fill this for to migrate your account .Also read all the instructions in the form https://docs.google.com/forms/d/e/1FAIpQLSdgpCiDhSBa_bsKsec002e9unbeQkipOLFAKW7DzPvmiowsaw/viewform