Skip to content

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.


POST: /apiV2/strategies/longStraddle

https://connect.thefirstock.com/apiV2/strategies/longStraddle

Request Details

Parameter Description
symbol Trading Symbol e.g.("NIFTY", "BANKNIFTY")
strikePrice Strike Price of the symbol e.g.("17500", "16130")
expiry Date month year e.g.("03NOV22")
product C / M / I C -> Cash and Carry, M -> F&O Normal, I -> Intraday
quantity Order Quantity
remarks User can send remarks for the order
jKey Key Obtained on login success.
actId Act Id of the login user

Code

curl --X POST 'https://connect.thefirstock.com/apiV2/strategies/longStraddle' \
--H 'Content-Type: application/json' \
--d '{
    "symbol": "",
    "strikePrice": "",
    "expiry": "",
    "product": "",
    "quantity": "",
    "remarks": "",
    "jKey": "",
    "actId": ""
}'
from thefirstock import thefirstock

LS = thefirstock.firstock_LongStraddle(
    symbol="",
    strikePrice="",
    expiry="",
    product="",
    quantity="",
    remarks=""
)

```javascript const Firstock = require('thefirstock');

const firstock = new Firstock(); firstock.longStraddle( { symbol: "NIFTY", strikePrice: "17000", expiry: "10NOV22", product: "I", quantity: "1", remarks: "longStraddle", }, (err, result) => { console.log("Error, ", err); console.log("Result: ", result); } );

    var result = firstock.longStraddle(symbol: "NIFTY",
                                       putStrikePrice: "17000",
                                       callStrikePrice: "16000",
                                       expiry: "05DEC22",
                                       product: "I",
                                       quantity: "10",
                                       remarks: ""




);

```

Success Response Details

Parameter Description
data.requestTime Response received time.
data.orderNumber It will be present only on successful Order placement to OMS.

Failure Response Details

Parameter Description
Status Failed
data Type of error

Sample Response

[
{
    "Status": "Success",
    "data": {
        "requestTime": "14:49:28 07-11-2022",
        "orderNumber": ""
    }
},
{
    "Status": "Success",
    "data": {
        "requestTime": "14:49:28 07-11-2022",
        "orderNumber": ""
    }
}
]
[
{
  "Status": "Failed",
  "data": "Invalid Input :   Invalid Trading Symbol"
},
{
  "Status": "Failed",
  "data": "Invalid Input :   Invalid Trading Symbol"
}
]