Skip to content

Option Chain

This API retrieves option chain data for the selected instrument. Within the query parameters, "token" denotes the instrument token of the selected asset. The "num" parameter specifies the quantity of options for a specific expiry, while "price" serves as the reference point for the strike price of the options being retrieved. For instance, if "num" is set to 6 and "price" is 506.5, the API will fetch three options above and three options below the 506.5 strike price.

Endpoint: /api/v1/optionchain/NFO
Method-Type: GET

Query Params

{
    "token": 26009,
    "num": 1,
    "price": 46363
}

Example

response = pocket.getOptionChain(26009, 1, 46363)

Response

{
  "error": {
    "code": 0,
    "message": ""
  },
  "result": [
    {
      "expiry_date": "20MAR24",
      "strikes": [
        {
          "strike_price": 46400,
          "call_option": {
            "token": "41337",
            "exchange": "NFO",
            "company": "BANKNIFTY",
            "symbol": "BANKNIFTY2432046400CE",
            "trading_symbol": "BANKNIFTY20MAR2446400CE",
            "display_name": "BANKNIFTY 20 MAR 24 46400 CE W",
            "strike_price": 46400,
            "ExpiryRaw": "",
            "close_price": "703.8000000"
          },
          "put_option": {
            "token": "41338",
            "exchange": "NFO",
            "company": "BANKNIFTY",
            "symbol": "BANKNIFTY2432046400PE",
            "trading_symbol": "BANKNIFTY20MAR2446400PE",
            "display_name": "BANKNIFTY 20 MAR 24 46400 PE W",
            "strike_price": 46400,
            "ExpiryRaw": "",
            "close_price": "245.6000000"
          }
        },
        {
          "strike_price": 46500,
          "call_option": {
            "token": "41345",
            "exchange": "NFO",
            "company": "BANKNIFTY",
            "symbol": "BANKNIFTY2432046500CE",
            "trading_symbol": "BANKNIFTY20MAR2446500CE",
            "display_name": "BANKNIFTY 20 MAR 24 46500 CE W",
            "strike_price": 46500,
            "ExpiryRaw": "",
            "close_price": "633.7000000"
          },
          "put_option": {
            "token": "41346",
            "exchange": "NFO",
            "company": "BANKNIFTY",
            "symbol": "BANKNIFTY2432046500PE",
            "trading_symbol": "BANKNIFTY20MAR2446500PE",
            "display_name": "BANKNIFTY 20 MAR 24 46500 PE W",
            "strike_price": 46500,
            "ExpiryRaw": "",
            "close_price": "280.1000000"
          }
        }
      ]
    }]
},

Key Description
strike_price The strike price of the option.
call_option Details of the call option associated with the specified strike price.
put_option Details of the put option associated with the specified strike price.
token The unique identifier/token of the option.
exchange The exchange where the option is traded.
company The company associated with the option.
symbol The symbol or ticker of the option.
trading_symbol The trading symbol of the option.
display_name The display name of the option.
ExpiryRaw The raw expiry timestamp of the option.
close_price The closing price of the option.

Error Response

{
    "error": {
        "code": 404,
        "message": "Invalid UnderLyingtoken: 16821"
    },
    "result": ""
}