Skip to content

OptionsOrder

Place an options order by specifying offset (ATM/ITM/OTM) instead of exact strike price. The API automatically resolves the correct option symbol based on the current underlying price.

Endpoint URL

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

Sample API Request (ATM Option)

json
{
  "apikey": "<your_app_apikey>",
  "strategy": "python",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "28OCT25",
  "offset": "ATM",
  "option_type": "CE",
  "action": "BUY",
  "quantity": "65",
  "pricetype": "MARKET",
  "product": "NRML",
  "splitsize": "0"
}

Sample cURL Request

bash
curl -X POST http://127.0.0.1:5000/api/v1/optionsorder \
  -H 'Content-Type: application/json' \
  -d '{
  "apikey": "<your_app_apikey>",
  "strategy": "python",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "28OCT25",
  "offset": "ATM",
  "option_type": "CE",
  "action": "BUY",
  "quantity": "65",
  "pricetype": "MARKET",
  "product": "NRML",
  "splitsize": "0"
}'

Sample API Response (ATM Option)

json
{
  "exchange": "NFO",
  "offset": "ATM",
  "option_type": "CE",
  "orderid": "25102800000006",
  "status": "success",
  "symbol": "NIFTY28OCT2525950CE",
  "underlying": "NIFTY28OCT25FUT",
  "underlying_ltp": 25966.05
}

Sample API Request (ITM Option)

json
{
  "apikey": "<your_app_apikey>",
  "strategy": "python",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "28OCT25",
  "offset": "ITM4",
  "option_type": "PE",
  "action": "BUY",
  "quantity": "65",
  "pricetype": "MARKET",
  "product": "NRML",
  "splitsize": "0"
}

Sample API Response (ITM Option)

json
{
  "exchange": "NFO",
  "offset": "ITM4",
  "option_type": "PE",
  "orderid": "25102800000007",
  "status": "success",
  "symbol": "NIFTY28OCT2526150PE",
  "underlying": "NIFTY28OCT25FUT",
  "underlying_ltp": 25966.05
}

Sample API Request (OTM Option)

json
{
  "apikey": "<your_app_apikey>",
  "strategy": "python",
  "underlying": "NIFTY",
  "exchange": "NSE_INDEX",
  "expiry_date": "28OCT25",
  "offset": "OTM5",
  "option_type": "CE",
  "action": "BUY",
  "quantity": "65",
  "pricetype": "MARKET",
  "product": "NRML",
  "splitsize": "0"
}

Offset Values

OffsetDescription
ATMAt-The-Money (strike closest to current price)
ITM1 to ITM50In-The-Money (1-50 strikes away)
OTM1 to OTM50Out-of-The-Money (1-50 strikes away)

Understanding ITM/OTM for CE and PE

Option TypeITM DirectionOTM Direction
CE (Call)Lower strikesHigher strikes
PE (Put)Higher strikesLower strikes

Request Body

ParameterDescriptionMandatory/OptionalDefault Value
apikeyYour Tradeboard API keyMandatory-
strategyStrategy identifierMandatory-
underlyingUnderlying symbol (NIFTY, BANKNIFTY, etc.) or a futures symbol that already carries the expiryMandatory-
exchangeUnderlying's exchange. Any value in the shared VALID_EXCHANGES list passes validation; the practical values are NSE_INDEX, NSE, BSE_INDEX, BSE, NFO, BFOMandatory-
expiry_dateExpiry date in DDMMMYY format (e.g., 30JUL26)OptionalDerived when underlying includes expiry
strike_intStrike interval, positive integer or null. Omit it so the actual strikes in the instrument master are used, which is the recommended and more accurate pathOptionalDerived from the instrument master
offsetStrike offset: ATM, ITM1-ITM50, OTM1-OTM50Mandatory-
option_typeOption type: CE or PE (lowercase accepted)Mandatory-
actionOrder action: BUY or SELL (lowercase accepted)Mandatory-
quantityOrder quantity, positive integerMandatory-
splitsizeSplit order into chunks (0 = no split)Optional0
pricetypePrice type: MARKET, LIMIT, SL, SL-MOptionalMARKET
productProduct type: MIS or NRML. CNC is rejected for optionsOptionalMIS
priceLimit price (for LIMIT orders)Optional0
trigger_priceTrigger price (for SL orders)Optional0
disclosed_quantityDisclosed quantityOptional0

These fifteen fields are the complete OptionsOrderSchema. Any other field returns HTTP 400. Note that this endpoint takes underlying and offset, never symbol or strike.

Split Response Shape

When splitsize is greater than zero the response replaces orderid with the split summary. The resolved-symbol fields stay the same:

json
{
  "status": "success",
  "symbol": "NIFTY28OCT2525950CE",
  "exchange": "NFO",
  "underlying": "NIFTY28OCT25FUT",
  "underlying_ltp": 25966.05,
  "offset": "ATM",
  "option_type": "CE",
  "total_quantity": 195,
  "split_size": 65,
  "results": [
    {"order_num": 1, "quantity": 65, "status": "success", "orderid": "25102800000006"},
    {"order_num": 2, "quantity": 65, "status": "success", "orderid": "25102800000007"},
    {"order_num": 3, "quantity": 65, "status": "success", "orderid": "25102800000008"}
  ]
}

Response Fields

FieldTypeDescription
statusstring"success" or "error"
orderidstringUnique order ID from broker
symbolstringResolved option symbol
exchangestringExchange where order was placed (NFO/BFO)
offsetstringOffset used for resolution
option_typestringCE or PE
underlyingstringUnderlying futures symbol used for price reference
underlying_ltpnumberLast traded price of underlying
modestring"analyze" when analyzer mode is enabled; absent in live mode
total_quantitynumberSplit responses only: total quantity processed
split_sizenumberSplit responses only: size used for splitting
resultsarraySplit responses only: per-child order_num, quantity, status, orderid

Notes

  • The underlying is used to fetch the current price for ATM calculation
  • For NSE_INDEX or BSE_INDEX exchange, the order is placed on NFO/BFO respectively
  • The expiry_date must be in DDMMMYY format (e.g., 28OCT25, 25NOV25)
  • Use splitsize to break large orders into smaller chunks (max 100 child orders per split)
  • The API uses the synthetic futures price or spot price to determine ATM strike
  • Quantity is a positive integer. Offset is ATM, ITM1-ITM50, or OTM1-OTM50.
  • Leave strike_int out unless you have a specific reason to override the strike ladder. The service reads the real strikes from the instrument master when it is absent, which handles irregular ladders correctly.
  • Rate limit: ORDER_RATE_LIMIT, default 10 requests per second

Back to: API Documentation