For the complete documentation index, see llms.txt. This page is also available as Markdown.

OptionSymbol

Get the option symbol based on underlying, expiry, offset (ATM/ITM/OTM), and option type. This endpoint resolves the correct strike price automatically.

Endpoint URL

Local Host   :  POST http://127.0.0.1:5000/api/v1/optionsymbol
Ngrok Domain :  POST https://<your-ngrok-domain>.ngrok-free.app/api/v1/optionsymbol
Custom Domain:  POST https://<your-custom-domain>/api/v1/optionsymbol

Sample API Request (ATM Option)

{
  "apikey": "<your_app_apikey>",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "30DEC25",
  "offset": "ATM",
  "option_type": "CE"
}

Sample cURL Request

curl -X POST http://127.0.0.1:5000/api/v1/optionsymbol \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "30DEC25",
  "offset": "ATM",
  "option_type": "CE"
}'

Sample API Response (ATM Option)

Sample API Request (ITM Option)

Sample API Response (ITM Option)

Sample API Request (OTM Option)

Sample API Response (OTM Option)

Request Body

Parameter
Description
Mandatory/Optional
Default Value

apikey

Your OpenAlgo API key

Mandatory

-

underlying

Underlying symbol (NIFTY, BANKNIFTY, SENSEX)

Mandatory

-

exchange

Exchange: NSE_INDEX, BSE_INDEX

Mandatory

-

expiry_date

Expiry date in DDMMMYY format

Mandatory

-

offset

Strike offset: ATM, ITM1-ITM50, OTM1-OTM50

Mandatory

-

option_type

Option type: CE or PE

Mandatory

-

Response Fields

Field
Type
Description

status

string

"success" or "error"

symbol

string

Resolved option symbol

exchange

string

Options exchange (NFO/BFO)

lotsize

number

Lot size for the option

tick_size

number

Minimum price movement

freeze_qty

number

Maximum quantity per order

underlying_ltp

number

Current underlying price

Understanding Offset

Offset
Description
CE Strike Direction
PE Strike Direction

ATM

At-The-Money

Closest to LTP

Closest to LTP

ITM1-ITM50

In-The-Money

Below LTP

Above LTP

OTM1-OTM50

Out-of-The-Money

Above LTP

Below LTP

Lot Sizes

Underlying
Lot Size

NIFTY

65

BANKNIFTY

30

SENSEX

20

Notes

  • The offset is calculated based on actual strike intervals in the database

  • underlying_ltp shows the current price used for ATM calculation

  • Use this endpoint to discover the symbol before placing orders

  • For placing orders directly with offset, use OptionsOrder


Back to: API Documentation

Last updated