Navigation

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

    Posts made by H53749929

    • "Couldn't parse the JSON response received from the server: b''"

      "[I 250311 11:17:55 login:27] ✅ Login Successful!
      [I 250311 11:17:55 fetch_data_gui:61] 📡 Sending Historical Data Request: {'exchange': 'NSE', 'symboltoken': '3045', 'interval': 'DAY', 'fromdate': '2025-03-04 00:00', 'todate': '2025-03-05 23:59'}
      [E 250311 11:17:55 fetch_data_gui:79] Fetching historical data failed: Couldn't parse the JSON response received from the server: b''
      Traceback (most recent call last):
      File "C:\Users\user\projects\angelalgo\venv\Lib\site-packages\SmartApi\smartConnect.py", line 227, in request
      data = json.loads(r.content.decode("utf8"))
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\json_init
      .py", line 346, in loads
      return _default_decoder.decode(s)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\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 "C:\Users\user\projects\angelalgo\smartapi\fetch_data_gui.py", line 64, in fetch_historical_data
          historical_data = smart_api.getCandleData(historic_params)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\projects\angelalgo\venv\Lib\site-packages\SmartApi\smartConnect.py", line 462, in getCandleData
          getCandleDataResponse=self._postRequest("api.candle.data",historicDataParams)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\user\projects\angelalgo\venv\Lib\site-packages\SmartApi\smartConnect.py", line 260, in _postRequest
          return self._request(route, "POST", params)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      

      Couldn't parse the JSON response received from the server: b''"

      posted in Python SDK
      H
      H53749929
    • Getting error AB1004 when trying to get historical data.

      [E 240911 19:25:54 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': 'f4:b7:e2:e8:1c:a0', 'Accept': 'application/json', 'X-PrivateKey': 'CffKcSyX', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'ONE_DAY', 'fromdate': '2024-01-01 09:15', 'todate': '2024-09-05 13:00'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      posted in Bugs
      H
      H53749929