Navigation

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

    Posts made by J88913

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

      Please watch the video and download the code from the description.

      Youtube Video

      posted in General Discussion
      J
      J88913
    • RE: Web socket streaming

      Watch the video and download the code to get the live data into Excel

      Youtube Video

      posted in General Discussion
      J
      J88913
    • RE: Websocket2.0 just stops after running for 1 min without any errors etc.

      Watch the video and download the code to get the live data into Excel
      Youtube Video

      posted in Python SDK
      J
      J88913
    • RE: Websocket 2.0

      @rajanprabu sir can u share the correct function so that we can use it? Waiting for @admin to correct it will take a long time for them as their support is very bad.

      posted in Python SDK
      J
      J88913
    • RE: Open interest in websocket

      @Deb88 Can you tell me how you get the solution. I am still getting this message only
      on open
      In on pong function==> b'\x00'

      posted in Python SDK
      J
      J88913
    • 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'

      posted in Python SDK
      J
      J88913
    • RE: Unable to get live feed.

      @Sukhwant280 use this code for feedtoken
      feedToken = obj.getfeedToken()

      posted in Python SDK
      J
      J88913
    • RE: Python code to convert WEBSOCKET streaming data(tick data) into Pandas Datadframe

      @anindya2k Can check this for the free code Youtube Video

      posted in Python SDK
      J
      J88913
    • RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language

      @admin I am getting following error in smartWebSocketv2Example.py on open
      In on pong function==> b'ping'
      In on pong function==> b'ping'

      Not able to fetch any data.

      posted in Python SDK
      J
      J88913
    • RE: Can't install smartapi python library using pip

      @Sukhwant280 Can you please tell how you resolved this error?

      posted in Python SDK
      J
      J88913
    • RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language

      Can anyone tell me what modules I have to install. When I run the codes following message occurred from "SmartApi.smartWebSocketV2 import SmartWebSocketV2
      ModuleNotFoundError: No module named 'SmartApi'". And when trying to install SmartApi module following error occurred " ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\JP\AppData\Lo
      cal\Temp\pip-install-bmd4tanj\pycrypto_3cd0936adc594488ab991db614b3c888\setup.py'"'"'; file='"'"'C:\Users\JP\AppData\Local\Temp\pip-install-bmd4tanj\py
      crypto_3cd0936adc594488ab991db614b3c888\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from se
      tuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record '
      C:\Users\JP\AppData\Local\Temp\pip-record-h0mix75_\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\PyCrypto' Check the logs for full command output. "

      posted in Python SDK
      J
      J88913
    • RE: How to import Live data in excel sheet

      @itsme-jas90 pls see it carefully. It fetches live data into excel.

      posted in Python SDK
      J
      J88913
    • RE: How to import Live data in excel sheet

      @itsme-jas90 can watch this video Youtube Video

      posted in Python SDK
      J
      J88913
    • RE: Tick values are refreshing very slowly in websocket streaming.

      @princetech1 for the live feed python code watch link text

      posted in Python SDK
      J
      J88913
    • Open Interest data for FO Index?

      Do you provide OI data for Future Index or only for Stocks F&O?

      posted in General Discussion
      J
      J88913
    • RE: Error NoneType' object is not subscriptable

      @J88913 Please migrate my ID

      posted in General Discussion
      J
      J88913
    • RE: Error NoneType' object is not subscriptable

      @admin What it means? What i can do?

      posted in General Discussion
      J
      J88913
    • RE: Error NoneType' object is not subscriptable

      @admin Yes, i am able to log in there no problem there.

      posted in General Discussion
      J
      J88913
    • Error NoneType' object is not subscriptable

      Hello please solve the error.

      i am getting the error.

      refreshToken= data['data']['refreshToken']
      TypeError: 'NoneType' object is not subscriptable

      posted in General Discussion
      J
      J88913