Error Response while placing order


  • 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


  • 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


  • @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