Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. ThetaDecay
    3. Best
    T
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 13
    • Best 4
    • Groups 0

    Best posts made by ThetaDecay

    • Unable to Login via SmartAPI

      Getting errors while using Python SDK:

      03-Jan-23 12:04:14 - Attempt#0 to initialize Angel SDK
      03-Jan-23 12:04:14 - Exception occured while Initializing Angel SDK
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/angel_main.py", line 69, in init_angel_SDK
          refreshToken = data['data']['refreshToken']
      TypeError: 'NoneType' object is not subscriptable
      03-Jan-23 12:04:14 - Exception: 'NoneType' object is not subscriptable
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/angel_main.py", line 69, in init_angel_SDK
          refreshToken = data['data']['refreshToken']
      TypeError: 'NoneType' object is not subscriptable
      

      A few months ago, the same issue happened when API was down for one whole day
      This is not at all acceptable
      I am switching to a different broker for API like Zerodha or ICICI direct Breeze API

      posted in General Discussion
      T
      ThetaDecay
    • Feature request

      Hi @admin

      It would be great if we can check the margin required for that trade before placing the order. Feature req for smartapi

      posted in General Discussion
      T
      ThetaDecay
    • BANKNIFTY contracts missing in https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json

      Some Banknifty contracts are not there in the instruments JSON file : https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json

      for e.g: "BANKNIFTY28DEC2347300CE" is there
      "BANKNIFTY28DEC2347700CE" is not there

      Also, there should be an API to fetch. This is not so good way to download JSON file and then get contracts from a JSON file

      posted in General Discussion
      T
      ThetaDecay
    • RE: Historic API not working

      Today whole day I got errors. No trade was placed today
      Leaving Angel and shifting to ICICI or Zerodha
      last 2 days facing issue
      Cant beleive big broker like u can have this for 2 full days!!!!!

      22-Feb-23 09:45:12 :     fetch_ohlc_angel() - Getting candles
      22-Feb-23 09:45:13 :     fetch_ohlc_angel() - Exception occured while fetching OHLC for ticker:NIFTY23FEB23FUT from 2023-02-20 09:45 to 2023-02-22 09:45
      Traceback (most recent call last):
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 191, in _request
          data = json.loads(r.content.decode("utf8"))
        File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
          return _default_decoder.decode(s)
        File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
          obj, end = self.raw_decode(s, idx=_w(s, 0).end())
        File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
          raise JSONDecodeError("Expecting value", s, err.value) from None
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/angel_main.py", line 443, in fetch_ohlc_angel
          data = obj.getCandleData(historic_param)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 416, in getCandleData
          getCandleDataResponse = self._postRequest(
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 225, in _postRequest
          return self._request(route, "POST", params)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 194, in _request
          raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
      smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
      22-Feb-23 09:45:13 :     fetch_ohlc_angel() - Exception: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
      Traceback (most recent call last):
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 191, in _request
          data = json.loads(r.content.decode("utf8"))
        File "/usr/lib/python3.10/json/__init__.py", line 346, in loads
          return _default_decoder.decode(s)
        File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
          obj, end = self.raw_decode(s, idx=_w(s, 0).end())
        File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
          raise JSONDecodeError("Expecting value", s, err.value) from None
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/a/Desktop/angel_st/src/angel_main.py", line 443, in fetch_ohlc_angel
          data = obj.getCandleData(historic_param)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 416, in getCandleData
          getCandleDataResponse = self._postRequest(
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 225, in _postRequest
          return self._request(route, "POST", params)
        File "/home/a/.local/lib/python3.10/site-packages/smartapi/smartConnect.py", line 194, in _request
          raise ex.DataException("Couldn't parse the JSON response received from the server: {content}".format(
      smartapi.smartExceptions.DataException: Couldn't parse the JSON response received from the server: b'Access denied because of exceeding access rate'
      
      posted in Test
      T
      ThetaDecay