Navigation

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

    Access denied because of exceeding access rate

    Test
    0
    10
    92
    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.
    • S
      StocksDeveloper last edited by

      This has been long overdue. We have reported it multiple times.

      Could this be fixed once & for all please.

      It is just coming randomly. Happy to work along with you folks to get this sorted. We have already put checks on our side (added delay) to avoid hitting limit; which was even shown to one of your tech person. But we just keep getting these a lot. Here are some log snippets:

      Logs:

      AMVRA1388 - 2022-07-31 19:21:11.760 - Access denied because of exceeding access rate
      N178263 - 2022-07-31 19:21:11.740 - Access denied because of exceeding access rate
      S1625198 - 2022-07-31 21:32:06.001 - Access denied because of exceeding access rate

      A 1 Reply Last reply Reply Quote 0
      • R
        ramk last edited by

        Would love to see a permanent fix for this. Order placement API endpoint as per your API limits documentation accepts 10 orders per second. But I get kicked out during intermittently during order placement ( I place 6 orders part of iron-fly strategy).

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

          Hi @StocksDeveloper @ramk can you please share more details about the same ? or help us to reproduce the issue at our end?

          S 2 Replies Last reply Reply Quote 0
          • R
            ramk last edited by

            try:
            orderId = login_obj.placeOrder(orderparams)
            logger.info("The order id is: {}".format(orderId))
            except Exception as e:
            logger.error("Order placement failed: {}".format(e))
            return orderId

            I use the above code 6 times inside a method and supply login_obj as a parameter to the method. Intermittently one order error stating api limit breached and access is denied.

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

              Hi @ramk is your code on local machine or AWS?

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

                Hi @StocksDeveloper is your code running on AWS too ?

                1 Reply Last reply Reply Quote 0
                • R
                  ramk last edited by

                  I get the error consistently in AWS. But have also seen the error when running the code locally.

                  1 Reply Last reply Reply Quote 0
                  • S
                    StocksDeveloper @admin last edited by

                    @admin Hello,

                    Thanks for your response. Our servers run on google cloud.

                    We did give account numbers when the ticket was opened. We can share again if you need.

                    If you have logs of each request (including the requests that are return "access rate" error), then this can completely be investigated on your side. We get hundreds of these errors everyday.

                    Happy to discuss on phone. We can have a meeting with one of your developers or feel free to contact us on phone/whatsapp.
                    https://stocksdeveloper.in/contact-us/

                    1 Reply Last reply Reply Quote 0
                    • S
                      StocksDeveloper @admin last edited by StocksDeveloper

                      @admin The steps to reproduce are pretty simple. Take any sample trading a/c & keep hitting api request (keep it just within the API limits set by your system).

                      Example: If placeOrder api request is allowed 10 times per 5 second, then keep hitting this limit. Do not go over it.

                      Do this for all major api paths (placeOrder, read margin/order/positions) etc.

                      If you are staying on or very close to the limit, you should never get "Access denied" error. But if you do get then it means your API limit check component has some bug.

                      1 Reply Last reply Reply Quote 0
                      • S
                        StocksDeveloper last edited by

                        Team,

                        We have also mentioned steps to reproduce. Could you please have someone check this.

                        It has mentioned by multiple users. And we have added delays in code to be in line with your API limits. Still these errors are coming, so we really need to get to the bottom of this.

                        If it's a bug on your side, please fix it or if it something that we need to do on our side then let us know accordingly.

                        Thanks!

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