Problem With Margin Section

Trying with margin calculation, But getting error without any explanation here is my error:
{“status”:500,“message”:“Unexpected Error”,“error_code”:“PM_OPEN_API_500”}

My request is formed as below:
{“source”:“N”,“margin_list”:[{“exchange”:“NSE”,“segment”:“D”,“security_id”:“54043”,“txn_type”:“S”,“quantity”:“50”,“strike_price”:18.55,“trigger_price”:“0”,“instrument”:“OPTSTK”}]}

Hi @sanjoy.dasgupta,
Please make sure that you are sending the value of the header ‘Content-Type’ as ‘application/json’

Please refer below to cURL

curl --location --request POST 'https://developer.paytmmoney.com/margin/v1/scrips/calculator' \
--header 'x-jwt-token: {{JWT-TOKEN}}' \
--header 'Content-Type: application/json' \
--data-raw '{
   "source":"N",
   "margin_list":[
      {
         "exchange":"NSE",
         "segment":"D",
         "security_id":"46840",
         "txn_type":"B",
         "quantity":"250",
         "strike_price":"0",
         "trigger_price":"0",
         "instrument":"FUTSTK"
      },
      {
         "exchange":"NSE",
         "segment":"D",
         "security_id":"46834",
         "txn_type":"B",
         "quantity":"250",
         "strike_price":"0",
         "trigger_price":"0",
         "instrument":"FUTSTK"
      },
      {
         "exchange":"NSE",
         "segment":"E",
         "security_id":"27466",
         "txn_type":"B",
         "quantity":"25",
         "strike_price":"0",
         "trigger_price":"0",
         "instrument":"EQUITY"
      }
   ]
}'


1 Like