Navigation

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

    Rudra

    @Rudra

    2
    Reputation
    8
    Posts
    1
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Rudra Follow

    Best posts made by Rudra

    • SmartAPI Rate Limits During Market Hours: Best Practices for API Request Management

      Re: Issue with Angel One Scrip Master Download

      I would like to share a few things I have observed while working with SmartAPI, along with some suggestions that might help other developers facing similar issues.

      1. Implement a dedicated API request-routing layer:

      In my opinion, one of the best ways to handle rate limits is to build a dedicated API request-routing layer between your bot and SmartAPI. This layer should centrally manage rate limits, cooldown periods, and other relevant constraints.

      Instead of allowing different modules to send API requests independently, route them through a single layer that controls when requests are sent, handles rate-limit errors, and applies cooldowns where necessary. This can help prevent repeated violations and make the overall system more reliable.

      2. Complete historical data fetching before the market opens:

      One thing I have noticed is that historical data requests generally work more reliably outside market hours. During market hours, rate-limit errors seem to occur more frequently.

      One possible reason could be the increased load on SmartAPI's servers during trading hours, which may affect request processing, especially when new connections are established. I cannot confirm that this is the actual cause, but it is worth looking into.

      My suggestion is to fetch all the historical data you need before the market opens. Use that data to initialise your indicators, warm up your calculations, and prepare the rest of your system. By market open, your bot should already be ready to process live data without needing to fetch historical data at the same time.

      3. Avoid combining historical and live data requests during market hours:

      If possible, avoid sending historical data requests immediately before or alongside live data requests during market hours. Making multiple requests in quick succession can put additional pressure on your API request limits, particularly when the servers are already under heavy load.

      Prepare everything in advance and keep market-hour requests focused on operations that genuinely need to happen in real time.

      4. A suggestion for the SmartAPI team:*

      I also think it would be worth investigating how the API performs under peak market-hour load. If server load or connection handling contributes to the errors developers experience, improvements in request processing and infrastructure scalability could make a real difference.

      Of course, developers need to manage their own API usage properly, but the consistency of the API under heavy load is equally important for anyone building a real-time trading system.

      I am sharing these observations in the hope that they help other developers avoid similar issues and that the SmartAPI team can investigate any underlying infrastructure bottlenecks if necessary.

      The idea is simple: prepare everything you can before market open, manage API requests centrally, and keep your live trading system focused on real-time operations.

      posted in Bugs
      Rudra
      Rudra

    Latest posts made by Rudra

    • RE: SmartAPI Registration Help – Static IP and Redirect URL for Python Dashboard

      You can use google url in redirect url and leave postback url empty.
      Also, you can set one primary and one secondary static ip, which can be updated once per week.
      Ask AI for exact step by step guide.

      posted in General Discussion
      Rudra
      Rudra
    • SmartAPI Rate Limits During Market Hours: Best Practices for API Request Management

      Re: Issue with Angel One Scrip Master Download

      I would like to share a few things I have observed while working with SmartAPI, along with some suggestions that might help other developers facing similar issues.

      1. Implement a dedicated API request-routing layer:

      In my opinion, one of the best ways to handle rate limits is to build a dedicated API request-routing layer between your bot and SmartAPI. This layer should centrally manage rate limits, cooldown periods, and other relevant constraints.

      Instead of allowing different modules to send API requests independently, route them through a single layer that controls when requests are sent, handles rate-limit errors, and applies cooldowns where necessary. This can help prevent repeated violations and make the overall system more reliable.

      2. Complete historical data fetching before the market opens:

      One thing I have noticed is that historical data requests generally work more reliably outside market hours. During market hours, rate-limit errors seem to occur more frequently.

      One possible reason could be the increased load on SmartAPI's servers during trading hours, which may affect request processing, especially when new connections are established. I cannot confirm that this is the actual cause, but it is worth looking into.

      My suggestion is to fetch all the historical data you need before the market opens. Use that data to initialise your indicators, warm up your calculations, and prepare the rest of your system. By market open, your bot should already be ready to process live data without needing to fetch historical data at the same time.

      3. Avoid combining historical and live data requests during market hours:

      If possible, avoid sending historical data requests immediately before or alongside live data requests during market hours. Making multiple requests in quick succession can put additional pressure on your API request limits, particularly when the servers are already under heavy load.

      Prepare everything in advance and keep market-hour requests focused on operations that genuinely need to happen in real time.

      4. A suggestion for the SmartAPI team:*

      I also think it would be worth investigating how the API performs under peak market-hour load. If server load or connection handling contributes to the errors developers experience, improvements in request processing and infrastructure scalability could make a real difference.

      Of course, developers need to manage their own API usage properly, but the consistency of the API under heavy load is equally important for anyone building a real-time trading system.

      I am sharing these observations in the hope that they help other developers avoid similar issues and that the SmartAPI team can investigate any underlying infrastructure bottlenecks if necessary.

      The idea is simple: prepare everything you can before market open, manage API requests centrally, and keep your live trading system focused on real-time operations.

      posted in Bugs
      Rudra
      Rudra
    • RE: Issue with Angel One Scrip Master Download

      @rudra This issue is resolved now, thanks to smart api team.

      posted in Bugs
      Rudra
      Rudra
    • Issue with Angel One Scrip Master Download

      The OpenAPIScripMaster.json file is currently failing to download completely. Both the .angelbroking.com and .angelone.in endpoints return HTTP 200, but the download repeatedly stops midway due to read timeouts.

      The file size is approximately 36.3 MB. The issue has been reproduced using an isolated Python script, while downloads from other providers are completing successfully. This suggests a possible issue with the Scrip Master delivery service or its network path.

      Is this issue being experienced by other SmartAPI users as well? Could the SmartAPI team please investigate and confirm whether any service-side issues are affecting Scrip Master downloads?

      posted in Bugs
      Rudra
      Rudra
    • RE: HTTPSConnectionPool Read timed out

      Yes, it was an issue from their backend but as of now i am completely able to to download the scrip data.

      i think the issue is now resolved from their end but it may take some time to reflect for some users.

      i suggest to try again after 30 to 45 minutes.

      posted in Bugs
      Rudra
      Rudra
    • RE: OpenAPIScripMaster.json Download Failing Issue Resolved

      @krishnkant Yes, it was an issue from their backend but as of now i am completely able to to download the scrip data.

      i think the issue is now resolved from their end but it may take some time to reflect for some users.

      i suggest to try again after 30 to 45 minutes.

      posted in Bugs
      Rudra
      Rudra
    • OpenAPIScripMaster.json Download Failing Issue Resolved

      Hi Team,

      Just an update on this issue.

      The OpenAPIScripMaster.json endpoint is now working normally again.

      The file is downloading successfully without any interruption, and our production trading system is able to initialize and run as expected.

      It appears the issue has been resolved on the server side.

      Thank you to the SmartAPI team for restoring the service. We appreciate the quick resolution.

      Regards,
      Rudrapratap Sharma

      posted in Bugs
      Rudra
      Rudra
    • OpenAPIScripMaster.json Download Failing After Latest Update (HTTP 200, Incomplete Response)

      Hi Team,

      We are facing a critical issue with the latest OpenAPIScripMaster.json endpoint:

      https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json

      This endpoint was working perfectly until yesterday. After today's Script Master update, every download attempt fails.

      The server responds with HTTP 200 OK and advertises a Content-Length of 36,952,921 bytes, but the connection is terminated before the complete file is delivered.

      We have reproduced the same issue using:

      Python (requests)
      Python streaming download
      curl (HTTP/1.1 & HTTP/2)
      Google Chrome
      IPv4 & IPv6

      Errors observed include:

      IncompleteRead
      ChunkedEncodingError
      curl: HTTP/2 stream was not closed cleanly
      curl: end of response with bytes missing

      To rule out local issues, we also verified our internet connection by downloading large files from other HTTPS servers successfully at normal speed.

      No changes have been made to our code or infrastructure. Yesterday's Script Master (~19 MB) downloaded successfully, but today's updated Script Master (~37 MB) consistently fails before completion.

      This is currently blocking our production trading system, as the Script Master is required before initialization.

      Could the SmartAPI team please check whether there is any issue with the latest Script Master file or the server/CDN serving this endpoint? Is anyone else experiencing the same issue today?

      Thank you.

      posted in Bugs
      Rudra
      Rudra