NIFTY and BANKNIFTY options data for builders

Backtest-ready NSE Options Data API

Clean option-chain data for NIFTY and BANKNIFTY with IV and Greeks, spreads, tradability, and ATM-relative strikes — built for options backtesting, quant research, and trading system integration.

FastAPI + DuckDB backend API-key protected access Daily and burst rate limits
API health: https://api.afi.codes/health
NSE option chain API
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.afi.codes/v1/options/eod?symbol=NIFTY&date=2026-04-30&window=1"

Problem

Raw NSE options data is not strategy-ready

Historical options data from raw files is valuable, but it is rarely ready for strategy research. Before traders, quants, and developers can use it, they often need to clean formats, align strikes, compute IV and Greeks, and handle missing or inconsistent rows.

Raw data requires cleaning

Symbol formats, expiries, strikes, and CE/PE pairing need normalization before the data becomes useful.

Greeks are not always ready

IV, delta, gamma, and theta often need to be computed before options backtesting can begin.

Research needs consistency

Data gaps and inconsistent formats waste time and make historical strategy comparisons harder.

Product

One API call. Clean NIFTY and BANKNIFTY option-chain intelligence.

AFI Codes is an option chain API that returns structured JSON for NIFTY options data and BANKNIFTY options data. Each response is designed to be practical for options backtesting, analytics dashboards, research notebooks, and trading system pipelines.

Precomputed IV

Call IV and put IV are returned as decimal values for quick analysis.

Greeks included

Call delta, put delta, gamma, and theta are included in the response.

ATM-relative strikes

Use ATM distance and ATM-centered windows to compare strikes consistently.

Tradability-aware rows

Tradability flags help filter research rows without claiming execution certainty.

Clean JSON response

Responses are compact, readable, and easy to consume from Python or any HTTP client.

API for traders, quants, and developers

Built for strategy builders who need usable data, not another raw-file workflow.

Use Cases

Options data for research workflows

Options traders

Build and validate NIFTY or BANKNIFTY strategy ideas faster.

Quant researchers

Use consistent historical options data India workflows for backtests.

Algo developers

Plug JSON into research systems, services, and trading infrastructure.

Educators / analysts

Explain options analytics using a clean option chain API with Greeks.

Pricing

Simple pricing for NSE options API access

Start with free API access, then upgrade when your NIFTY option chain data API usage grows. All plans include API-key access and a burst limit of 5 requests/second per API key.

Free

₹0

50 calls/day

  • Good for testing integration
  • API key access
  • Limited daily usage
Start Free

Pro

₹1499 / month

5000 calls/day

  • Good for serious researchers and developers
  • API key access
  • Higher daily usage
  • Burst limit protection
Buy Pro

Payment links are being enabled. For early access, email support@afi.codes.

Quickstart

Get your first response in seconds

Use the `x-api-key` header and request a supported symbol, date, and strike window.

curl request
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.afi.codes/v1/options/eod?symbol=NIFTY&date=2026-04-30&window=1"
Sample JSON response
{
  "symbol": "NIFTY",
  "date": "2026-04-30",
  "atm_strike": 24000,
  "count": 3,
  "generated_at": "2026-05-03T09:48:41Z",
  "version": "v1",
  "meta": {
    "iv_unit": "decimal",
    "theta_unit": "per_day",
    "delta_range": "[-1,1]",
    "gamma_unit": "per_point",
    "spread_unit": "bps"
  },
  "data": [
    {
      "strike": 24000,
      "atm_distance": 0,
      "call_iv": 0.1758,
      "put_iv": 0.1523,
      "call_delta": 0.5193,
      "put_delta": -0.4788,
      "gamma": 0.000806,
      "theta": -21.867,
      "spread_bps": 5.0,
      "tradable": true
    }
  ]
}

API Reference

API reference for NIFTY and BANKNIFTY options data

The current V1 endpoint serves end-of-day option-chain data for supported indices.

Endpoint

GET /v1/options/eod

Base URL: https://api.afi.codes

Authentication

Send your key in the request header.

x-api-key: YOUR_API_KEY

Query parameters

  • symbol: NIFTY or BANKNIFTY
  • date: YYYY-MM-DD
  • window: number of strikes around ATM

Response fields

  • symbol
  • date
  • atm_strike
  • count
  • generated_at
  • version
  • meta
  • data

Data row fields

  • strike
  • atm_distance
  • call_iv
  • put_iv
  • call_delta
  • put_delta
  • gamma
  • theta
  • spread_bps
  • tradable

Methodology

Data source and methodology

  • Raw market data is derived from publicly available NSE FO bhavcopy / derivatives files and compatible fallback sources where required.
  • AFI Codes does not claim official affiliation with NSE.
  • Users should verify data independently before financial use.
  • Data is processed, normalized, enriched, and served through the API.
  • IV and Greeks are computed using a consistent internal methodology.
  • IV is decimal. Theta is per day. Delta range is [-1,1]. Gamma is per point. Spread is basis points.
  • Tradability is a research filter, not a guarantee of execution.
This product is for research, analytics, backtesting, and educational use. It is not investment advice. No trading profitability is guaranteed.

Trust

Built with operational controls

The API runs as a production-backed data service with access control, quota protection, HTTPS, and separate storage for market data and user/API access metadata.

VPS-backed infrastructure
HTTPS enabled
API-key access control
Daily plan limits
Burst protection
Health endpoint
Separate backups
DuckDB for market analytics

FAQ

Frequently asked questions

Is this official NSE data?

No. The API does not claim official NSE affiliation. It processes publicly available derivatives data and compatible fallback sources where required.

Is this investment advice?

No. It is for research, analytics, backtesting, and educational use only.

Which symbols are supported?

NIFTY and BANKNIFTY are currently supported.

Is this intraday data?

The current product focuses on EOD option-chain data.

How do I get an API key?

Choose a plan and request access. Payment links are being enabled. Early users can contact support@afi.codes.

What happens if I exceed my limit?

The API returns 429 Too Many Requests when daily or burst limits are exceeded.

Can I use this with Python?

Yes. Any client that can send HTTP requests with the x-api-key header can use it.

Can I download CSV?

CSV export is planned. Current V1 focuses on JSON API access.

Contact

Get early access

If you want API access, plan details, or early-user pricing, contact support@afi.codes.

Start building with clean NSE options data

Tell us your use case and expected usage. We will help you choose the right access level.