Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Error AB1004 for historical data on websocket

    Test
    0
    2
    10
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      puranjan last edited by

      Getting the AB1004 error when trying to retrieve historical data using websocket. Interestingly while executing in a loop having around 40 equity scripts, the error is coming in between for some of the scripts and working fine for others.
      Attaching below part of the output log.

      [I 240930 09:20:04 smartConnect:121] in pool
      [E 240930 09:20:16 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:20', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:20:50 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:20', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:21:38 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:21', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:21:42 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:21', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:22:11 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:22', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:25:36 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:25', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:26:09 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:26', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:26:58 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:26', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}
      [E 240930 09:27:01 smartConnect:243] Error occurred while making a POST request to https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelone.in/rest/secure/angelbroking/historical/v1/getCandleData, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.xxx.xxx.98', 'X-MACAddress': ‘x7:fx:xb:7x:x5:x0’, 'Accept': 'application/json', 'X-PrivateKey': ‘xxxxxxxxx’, 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'exchange': 'NSE', 'interval': 'FIVE_MINUTE', 'fromdate': '2024-09-26 09:27', 'todate': '2024-09-30 09:19'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      1 Reply Last reply Reply Quote 0
      • A
        admin last edited by

        For historical data, you need to pass symbol token as well. Go through the sample request message in the SmartAPI documentation.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post