Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. projectSB
    3. Posts
    P
    • Profile
    • Following 0
    • Followers 0
    • Topics 14
    • Posts 41
    • Best 4
    • Groups 0

    Posts made by projectSB

    • RE: Important Updates to SmartAPI in Compliance with SEBI Guidelines

      @admin - In the context of Static IPs, can multiple clients have SAME static IPs? (rest being unique, like API secret etc.)

      A lot of people might be trading via 3rd party Algo providers (like Tradetron, AlgoTest etc.)? That is, 1 system (IP) can be executing orders for multiple clients).
      What about them? Will it work?

      posted in General Discussion
      P
      projectSB
    • RE: Important Updates to SmartAPI in Compliance with SEBI Guidelines

      @staticip Very good observation! The very concept of Static IP registration means painting a bulls-eye on the user for DDoS attacks by bad actors.

      posted in General Discussion
      P
      projectSB
    • RE: Important Updates to SmartAPI in Compliance with SEBI Guidelines

      @admin What about the old APP? When I registered my static IP, I could not register it with my existing App. Is that expected?

      posted in General Discussion
      P
      projectSB
    • What is this error - 'An existing connection was forcibly closed by the remote host'. Faced while placing a market order.

      Hi @admin ,

      I got the following error while my algo was running fine today:

      2025-07-29 13:33:08,801 ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

      The API request was for Placing a market order to exit an existing position.

      Details:
      "instrument": "NIFTY31JUL2524700PE"

      Note that the system was fine from the morning, and was executing orders as well.

      Need your help ASAP, other wise my system won't run tomorrow and Angel will lose revenue 🙂

      Thanks
      -Sid

      posted in Python SDK
      P
      projectSB
    • getMargin function is not considering active positions for margin calculations

      Hi @admin ,

      smartApi.getMarginApi(position_params) - This API is supposed to calculate the margin requirement for the basket of orders included in the 'position_params'.

      However, this is not considering the already open positions for margin calculations. So, it becomes very difficult to calculate the exact cash requirement for us traders in real time, for legged option positions.

      Is this expected? Or how do I force the API to consider active positions?

      Please help!
      Thanks!
      -Sid

      posted in Python SDK
      P
      projectSB
    • RE: Web Socket Issue

      @Nichil72 I have messaged you, and shared my email.

      posted in Java SDK
      P
      projectSB
    • RE: Web Socket Issue

      @Nichil72 Message me directly. I can help with Python development.

      posted in Java SDK
      P
      projectSB
    • RE: Release Note: Free Historical Data Access for Indices, NSE, NFO, BSE, BFO, MCX, and CDS with SmartAPI!

      @Moderator_1 Yes please! OI data will help us a lot

      posted in General Discussion
      P
      projectSB
    • RE: Websocket Connection automatically closes after placing a order

      @rohit4417k Are you placing orders from the same thread as Websocket?
      If yes, then it will disconnect as order placement makes the Websocket out of sync. Always, use a separate thread for monitoring data and placing orders etc. Your Websocket thread should ONLY fetch the data and store in some data structure.

      I had faced this issue, and this was my way of resolving it. Others might have different opinion as well.

      posted in Python SDK
      P
      projectSB
    • How many simultaneous instances are allowed for a single client of SmartAPI?

      @admin @Moderator_1 @Moderator_2 @Moderator_3

      How many simultaneous instances of SmartAPI applications are allowed for a single client of AngelOne?

      posted in General Discussion
      P
      projectSB
    • RE: I think they are changing or updating the script master

      @Mnagesh I hate when A1 folks change things without notification! They don't understand the kind of disruption and anxiety it creates.

      @admin @Moderator_1 @Moderator_2 - What is the update regarding this issue?

      posted in General Discussion
      P
      projectSB
    • SmartAPI website shows weird URL - cloudFront

      Hi @admin @Moderator_1 @Moderator_2

      Is there a change in the URL of the SmartAPI pages? When I try to login to SmartAPI to enable TOTP, I see this as the URL:

      https://d24vxxstyf61rc.cloudfront.net/enable-totp

      Is this valid? Or this might be a phishing attack?? Please confirm ASAP!

      Here is the screenshot for the same:

      SmartAPI_cloudFront.JPG

      posted in General Discussion
      P
      projectSB
    • RE: AngelOne RMS is unable to quickly adjust margins for spreads!

      @Moderator_1 Hello, what is the update on this issue?

      Also, please mention if there is any difference in INTRADAY margin vs CARRYFORWARD margin. If yes, then by how much?
      Or you can use current week's Nifty ATM options to get the answer.

      You can use the example mentioned in the screenshot itself. I don't think that we get any leverage in FNO trading from AngelOne. Please confirm. In that case we will use only CARRYFORWARD orders.

      posted in General Discussion
      P
      projectSB
    • RE: AngelOne RMS is unable to quickly adjust margins for spreads!

      @Moderator_1 And also note that, I always trigger BUY orders, wait for its completion and then trigger SELL orders to get the margin benefits. FYI

      posted in General Discussion
      P
      projectSB
    • RE: AngelOne RMS is unable to quickly adjust margins for spreads!

      @Moderator_1 In that case, it seems that the RMS is

      1. Holding much more amount than the margin required! For example, this is what your margin calculator shows:

      ea936a72-d992-4233-99ac-dc5c59267fda-image.png

      And this is what was left in my usable funds when I was trading the same setup:
      I have around 1.47 lakhs as funds, and during the trade I had around 80000 remaining, so approx 70000 was captured as margin (55% more than what's shown!)!

      BNF_1lot4legs_margin.JPG

      Check my order and trade history for today, and you will be able to verify. Client code: S382492

      1. And secondly, in real time, this margin captured is even more! Meaning if I have to place 4 orders simultaneously the RMS is slow in getting the actual hedged margin.
      posted in General Discussion
      P
      projectSB
    • This is how a profitable position ends up losing due to unreliable SmartAPIs: Max retries exceeded with url: /rest/secure/angelbroking/order/v1/placeOrder (Caused by ConnectTimeoutError

      @admin @Moderator_1 @Moderator_2

      Could someone please explain why I got this error while placing orders today?

      Sequence of events:
      1 order was placed and it was Completed
      LOG entry: 2024-02-16 15:04:40,330 BUY avgPrice of BANKNIFTY29FEB2446600CE: 623.45 order_ID: 240216001663375 complete

      The second order got the following error:

      LOG entry: 2024-02-16 15:04:47,346 HTTPSConnectionPool(host='apiconnect.angelbroking.com', port=443): Max retries exceeded with url: /rest/secure/angelbroking/order/v1/placeOrder (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x0F5F12C8>, 'Connection to apiconnect.angelbroking.com timed out. (connect timeout=7)'))

      Client code: S382492

      Note:

      1. The failed order did not reach the portal at all. Had to exit remaining ones manually, with loss!

      2. I have been using the same code block for last few days, and it was working fine, so its NOT a code issue.

      3. It was only the 2nd order, thus rate limit could NOT have exceeded.

      Please provide a proper explanation, and how to rectify it. Else I will have to switch back to Zerodha. Also, try answering my previous queries, which are still open without replies.

      posted in Python SDK
      P
      projectSB
    • RE: Session termination issue

      @Moderator_2 Hey, I have just posted the same issue today!

      Order_Status_issue_cropped.JPG

      Seems like this issue is NOT fixed! Please clarify what do you mean by "consume the recent SDK". Specific steps will really help!

      posted in Python SDK
      P
      projectSB
    • RE: Individual order status API throws error for unknown reason!

      @Moderator_2 I have used neither of the APIs you have mentioned. There is another API:

      orderResponse = smartApi.individual_order_details(uniqueOrderID)

      This allows you to extract the order status (Open, Completed or Rejected, and other details) directly without the need to fetch the whole orderbook / tradebook.
      Isn't this the whole purpose of bringing the 'UniqueOrderId' feature you guys deployed?

      Reference: https://smartapi.angelbroking.com/topic/4013/important-update-individual-order-status-api-using-unique-order-id-10-requests-second

      Anyways, my client ID is S382492

      Please have a look and suggest what's the root cause. And also, whether we should be using the new API or not.

      posted in Python SDK
      P
      projectSB
    • Individual order status API throws error for unknown reason!

      @admin @Moderator_1 @Moderator_2

      Hi Folks,

      Please check the below issue:
      I have used the individual order status API to fetch the order status after firing an order. It was working fine, but it threw the following error for one of them:

      Order_Status_issue_cropped.JPG

      The error was: [E 240208 15:03:27 smartConnect:479] Error occurred in ind_order_details: ('Connection aborted.', ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))

      Note that the actual order got executed - order ID - 240208002143933.

      Kindly help in understanding the root cause to avoid such issues in the future.

      Here is the the code block used by me:

      response = smartApi.placeOrderFullResponse(orderparams)
      print(response)
      if response['message'] == "SUCCESS":
      uniqueOrderID = response['data']['uniqueorderid']
      while True:
      orderResponse = smartApi.individual_order_details(uniqueOrderID)
      if orderResponse['data']['orderstatus'] == 'complete':
      orderStatus = orderResponse['data']['orderstatus']
      orderID = orderResponse['data']['orderid']
      avgPrice = orderResponse['data']['averageprice']
      logger.info(transactionType+" avgPrice of "+tradingSymbol+": "+str(avgPrice)+" order_ID: "+str(orderID)+" "+orderStatus)
      break
      if orderResponse['data']['orderstatus'] == 'rejected':
      break
      time.sleep(0.1)

      posted in Python SDK
      P
      projectSB
    • RE: Basket order support

      @shashwatVar @admin @Moderator_1 @Moderator_2

      A much needed feature! Please confirm when this will be available in SmartAPI.

      posted in General Discussion
      P
      projectSB