Skip to main content

Get option chain

The Get Option Chain APIs allow you to access the complete list of option scrip codes for a specific underlying instrument. With this scrip code, you can subscribe to real-time data via websocket.

Method: POST

https://connect.thefirstock.com/api/V3/optionChain

Request details

ParameterDescriptionData typesExample
userIdUser Id of the login userString"AA199"
exchangeExchange - NFOString"NFO"
tradingSymbolTrading Symbol (use url encoding to avoid special char error for symbols like M&M) NSE NFO.String"BANKNIFTY28APR22C37400"
strikePriceMid price for option chain selectionString"37400"
countNumber of strike to return on one side of the mid price for PUT and CALL. (example cnt is 4, total 16 contracts will be returned, if cnt is is 5 total 20 contract will be returned)String"5"
jKeyKey Obtained on login success.String"d4180daa72ea70885ab0
d0fb38f0fa5796352b57d
e0641d4442294b87f2b7315"
 curl -X POST 'https://connect.thefirstock.com/api/V3/optionChain'
-H 'Content-Type: application/json'
-d '{
"userId": "AA123",
"jKey": "e6a211bea63adff386578988e1cf4a9521c4744e6a39ad63174c8797e2af8c38",
"exchange": "NFO",
"tradingSymbol": "NIFTY23FEB23C18000",
"strikePrice": "18000",
"count": "5"
}'

Response Success Details

ParameterDescriptionData typesExamples
statusMarket watch success or failure indication.String"Success"
valuesArray of json objects. (object fields given in below table)String["exchange": "NFO","token": "51909",
"tradingSymbol":"NIFTY19JAN23C20050",
"optionType": "CE", "pricePrecision":
"2","lotSize": "50","tickSize":
"0.05","strikePrice": "20050.00" ]

Response Details: Array of Object Values in JSON Fields.

ParameterDescriptionData TypeExample
data.requestTimeResponse received timeString"13:25:51 24-08-2022"
values.exchangeNFOString"NFO"
values.tradingSymbolTrading symbol of the scrip (contract)String"NIFTY19JAN23C20050"
values.tokenToken of the scrip (contract)String "48831"
values.optionTypeOption TypeString"CE"
values.strikePriceStrike priceString"35500.00"
values.pricePrecisionPrice precisionString"2"
values.tickSizeTick sizeString"0.05"
values.lotSizeLot sizeString"25"

Failure response details

ParameterDescriptionData TypeExample
statusFailedString"Failed"
codeHTTP CodeString"401"
nameType of errorString"INVALID_COUNT"
error.fieldError fieldString "Count"
error.messageError messageString"Count parameter is invalid"

Sample response

{
"status": "Success",
"data": {
"requestTime": "13:25:51 24-08-2022""values": [
{
"exchange": "NFO",
"token": "48831",
"tradingSymbol": "NIFTY19JAN23C20050",
"optionType": "CE",
"pricePrecision": "2",
"lotSize": "25",
"tickSize": "0.05",
"strikePrice": "35500.00"
},
{
"exchange": "NFO",
"token": "48834",
"tradingSymbol": "NIFTY19JAN23C20050",
"optionType": "CE",
"pricePrecision": "2",
"lotSize": "25",
"tickSize": "0.05",
"strikePrice": "35600.00"
}
]
}
}