Navigation

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

    bonitarinaldi

    @bonitarinaldi

    16
    Reputation
    21
    Posts
    49
    Profile views
    3
    Followers
    0
    Following
    Joined Last Online

    bonitarinaldi Follow

    Best posts made by bonitarinaldi

    This user hasn't posted anything yet.

    Latest posts made by bonitarinaldi

    • 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
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • RE: Websocket to fetch options data

      @Moderator_1
      It worked thanks.

      posted in Python SDK
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • 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
      B
      bonitarinaldi
    • RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language

      Hi @vrkhyd,

      I am getting data in below format:

      {'subscription_mode': 3, 'exchange_type': 5, 'token': '246083', 'sequence_number': 2414112, 'exchange_timestamp': 1674818721000, 'last_traded_price': 672400, 'subscription_mode_val': 'SNAP_QUOTE', 'last_traded_quantity': 1, 'average_traded_price': 667360, 'volume_trade_for_the_day': 8589, 'total_buy_quantity': 644.0, 'total_sell_quantity': 384.0, 'open_price_of_the_day': 661700, 'high_price_of_the_day': 672700, 'low_price_of_the_day': 661700, 'closed_price': 653300, 'last_traded_timestamp': 1674818717, 'open_interest': 535600, 'open_interest_change_percentage': -4627489742054556454, 'upper_circuit_limit': 679400, 'lower_circuit_limit': 627200, '52_week_high_price': 678100, '52_week_low_price': 599400, 'best_5_buy_data': [{'flag': 0, 'quantity': 7, 'price': 672600, 'no of orders': 6}, {'flag': 0, 'quantity': 14, 'price': 672700, 'no of orders': 12}, {'flag': 0, 'quantity': 10, 'price': 672800, 'no of orders': 10}, {'flag': 0, 'quantity': 7, 'price': 672900, 'no of orders': 6}, {'flag': 0, 'quantity': 29, 'price': 673000, 'no of orders': 21}], 'best_5_sell_data': [{'flag': 1, 'quantity': 35, 'price': 672400, 'no of orders': 11}, {'flag': 1, 'quantity': 23, 'price': 672300, 'no of orders': 3}, {'flag': 1, 'quantity': 1, 'price': 672200, 'no of orders': 1}, {'flag': 1, 'quantity': 2, 'price': 672100, 'no of orders': 2}, {'flag': 1, 'quantity': 12, 'price': 672000, 'no of orders': 4}]}

      Please could explain how you are converting this data in to get 1 min candlestick data? If you could share your code that will be of great help. Thanks.

      posted in Python SDK
      B
      bonitarinaldi
    • RE: FINNIFTY TOKEN NOT PRESENT

      @admin any updates on this? When this will be available?

      posted in General Discussion
      B
      bonitarinaldi