Skip to main content

Short strangle

The Short Strangle places two orders which one leg will be call and another will be put, the strike price can be defined by the users and both the strike prices could be different, over here the user is able to define hedge value which will then place two buy and two sell orders.

Method: POST

https://connect.thefirstock.com/api/V3/strategies/shortStrangle

Request details

ParameterDescriptionData typesExample
symbolTrading Symbol e.g.("NIFTY", "BANKNIFTY")String"NIFTY"
callStrikePriceStrike Price of the symbol e.g.("17500", "16130")String"17500"
putStrikePriceStrike Price of the symbol e.g.("17500", "16130")String"17500"
expiryDate month year e.g.("03NOV22")String"16JAN23"
productC / M / I C -> Cash and Carry, M -> F&O Normal, I -> IntradayString"C"
quantityOrder QuantityString"1"
remarksUser can send remarks for the orderString"shortStrangle"
hedgeThis parameter enables the hedge to used or not, type: boolboolfalse
hedgeValueATM value for the hedge to be placed, type: integerInteger300
jKeyKey Obtained on login success.String"28fa3983bd7a6334848b
eeb7358ab57fccf19d46a
b16c7dac81bf154e65061ce"
userIdUser Id of the login userString"AA1999"
curl --location 'https://connect.thefirstock.com/api/V3/strategies/shortStrangle' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "NIFTY",
"callStrikePrice": "18000",
"putStrikePrice": "17800",
"expiry": "23FEB23",
"product": "C",
"quantity": "20",
"remarks": "Test1",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38",
"userId": "AA123",
"hedge":"True" ,
"hedgeValue":"300"
}'

Success response details

ParameterDescriptionData typesExample
statusSuccess String"Success"
data.requestTimeResponse received time.String"17:46:08 16-02-2023"
data.orderNumberIt will be present only on successful Order placement to OMS.String"1234567890111"

Failure response details

ParameterDescriptionData TypeExample
statusFailedString"Failed"
codeHTTP CodeString"401"
nameType of errorString"BAD_REQUEST"
error.fieldError fieldString"quantity"
error.messageError messageString"quantity cannot be undefined or NULL"

Sample response

[
{
status: "Success",
data: {
requestTime: "17:46:08 16-02-2023",
orderNumber: "1234567890111",
},
},
{
status: "Success",
data: {
requestTime: "17:46:08 16-02-2023",
orderNumber: "1234567890111",
},
},
];