Free
50 calls/day
- Good for testing integration
- API key access
- Limited daily usage
NIFTY and BANKNIFTY options data for builders
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.
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.afi.codes/v1/options/eod?symbol=NIFTY&date=2026-04-30&window=1"
Problem
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.
Symbol formats, expiries, strikes, and CE/PE pairing need normalization before the data becomes useful.
IV, delta, gamma, and theta often need to be computed before options backtesting can begin.
Data gaps and inconsistent formats waste time and make historical strategy comparisons harder.
Product
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.
Call IV and put IV are returned as decimal values for quick analysis.
Call delta, put delta, gamma, and theta are included in the response.
Use ATM distance and ATM-centered windows to compare strikes consistently.
Tradability flags help filter research rows without claiming execution certainty.
Responses are compact, readable, and easy to consume from Python or any HTTP client.
Built for strategy builders who need usable data, not another raw-file workflow.
Use Cases
Build and validate NIFTY or BANKNIFTY strategy ideas faster.
Use consistent historical options data India workflows for backtests.
Plug JSON into research systems, services, and trading infrastructure.
Explain options analytics using a clean option chain API with Greeks.
Pricing
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.
50 calls/day
500 calls/day
5000 calls/day
Payment links are being enabled. For early access, email support@afi.codes.
Quickstart
Use the `x-api-key` header and request a supported symbol, date, and strike window.
curl -H "x-api-key: YOUR_API_KEY" \
"https://api.afi.codes/v1/options/eod?symbol=NIFTY&date=2026-04-30&window=1"
{
"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
The current V1 endpoint serves end-of-day option-chain data for supported indices.
GET /v1/options/eod
Base URL: https://api.afi.codes
Send your key in the request header.
x-api-key: YOUR_API_KEY
Methodology
Trust
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.
FAQ
No. The API does not claim official NSE affiliation. It processes publicly available derivatives data and compatible fallback sources where required.
No. It is for research, analytics, backtesting, and educational use only.
NIFTY and BANKNIFTY are currently supported.
The current product focuses on EOD option-chain data.
Choose a plan and request access. Payment links are being enabled. Early users can contact support@afi.codes.
The API returns 429 Too Many Requests when daily or burst limits are exceeded.
Yes. Any client that can send HTTP requests with the x-api-key header can use it.
CSV export is planned. Current V1 focuses on JSON API access.
Contact
If you want API access, plan details, or early-user pricing, contact support@afi.codes.
Tell us your use case and expected usage. We will help you choose the right access level.