Option Chain
This API allows you to get the option chain of an underlying, with Call and Put strikes, India VIX and available expiries.
USE CASE
Fetch the strikes around the current price to build an option-chain screen or pick a strike to trade.
Note
strikecount is the number of strikes on each side of ATM (maximum 50). For example, a strike count of 2 returns ATM plus 2 ITM and 2 OTM strikes for both CE and PE.
Details
- The Optionchain API provides important information about options trading, specifically focusing on strike prices, which are predetermined prices at which an option contract can be exercised. This API offers data for both Call (CE) and Put (PE) options, along with values for index, IndiaVIX (Volatility Index) and available expiry dates.
When using the API, you can specify the number of strike prices you're interested in. For example, if you request a strike count of 2, the API will return data for: - At-The-Money (ATM) strike: The closest strike price to the current market price.
- Out-of-The-Money (OTM) strikes: Strike prices higher than the current market price for Calls (CE) and lower than the current market price for Puts (PE). The API will return data for 2 CE and 2 PE OTM strikes.
- In-The-Money (ITM) strikes: Strike prices lower than the current market price for Calls (CE) and higher than the current market price for Puts (PE). The API will return data for 2 CE and 2 PE ITM strikes.
- Set
greeksto 1 to receivedelta,gamma,theta,vegaandiv. Each strike then carries them in a nestedgreeksobject. - The first
optionsChainentry is the underlying itself (strike_price-1, emptyoption_type), with its future price infp,fpchandfpchp. expiryDatalists the available expiries withdate(DD-MM-YYYY), epochexpiryandexpiry_flag. India VIX is returned inindiavixData.callOiandputOigive total open interest for each side. For each strike,oi,oich,oichpandprev_oishow open interest and its change.- Rate limits differ between the Standard and Prime plans. See Plans & rate limits.
Request Attributes
| Attribute | Data Type | Description |
|---|---|---|
symbol* | string |
|
strikecount | int | Options strike count for symbol(MAX = 50) |
timestamp | string | Options chain data at timestamp |
greeks | string | Set greeks to 1 for greeks data which includes delta, gamma, theta, vega and iv. |
Response Attributes
| Attribute | Data Type | Description |
|---|---|---|
s | string | ok / error |
code | int | This is the code to identify specific responses |
callOi | int | Total open interest for call options |
putOi | int | Total open interest for put options |
date | string | Expiry date in DD-MM-YYYY |
expiry | string | Expiry timestamp |
ask | float | Ask price |
bid | float | Bid price |
description | string | Description of the stock |
ex_symbol | string | Exchange Symbol |
exchange | int |
|
fytoken | string |
|
delta | float | Sensitivity of option price to a 1-unit change in underlying price |
gamma | float | Rate of change of delta with respect to underlying price |
theta | float | Time decay: change in option price per day as expiry approaches |
vega | float | Sensitivity of option price to a 1% change in implied volatility |
iv | float | Implied volatility: expected future volatility derived from option price |
ltp | float | LTP is the price from which the next sale of the stocks happens |
ltpch | float | Change in last traded price |
ltpchp | float | Percentage change in last traded price |
option_type | string | Type of option (if applicable) |
strike_price | int | Strike price (if applicable) |
symbol | string | Symbol |
fp | float | Future price |
fpch | float | Change in future price |
fpchp | float | Percentage change in future price |
oi | int | Open interest |
oich | int | Change in Open interest |
oichp | float | Percentage change in Open interest |
prev_oi | int | Previous Open interest |
volume | int | Volume traded |
Last updated on