Navigation

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

    Error Response while placing order

    General Discussion
    2
    3
    49
    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.
    • P
      pardeep2411 last edited by

      Dear Team,

      Receiving error while placing order

      DEBUG: POST https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder
      {
      "exchange": "NSE",
      "tradingsymbol": "SBIN-EQ",
      "symboltoken": "3045",
      "transaction_type": "BUY",
      "quantity": "1",
      "price": "19500",
      "producttype": "INTRADAY",
      "order_type": "LIMIT",
      "validity": "DAY",
      "squareoff": "0.0",
      "stoploss": "0.0",
      "variety": "NORMAL"
      }
      DEBUG: Content-Type: application/json; charset=utf-8
      DEBUG: Accept: application/json
      DEBUG: X-ClientLocalIP: 192.168.xxx.xx
      DEBUG: X-clientPublicIP: xx.xxx.xx.xxx
      DEBUG: X-MACAddress: xxxxxxxxxxxxxx
      DEBUG: X-PrivateKey: xxxxxxxx
      DEBUG: X-UserType: USER
      DEBUG: X-SourceID: WEB
      DEBUG: Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJ1c2VybmFtZSI6IlYxNjg5NDEiLCJyb2xlcyI6MCwidXNlcnR5cGUiOiJVU0VSIiwiaWF0IjoxNjA3OTMwMDc5LCJleHAiOjE2MDc5MzkwNzl9.tkC5hTS08tc0bpPAma45iswWATLWyAHNGh-fIL-2ciREoYud9KmgfTt__9UTFprZOQJ1IZ1kGNZSHkc8PC7l2Q

      Error Response : The remote server returned an error: (500) Internal Server Error.

      Regards,
      Venu

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

        @venu

        1. In request body, please don't use underscore in transaction type and order type call.. please refer to our documentation
        2. In headers, content-type .. use only application/json
        3. In headers, "c"lientPublicIP - C should be capital
        P 1 Reply Last reply Reply Quote 0
        • P
          pardeep2411 @admin last edited by

          Hi @admin

          Thanks for the update.

          Problem solved with changes in transaction type and order type variable names as per the documentation.

          and i made changes as per your advice.

          Thank you
          Venu

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