Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. lavly
    3. Posts
    L
    • Profile
    • Following 1
    • Followers 0
    • Topics 4
    • Posts 21
    • Best 1
    • Groups 0

    Posts made by lavly

    • RE: NO HISTORICAL DATA FOR TOKEN 26000AND 26009

      @admin pl help to get hist data for 26000 and 26009.

      posted in General Discussion
      L
      lavly
    • NO HISTORICAL DATA FOR TOKEN 26000AND 26009

      Historical API doesn't provide any data for 26000 and 26009 tokens pl explain why. Pl help out get that.

      posted in General Discussion
      L
      lavly
    • RE: Unable to genrate session or refresh token

      @admin

      issue resolved. thanks for listening.

      i din't know how but my api key got inactive. after reactivating same. code is working fine.

      thanks.

      posted in Python SDK
      L
      lavly
    • RE: Unable to genrate session or refresh token

      @admin said in Unable to genrate session or refresh token:

      @lavly are you able to login into web based platform using same credentials
      @admin yes i can login into web and app ba based platform

      posted in Python SDK
      L
      lavly
    • RE: Unable to genrate session or refresh token

      @admin my client id is - VDKU062

      posted in Python SDK
      L
      lavly
    • RE: Unable to genrate session or refresh token

      @lavly said in Unable to genrate session or refresh token:

      data = obj.generateSession(username, password)
      refreshToken= data['data']['refreshToken']

      This github code is giving error after 11 dec 21.
      Pl Help.

      Error annexed.![alt text](image urlScreenshot_20211226-194224.png )

      @admin

      posted in Python SDK
      L
      lavly
    • Unable to genrate session or refresh token

      data = obj.generateSession(username, password)
      refreshToken= data['data']['refreshToken']

      This github code is giving error after 11 dec 21.
      Pl Help.

      Error annexed.![alt text](image urlScreenshot_20211226-194224.png )

      posted in Python SDK
      L
      lavly
    • RE: GenerateSession and GetUserProfile getting failed each time

      @admin
      Screenshot_20211214-200711.png

      I am getting error while genratesession
      :-
      "TypeError: 'NoneType' object is not subscriptable"
      I am using Google colab. My code was working fine till 10 Dec 2021.
      Pl help.

      posted in Go SDK
      L
      lavly
    • RE: Working WebSocket Sample code to retrieve LTP - Python

      @James-Bond yes

      posted in Python SDK
      L
      lavly
    • RE: Working WebSocket Sample code to retrieve LTP - Python

      @James-Bond this code is giving following errorrs


      ReactorNotRestartable Traceback (most recent call last)
      <ipython-input-71-f3a22d8e176e> in <module>()
      21 ss.on_close = on_close
      22
      ---> 23 ss.connect( )

      3 frames
      /usr/local/lib/python3.7/dist-packages/twisted/internet/base.py in startRunning(self)
      841 raise error.ReactorAlreadyRunning()
      842 if self._startedBefore:
      --> 843 raise error.ReactorNotRestartable()
      844 self._started = True
      845 self._stopped = False

      ReactorNotRestartable:

      posted in Python SDK
      L
      lavly
    • wrong indentation error

      orderparams = {
      "variety": "NORMAL",
      "tradingsymbol": "SBIN-EQ",
      "symboltoken": "3045",
      "transactiontype": "BUY",
      "exchange": "NSE",
      "ordertype": "LIMIT",
      "producttype": "INTRADAY",
      "duration": "DAY",
      "price": "390",
      "squareoff": "0",
      "stoploss": "0",
      "quantity": "10"
      }
      orderId=obj.place0rder(orderparams)
      print("The order id is: {}".format(orderId))
      except Exception as e:
      print("Order placement failed: {}".format(e.message))

      Iam using above code. It gives following errorr

      File "<ipython-input-44-d8c4717597ee>", line 15
      orderId=obj.place0rder(orderparams)
      ^
      IndentationError: unexpected indent

      Pl help

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @djdenish thanx

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @djdenish from smartapi import WebSocket

      Errorr


      ModuleNotFoundError Traceback (most recent call last)
      <ipython-input-47-fd07382cedc0> in <module>()
      ----> 1 from smartapi import WebSocket

      2 frames
      /usr/local/lib/python3.7/dist-packages/twisted/internet/ssl.py in <module>()
      56
      57 # System imports
      ---> 58 from OpenSSL import SSL
      59
      60 from zope.interface import implementer, implementer_only, implementedBy

      ModuleNotFoundError: No module named 'OpenSSL'


      NOTE: If your import is failing due to a missing package, you can
      manually install dependencies using either !pip or !apt.

      To view examples of installing some common dependencies, click the
      "Open Examples" button below.

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @rajanprabu no

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @djdenish installed. I'm getting my profile. But the codes given for WebSocket, order placement and gtt giving errors, like module not found or wrong indentation , define e. Etc

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @James-Bond it suppor pip pip3 is not working

      posted in Python SDK
      L
      lavly
    • RE: unable to import websocket

      @James-Bond i am working with Google collaboratory. I'm getting my profile. Evry thing is ok.
      When I put cmd from smartapi import Web Socket it shows error no module found

      posted in Python SDK
      L
      lavly
    • RE: 💯 Working Code to fetch Client Profile

      @djdenish thanx bro for sharing

      posted in Python SDK
      L
      lavly
    • unable to import websocket

      WebSocket

      from smartapi import WebSocket
      FEED_TOKEN= "your feed token"
      CLIENT_CODE="your client Id"
      token="channel you want the information of" #"nse_cm|2885&nse_cm|1594&nse_cm|11536"

      ss = WebSocket(FEED_TOKEN, CLIENT_CODE)

      def on_tick(ws, tick):
      print("Ticks: {}".format(tick))

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

      def on_close(ws, code, reason):
      ws.stop()

      Assign the callbacks.

      ss.on_ticks = on_tick
      ss.on_connect = on_connect
      ss.on_close = on_close

      ss.connect( )

      This code giving error 1 line itself.

      posted in Python SDK
      L
      lavly