Navigation

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

    whemant

    @whemant

    17
    Reputation
    21
    Posts
    48
    Profile views
    3
    Followers
    0
    Following
    Joined Last Online

    whemant Follow

    Best posts made by whemant

    • Historic API not working

      I know that the rate limit of historic API is 3 requests per second. However today I am getting error b'Access denied because of exceeding access rate' randomly. sometime just after 1st request, sometimes after 2nd request.
      @admin @admin123 is there any problem with the API today? Please confirm.

      posted in Bugs
      W
      whemant

    Latest posts made by whemant

    • RE: Announcing Top Gainers/ Losers, PCR and OI BuildUp APIs for SmartAPI Users

      Am I the only one encountering this error? Why am I experiencing this issue only with 'PercPriceGainers' and not with 'PercPriceLosers'?

      This has been happening since yesterday; it was working perfectly fine before that.

      @Moderator_1 @Moderator_2 @Moderator_3, @Moderator_4 , could you please respond to this?

      [E 250128 10:19:46 smartConnect:242] Error occurred while making a POST request to https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers. Error: Something Went Wrong, Please Try After Sometime. URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/marketData/v1/gainersLosers, Headers: {'Content-type': 'application/json', 'X-ClientLocalIP': '127.0.0.1', 'X-ClientPublicIP': '106.193.147.98', 'X-MACAddress': '87:9e:2a:03:ef:88', 'Accept': 'application/json', 'X-PrivateKey': 'hidden', 'X-UserType': 'USER', 'X-SourceID': 'WEB'}, Request: {'datatype': 'PercPriceGainers', 'expirytype': 'NEAR'}, Response: {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      posted in General Discussion
      W
      whemant
    • RE: Announcing Top Gainers/ Losers, PCR and OI BuildUp APIs for SmartAPI Users

      hello @Moderator_1

      I am getting an error AB1004 when the datatype = PercPriceGainers. Other datatypes PercOIGainers, PercOILosers, PercPriceLosers all working fine

      login_obj = user_details['obj']

      params = {
      "datatype": "PercPriceGainers",
      "expirytype": "NEAR"
      }

      print(login_obj.gainersLosers(params))

      {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      This was working fine till yesterday.

      posted in General Discussion
      W
      whemant
    • RE: Internal Server error for all requests

      I am also getting similar error but not for all requests.
      for example:

      gainersLosers for PercOILosers and PercPriceLosers is working fine.

      But gainersLosers for PercOIGainers and PercPriceGainers is giving the error

      params = {
      "datatype": "PercOIGainers",
      "expirytype": "NEAR"
      }

      print(login_obj.gainersLosers(params))

      {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      login_obj = user_details['obj']

      params = {
      "datatype": "PercPriceGainers",
      "expirytype": "NEAR"
      }

      {'message': 'Something Went Wrong, Please Try After Sometime', 'errorcode': 'AB1004', 'status': False, 'data': None}

      posted in Bugs
      W
      whemant
    • Stop Loss Gap Requirement for ROBO Orders

      Hello,

      I am reaching out to understand the requirement for a significant gap between the order limit price and the stop-loss price for ROBO orders.

      Here are the parameters I used while placing a SELL ROBO order for NTPC:

      Variety: "ROBO"
      Tradingsymbol: "NTPC-EQ"
      Symboltoken: "11630"
      Transaction Type: "SELL"
      Exchange: "NSE"
      Order Type: "LIMIT"
      Product Type: "BO"
      Duration: "DAY"
      Price (Limit Price): "334.90"
      Squareoff: "8"
      Stoploss: "3"
      Quantity: "6"
      The order failed with the message:
      "The gap between stop loss and limit price should be wider."

      However, when I increased the Stoploss to 4 or 5, the order got executed. I believe a gap of 3 (~0.9%) is already sufficient, and requiring a higher gap seems unnecessary.

      Could you please clarify why this high gap is required for placing ROBO orders?

      Looking forward to your response.

      posted in General Discussion
      W
      whemant
    • RE: Attempting to resubscribe/reconnect

      @0xc0de Yes, I managed to fix it. There was a small error in my code. Strangely the previous version of smartapi-python did not have any issues with this error, but the new version did. As soon as I installed the new version, the problem started appearing.

      It is easy to check if your code also has some existing issues. In the smartWebSocketV2, in the _on_error function, print the error message, and it will show what is wrong with your code:

      def _on_error(self, wsapp, error):
      print(f'error: {error}')

      posted in Python SDK
      W
      whemant
    • Attempting to resubscribe/reconnect

      Hello,

      I have been using WebSocket in my Python code for a while. Today, I had to reinstall smartapi-python and websocket-client because my virtual environment's library got deleted by mistake. I didn't make any changes to my Python code. After reinstalling these libraries, I started encountering the error message 'Attempting to resubscribe/reconnect'. The code was working fine until yesterday.

      Why is this error appearing now?

      I am using Python 3.10.7.

      posted in Python SDK
      W
      whemant
    • RE: Websocket to fetch options data

      @Moderator_1
      It worked thanks.

      posted in Python SDK
      W
      whemant
    • Websocket to fetch options data

      Hello,

      I am using Websocket to fetch live data for stocks. I have a requirrement to fetch index options data. Please can somebody confirm what value I need to pass to exchangeType? I tried using various values as mentioned in the code:

                      exchangeType: integer
                      possible values ->
                          1 -> nse_cm
                          2 -> nse_fo
                          3 -> bse_cm
                          4 -> bse_fo
                          5 -> mcx_fo
                          7 -> ncx_fo
                          13 -> cde_fo
      

      But none of these are producing the results.

      Is there any other change I need to do to get index option data?

      Thanks in advance

      posted in Python SDK
      W
      whemant
    • Historic API not working

      I know that the rate limit of historic API is 3 requests per second. However today I am getting error b'Access denied because of exceeding access rate' randomly. sometime just after 1st request, sometimes after 2nd request.
      @admin @admin123 is there any problem with the API today? Please confirm.

      posted in Bugs
      W
      whemant
    • RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language

      Hi @asho and @vrkhyd if anyone of you can provide any help on this? Thanks.

      posted in Python SDK
      W
      whemant