Navigation

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

    Boofy

    @Boofy

    0
    Reputation
    9
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Age 27

    Boofy Follow

    Best posts made by Boofy

    This user hasn't posted anything yet.

    Latest posts made by Boofy

    • RE: getCandleData() missing 1 required positional argument: 'historicDataParams'

      Thank you @pavank
      I realized it later.

      posted in Python SDK
      B
      Boofy
    • RE: getCandleData() missing 1 required positional argument: 'historicDataParams'

      THE ISSUE IS SOLVED
      I needed to use the initiated object of SmartApi class.

      import secrets
      import smartapi
      
      #create object of call
      obj = smartapi.SmartConnect(api_key=secrets.datafeed_key)
      
      #login api call
      loginData = obj.generateSession(secrets.client_id,secrets.pswd)
      refreshToken= loginData['data']['refreshToken']
      
      #fetch the feedtoken
      feedToken = obj.getfeedToken()
      
      #fetch User Profile
      userProfile = obj.getProfile(refreshToken)
      
      hist = {
          "exchange": "NSE",
          "symboltoken": "3045",
          "interval": "ONE_MINUTE",
          "fromdate": "2021-02-08 09:00", 
          "todate": "2021-02-08 09:16"
      }
      
      try:
          hist_data = obj.getCandleData(hist)
          print(hist_data)
      except Exception as e:
          print("Historical API failed: {}".format(e))
      
      

      This is the code in case someone else also encountered something like this.

      posted in Python SDK
      B
      Boofy
    • RE: getCandleData() missing 1 required positional argument: 'historicDataParams'

      EDIT:

      I also tried this:

      try:
          smartapi.SmartConnect.getCandleData(historicDataParams=hist)
      except Exception as e:
          print("Historical API failed: {}".format(e))
      
      

      But after doing that I get this error:

      e8abd532-6c2a-444b-bc21-bdb7d081a677-image.png

      posted in Python SDK
      B
      Boofy
    • RE: getCandleData() missing 1 required positional argument: 'historicDataParams'

      @pavank Are you using same snippet from GitHub?
      If not can you share yours?

      posted in Python SDK
      B
      Boofy
    • RE: getCandleData() missing 1 required positional argument: 'historicDataParams'

      Hello @pavank,
      I tried logging in and then executing the same code but still the result is same.

      See here below:

      527f875b-dc78-4ed0-accb-647c202437a7-image.png

      But when I do this:

      try:
          smartapi.SmartConnect.getCandleData(hist, hist)
      except Exception as e:
          print("Historical API failed: {}".format(e))
      
      

      Somehow previous error gets resolved, though that should not happen.
      But after doing this I get new kind of error:

      6132836c-9e5b-4ca1-be23-5e484c5ab934-image.png

      posted in Python SDK
      B
      Boofy
    • getCandleData() missing 1 required positional argument: 'historicDataParams'

      I have been trying to use the historical data but I am encountering this issue every time.
      Please tell me what mistake I am making below:

      import smartapi
      
      hist = {
          "exchange": "NSE",
          "symboltoken": "3045",
          "interval": "ONE_MINUTE",
          "fromdate": "2021-02-08 09:00", 
          "todate": "2021-02-08 09:16"
      }
      
      try:
          smartapi.SmartConnect.getCandleData(hist)
      except Exception as e:
          print("Historical API failed: {}".format(e))
      

      And this is the error I am encountering:

      Historical API failed: getCandleData() missing 1 required positional argument: 'historicDataParams'
      
      posted in Python SDK
      B
      Boofy
    • RE: Python Streaming Tick Data Problem.

      @rjbanna Ohh.. that was the reason, no wonder I was not able to save data in list or anything.

      posted in Python SDK
      B
      Boofy
    • RE: What are these numbers in "nse_cm|2885"?

      @rjbanna Understood Thank you.

      posted in General Discussion
      B
      Boofy
    • What are these numbers in "nse_cm|2885"?

      Can someone please explain the significance of these numbers.?

      posted in General Discussion
      B
      Boofy