Skip to main content

strategy

Long Straddle

The Long Straddle 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 should be same.

Method: POST

https://connect-go.thefirstock.tech/api/V5/longStraddle

Request details

API Parameters
Key Value Type Mandatory
userId NP2007 String Yes
jKey abc123 String Yes
strikePrice 22500 String Yes
expiry 27Feb25 String Yes
symbol NIFTY String Yes
product C String Yes
quantity 1 String Yes
exchange NFO String Yes
priceType MKT String Yes
retention DAY String Yes
remarks Long Straddle String No

Libraries and SDKs

Tabbed Interface
curl --location 'https://connect-go.thefirstock.tech/api/V5/shortStraddle' \
--header 'Content-Type: application/json' \
--data '{
    "userId": "NP2997",
    "jKey": "1478b9b71707210d8851258599b23a6a73d31b19809ac5068560f38dad493d35",
    "strikePrice": "22800",
    "expiry": "27FEB25",
    "symbol": "NIFTY",
    "product": "C",
    "quantity": "1",
    "exchange": "NFO",
    "priceType": "MKT",
    "retention": "DAY",
    "remarks": "Short Straddle",
    "hedge": true,
    "hedgeValue": 300
}'


Success response details

API Parameters
Parameter Description Example
status
String
Indicates the result status of
the API operation
success
data.requestTime
String
Response received time. 17:39:14 16-02-2023
data.orderNumber
String
Present only on successful
Order placement to OMS
1234567890111
[
  {
    "gui_order_id": "(null)",
    "handlinst": "(null)",
    "norenordno": 25031200006761,
    "req_status": "OK"
  },
  {
    "gui_order_id": "(null)",
    "handlinst": "(null)",
    "norenordno": 25031200006762,
    "req_status": "OK"
  }
];

Failure response details

API Parameters
Parameter Description Example
status
String
Indicates the result status
of the API operation
failed
code
String
HTTP status code associated
with the error
401
name
String
Specifies the type or
category of the error
encountered
INVALID_TRADINGSYMBOL
error.field
String
Field in the request that
triggered the error
tradingSymbol
error.message
String
Detailed message describing
the error
TradingSymbol parameter
is invalid
[
  {
    status: fFailed",
    code: "401",
    name: "INVALID_TRADINGSYMBOL",
    error: {
      field: "TradingSymbol",
      message: "TradingSymbol parameter is invalid",
    },
  },
  {
    status: "failed",
    code: "401",
    name: "INVALID_TRADINGSYMBOL",
    error: {
      field: "TradingSymbol",
      message: "TradingSymbol parameter is invalid",
    },
  },
];