Navigation

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

    Always getting Internal Error (AB2001) for the brokerage calculation of options trade request

    General Discussion
    0
    5
    21
    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.
    • A
      akagrawal last edited by

      Always getting Internal Error AB2001 for the following request:

      URL: https://apiconnect.angelbroking.com/rest/secure/angelbroking/brokerage/v1/estimateCharges/

      Body: {
      "orders": [
      {
      "product_type": "INTRADAY",
      "transaction_type": "BUY",
      "quantity": 25,
      "price": 144.15,
      "exchange": "NFO",
      "symbol_name": "NIFTY29AUG2424900CE",
      "token": "74692"
      },
      {
      "product_type": "INTRADAY",
      "transaction_type": "SELL",
      "quantity": 25,
      "price": 147.25,
      "exchange": "NFO",
      "symbol_name": "NIFTY29AUG2424900CE",
      "token": "74692"
      }
      ]
      }

      headers: <Same header that is working with other apis like place order, get market data, etc >

      M 1 Reply Last reply Reply Quote 0
      • M
        Moderator_3 @akagrawal last edited by

        @akagrawal

        Kindly check the request format.
        Datatype for quantity and price should be string.

        Refer https://smartapi.angelbroking.com/docs/BrokerageCalculator for correct request format.

        Regards,
        SmartAPI Team

        H 1 Reply Last reply Reply Quote 0
        • A
          akagrawal last edited by

          {
          "orders":[
          {
          "product_type":"INTRADAY",
          "transaction_type":"BUY",
          "quantity":"25",
          "price":"144.15",
          "exchange":"NFO",
          "symbol_name":"NIFTY19SEP2425500CE",
          "token":"68058"
          },
          {
          "product_type":"INTRADAY",
          "transaction_type":"SELL",
          "quantity":"25",
          "price":"147.25",
          "exchange":"NFO",
          "symbol_name":"NIFTY19SEP2425500CE",
          "token":"68058"
          }
          ]
          }

          still getting this response:
          {
          message: 'Internal Error',
          errorcode: 'AB2001',
          status: false,
          data: null
          }

          1 Reply Last reply Reply Quote 1
          • H
            hanukanth @Moderator_3 last edited by

            @Moderator_3
            i am also getting same error for options, it is working for stocks but not working for options
            {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}
            {'message': 'Internal Error', 'errorcode': 'AB2001', 'status': False, 'data': None}
            below is the format
            params = {
            "orders": [
            {
            "product_type": "CARRYFORWARD",
            "transaction_type": "BUY",
            "quantity": "30",
            "price": "49880",
            "exchange": "NFO",
            "symbol_name": "BANKNIFTY27FEB25FUT",
            "token": "35117"
            }
            ]
            }

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

              @hanukanth please try with symbolname of 'BANKNIFTY'

              {
                  "orders": [
                      {
                          "product_type": "CARRYFORWARD",
                          "transaction_type": "BUY",
                          "quantity": "30",
                          "price": "10",
                          "exchange": "NFO",
                          "symbol_name": "BANKNIFTY",
                          "token": "35117"
                      }
                  ]
              } 
              
              1 Reply Last reply Reply Quote 0
              • First post
                Last post