Select an endpoint above
Enter your API key and click Send Request
What is the Accelpix Pix APIs Platform?
Accelpix is an NSE Authorized Data Vendor providing institutional-grade market data for Indian financial markets — NSE, BSE, and MCX. The Pix API platform delivers real-time streaming data and historical records through four client interfaces.
Node.js SDK
Best for web dashboards, browser apps, and server-side JavaScript.
Python SDK
Best for algo trading, data science, backtesting, and quantitative analysis.
.NET SDK
Best for WinForms/WPF desktop apps, trading terminals, and C# back-office systems.
REST API
Works from any language — Python, C#, Java, Excel, Postman. Simple HTTP calls.
Real-time Streaming
Live trade prices, bid/ask, Open Interest, and Option Greeks via WebSocket with automatic reconnect.
Historical Data
EOD daily bars, intraday minute bars (1/3/5/7/10 min), and tick-level back data with full contract support.
Option Greeks
Delta, Gamma, Theta, Vega, IV, IVVWAP, Vanna, Charm, Speed, Zomma, Volga — live and snapshot.
Option Chain
Full chain or range-based (N strikes above & below spot) for any weekly or monthly expiry.
Software Download & Installation — Step by Step
Follow the section for your chosen SDK. Each section is self-contained — you only need to complete one.
Download & Install Node.js
Go to nodejs.org/en/download → Select your OS (Windows / macOS / Linux) → Download the LTS installer → Run it and accept all defaults. Node.js and npm are added to PATH automatically.
Verify Installation
Open Terminal (macOS/Linux) or Command Prompt / PowerShell (Windows) and run:
Create Project & Install pix-apidata
# Create a folder for your project mkdir accelpix-app cd accelpix-app # Initialize npm project (creates package.json) npm init -y # Install the Accelpix Pix API library npm install pix-apidata --save # Verify installation ls node_modules/pix-apidata
Install Python
Go to python.org/downloads → Click the download button → Run installer → ✅ Check "Add Python to PATH" → Click Install Now.
Verify Installation
Create Project & Virtual Environment
A virtual environment keeps packages isolated — recommended to avoid conflicts with other projects.
# Create project folder mkdir accelpix-py cd accelpix-py # Create virtual environment python -m venv venv # Activate — Windows: venv\Scripts\activate # Activate — macOS/Linux: source venv/bin/activate # Your terminal prompt now shows (venv)
Install pix-apidata Library
# Install the Accelpix library pip install pix-apidata # Verify installation pip show pix-apidata
Create a Console App
# Create project folder
dotnet new console -n AccelpixApp
cd AccelpixAppAdd the NetApiClient.dll Reference
Drop NetApiClient.dll into a libs/ folder in your project, then reference it directly in the .csproj:
<ItemGroup>
<Reference Include="NetApiClient">
<HintPath>libs\NetApiClient.dll</HintPath>
</Reference>
</ItemGroup>Install Required NuGet Dependencies
# SignalR client — used internally for the real-time connection dotnet add package Microsoft.AspNetCore.SignalR.Client --version 5.0.4 dotnet add package Microsoft.AspNetCore.SignalR.Protocols.MessagePack --version 5.0.4 # JSON serialization dotnet add package Newtonsoft.Json --version 13.0.1
The REST API is plain HTTP — no special SDK required. Works from any tool or language. Choose below:
pip install requests
Install-Package Newtonsoft.Json
API Key — Getting & Using Your Credentials
Contact Accelpix to Register
Email [email protected] or call +99 990 999 3349 to subscribe to a data plan. You will receive your API key and server host address after account activation.
Your Credentials
| Credential | What it is | Example |
|---|---|---|
| API Key | Unique authentication token for all requests | cvFRDRmyKXp2+Y9KKgPBfC0=m |
| API Host | Data server address | apidata.accelpix.in |
Store Credentials Securely
Never hardcode your key in shared or public code. Use environment variables:
ACCELPIX_API_KEY=your-api-key-here ACCELPIX_HOST=apidata.accelpix.in
How the Key is Passed — by Interface
| Interface | How to pass the key | Notes |
|---|---|---|
| Node.js SDK | apidata.initialize(apiKey, host, scheme) | 1st argument to initialize() |
| Python SDK | await api.initialize(apiKey, host) | 1st argument to initialize() |
| .NET SDK | await client.InitializeAsync(apiKey, host, "https") | 1st argument to InitializeAsync() |
| REST API | ?api_token=YOUR_URL_ENCODED_KEY | URL query param — must be URL-encoded |
Symbol Master — The Instrument Directory
Before subscribing to any live data or requesting history, you need the exact ticker string for your instrument. The Symbol Master is a downloadable JSON file listing every available symbol with its complete metadata.
Returns all symbols without lot size. Use for equities and indices.
Returns all symbols with lot size. Use for F&O and MCX instruments.
Symbol Master Response Fields
| Field | Type | Description | Example |
|---|---|---|---|
| xid | int | Segment ID: 1=EQ, 2=F&O, 3=NCD, 5=MCX | 2 |
| tkr | string | Ticker — use this in all subscriptions and API calls | NIFTY-1 |
| atkr | string | Alternative ticker for mapping or display | NIFTY_1 |
| ctkr | string | Contract ticker (current futures name) | NIFTY24JAN |
| exp | string | Expiry date (ISO 8601). Epoch = no expiry | 2024-01-25T00:00:00Z |
| utkr | string | Underlying ticker for F&O contracts | NIFTY |
| inst | string | Instrument type: EQUITY, FUTSTK, FUTIDX, OPTSTK, OPTIDX, INDEX | FUTIDX |
| sp | string | Strike price (options only) | "22000.00" |
| tk | int | Exchange-defined token number | 16921 |
| lot | int | Lot size (0 for equities and indices) | 50 |
Sample Symbol Master Entry
{
"xid": 2, // F&O segment
"tkr": "BANKNIFTY-1", // <-- use this in subscribe/history calls
"atkr": "BANKNIFTY_1",
"ctkr": "BANKNIFTY24JAN",
"exp": "2024-01-16T00:00:00Z",
"utkr": "BANKNIFTY",
"inst": "FUTIDX",
"sp": "0.00",
"tk": 53734,
"lot": 15
}Complete Field & Acronym Reference
Packet Type Codes — "kind" Field
| Code | Full Name | When it fires | Callback |
|---|---|---|---|
| T | Trade Packet | Every live trade tick | onTrade / on_trade_update |
| B | Best Packet | Best bid or ask changes | onBest / on_best_update |
| V | Reference Snapshot | Once at subscription (full OHLC+OI+bands) | onRefsSnapshot / on_srefs_update |
| A | Average / Ref Update | OHLC reference changes during day | onRefs / on_refs_update |
| G | Option Greeks | Greeks recalculation update | onGreeks / on_greeks_update |
| O | Open Price | Opening price update | — |
| H | High Price | New intraday high | — |
| L | Low Price | New intraday low | — |
| C | Close Price | Closing price update | — |
| N | Open Interest | OI change | — |
All Response Field Acronyms
| Field | Full Name | Segment / Notes |
|---|---|---|
| ap | Ask Price | Best ask price |
| aq | Ask Quantity | Best ask quantity |
| avg | Average Price (VWAP) | Volume-weighted average for the day |
| band | Circuit Price Band % | EQ / Cash segment only |
| bp | Bid Price | Best bid price |
| bq | Bid Quantity | Best bid quantity |
| chg | Change Price | vs previous day close |
| chgpc | Change Percentage | % vs previous day close |
| cp | Close Price | Previous day's closing price |
| hp | High Price | Day high |
| lp | Low Price | Day low |
| lrc | Lower Circuit Price | EQ segment |
| oi | Open Interest | Current open interest |
| op | Open Price | Day opening price |
| poi | Previous Open Interest | Previous day's OI |
| pr | Last Trade Price (LTP) | Most recent trade price |
| qty | Quantity (per tick) | Volume in this specific trade tick |
| sid | Segment ID | 1 = EQ (Cash), 2 = F&O |
| td | Trade Date / DateTime | ISO 8601 format |
| tkn | Token Number | Exchange token — not actively used currently |
| tm | Trade Time | Unix epoch timestamp |
| upc | Upper Circuit Price | EQ segment |
| val | Traded Value | Volume × Price |
| vol | Cumulative Day Volume | Total volume since market open |
Option Greeks Fields
| Field | Description |
|---|---|
| iv | Implied Volatility |
| ivvwap | IV Volume-Weighted Average Price |
| twapiv | IV Time-Weighted Average Price |
| delta | Option price change per ₹1 move in underlying |
| gamma | Rate of change of delta |
| theta | Daily time decay value |
| vega | Sensitivity to 1% change in IV |
| vanna | Cross-sensitivity: delta to volatility |
| charm | Rate of change of delta over time |
| speed | Rate of change of gamma vs underlying price |
| zomma | Rate of change of gamma vs volatility |
| volga | Sensitivity of vega to volatility (Vomma) |
| color | Rate of change of gamma over time |
| tgr | Total gamma risk |
| tv | Theoretical value |
| dtr | Days to ratio |
| highiv / lowiv | Intraday IV high and low |
| timestamp | Nanoseconds from 01-Jan-1980 00:00:00 UTC |
Python SDK Version History
- Removed scheme parameter from initialize() — update any existing code that passes 3 arguments
- Updated library dependency tree to latest version
- Trade Snapshot is now a separate callback (previously combined with Trade callback)
- Segment subscription enabled for entitled users
- Option Greeks introduced
- Added upper and lower price bands for EQ market in Refs Snapshot
- Live tick aggregation for current-day minute bars
Contact & Support
Phone Support
+99 990 999 3349
Office
Accelpix Solutions Pvt. Ltd.
Gandhinagar / Ahmedabad, Gujarat, India
NSE Symbol Notation — Complete Guide
Every data subscription, historical request, and REST call requires an exact ticker string. Accelpix follows NSE conventions for all instrument types. This guide covers all symbol formats with detailed examples.
📊 1. NSE Index Symbols
Use the exact index name as shown on NSE. Spaces are part of the symbol — URL-encode them as %20 in REST calls.
| Symbol String | Index Name | REST URL Form |
|---|---|---|
| NIFTY 50 | Nifty 50 Index (Benchmark) | NIFTY%2050 |
| NIFTY BANK | Bank Nifty Index | NIFTY%20BANK |
| NIFTY MIDCAP | Nifty Midcap Index | NIFTY%20MIDCAP |
| NIFTY 500 | Nifty 500 Index | NIFTY%20500 |
| NIFTY 100 | Nifty 100 Index | NIFTY%20100 |
| NIFTY FIN SERVICE | Fin Nifty (FINNIFTY) Spot Index | NIFTY%20FIN%20SERVICE |
🔄 2. Continuous Futures
Continuous contracts automatically roll over to the next active expiry at end of month. You never need to change your subscription — the data rolls automatically. Accelpix supports four notation styles — choose one and stay consistent throughout your application.
| Contract | Hyphen | Underscore | Number | Roman |
|---|---|---|---|---|
| Current / 1st Month | NIFTY-1 | NIFTY_1 | NIFTY1 | NIFTY-I |
| Next / 2nd Month | NIFTY-2 | NIFTY_2 | NIFTY2 | NIFTY-II |
| Far / 3rd Month | NIFTY-3 | NIFTY_3 | NIFTY3 | NIFTY-III |
| BankNifty Current | BANKNIFTY-1 | BANKNIFTY_1 | — | BANKNIFTY-I |
| FinNifty Current | FINNIFTY-1 | FINNIFTY_1 | — | FINNIFTY-I |
| Reliance Current | RELIANCE-1 | RELIANCE_1 | — | RELIANCE-I |
📅 3. Contract Futures
Contract symbols map to a specific expiry month. Format: SYMBOL + YY + MMM
| Symbol | Instrument | Expiry |
|---|---|---|
| NIFTY24JAN | Nifty 50 Futures | January 2024 |
| NIFTY24FEB | Nifty 50 Futures | February 2024 |
| NIFTY24MAR | Nifty 50 Futures | March 2024 |
| BANKNIFTY24JAN | Bank Nifty Futures | January 2024 |
| RELIANCE24FEB | Reliance Industries Futures | February 2024 |
| TCS24DEC | TCS Futures | December 2024 |
📆 4. Monthly Options
Format: <Ticker><YYMMM><StrikePrice><CE or PE>
More Monthly Option Examples
| Symbol | Breakdown |
|---|---|
| NIFTY24FEB21900CE | NIFTY · Feb 2024 · Strike 21,900 · Call |
| NIFTY24FEB21900PE | NIFTY · Feb 2024 · Strike 21,900 · Put |
| ZEEL24MAR150PE | ZEEL · March 2024 · Strike 150 · Put |
| BANKNIFTY24MAR48000CE | BANKNIFTY · March 2024 · Strike 48,000 · Call |
| RELIANCE24APR2500CE | Reliance · April 2024 · Strike 2,500 · Call |
| INFY24DEC1700PE | Infosys · December 2024 · Strike 1,700 · Put |
Month Codes (MMM) for Monthly Options
| Month | Code | Month | Code | Month | Code |
|---|---|---|---|---|---|
| January | JAN | May | MAY | September | SEP |
| February | FEB | June | JUN | October | OCT |
| March | MAR | July | JUL | November | NOV |
| April | APR | August | AUG | December | DEC |
🗓️ 5. Weekly Options
Weekly options use a compact single-character month code to keep the symbol short. Format: <Ticker><YY><M><DD><StrikePrice><CE or PE>
24O03 is Oct 3rd, not "24003" which would be unreadable.Weekly Expiry: Decoding the Date Segment
| Segment | Value in NIFTY2411821800PE | Meaning |
|---|---|---|
| YY | 24 | Year 2024 |
| M | 1 | January (single digit) |
| DD | 18 | 18th of the month |
| Full expiry | 24118 | 18-January-2024 |
Weekly Month Single-Character Codes
| Month | Code | Month | Code | Month | Code |
|---|---|---|---|---|---|
| January | 1 | May | 5 | September | 9 |
| February | 2 | June | 6 | October | O |
| March | 3 | July | 7 | November | N |
| April | 4 | August | 8 | December | D |
Weekly Option Examples — Multiple Underlyings & Months
| Symbol | Expiry Date | Strike | Type |
|---|---|---|---|
| NIFTY2411821800PE | 18-Jan-2024 (24·1·18) | 21800 | Put |
| BANKNIFTY2411745500CE | 17-Jan-2024 (24·1·17) | 45500 | Call |
| FINNIFTY2411221600CE | 12-Jan-2024 (24·1·12) | 21600 | Call |
| NIFTY24O0322000CE | 03-Oct-2024 (24·O·03) | 22000 | Call |
| NIFTY24N1424500PE | 14-Nov-2024 (24·N·14) | 24500 | Put |
| NIFTY24D2623000CE | 26-Dec-2024 (24·D·26) | 23000 | Call |
| BANKNIFTY24O1748000PE | 17-Oct-2024 (24·O·17) | 48000 | Put |
🏪 6. NSE Equity Symbols
Equity symbols match the NSE scrip name exactly. Series is auto-mapped to EQ, BE, or BZ — you don't need to specify it.
| Symbol | Company | Notes |
|---|---|---|
| TCS | Tata Consultancy Services | Series auto: EQ |
| RELIANCE | Reliance Industries | Series auto: EQ |
| INFY | Infosys Ltd | Series auto: EQ |
| HDFCBANK | HDFC Bank | Series auto: EQ |
| ZEEL | Zee Entertainment | Series auto: BE |
| WIPRO | Wipro Ltd | Series auto: EQ |
🔧 Interactive Symbol Builder
Use this tool to construct any symbol quickly. Select the type and parameters — the symbol is generated in real time.
Installation & Project Setup
Create your project folder
mkdir my-market-feed cd my-market-feed npm init -y
This creates a package.json file that tracks your project's dependencies.
Install the pix-apidata library
npm install pix-apidata --save
Create your first file and import the library
const apidata = require("pix-apidata"); // All SDK methods are now available via the apidata object
<script src="bundle.js"></script> <!-- apidata is available as a global object after bundling -->
Run your script
node app.js
Initialization
Initialization is always the very first call in your application. It authenticates your session and establishes the WebSocket connection. No other API method will work until initialize() resolves.
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| apiKey | string | Required | Your API access key from Accelpix | "abc123XYZ==" |
| apiHost | string | Required | Data server hostname | "apidata.accelpix.in" |
| scheme | string | Optional | Protocol: 'https' or 'http' | "https" |
async/await (recommended)
const apidata = require("pix-apidata"); const API_KEY = "your-api-key-here"; const API_HOST = "apidata.accelpix.in"; const SCHEME = "https"; async function start() { await apidata.initialize(API_KEY, API_HOST, SCHEME); // ✅ Connection ready — all other calls go here console.log("Connected and ready!"); } start().catch(console.error);
Promise-based
apidata.initialize(API_KEY, API_HOST, SCHEME) .then(() => { console.log("✅ Connected"); // All subscriptions and history calls go here }) .catch((err) => { console.error("❌ Connection failed:", err); });
Callbacks — Receiving Live Data
Register all callbacks before subscribing to symbols. They fire automatically whenever new data arrives over the WebSocket. Each callback type handles a specific data packet.
📈 Trade Data kind: "T"
Fires on every live trade tick. This is the primary price update event.
apidata.callbacks.onTrade((msg) => { console.log(`[TRADE] ${msg.ticker} @ ₹${msg.price}`); console.log(` Qty: ${msg.qty} | Volume: ${msg.volume} | OI: ${msg.oi}`); console.log(` Time: ${msg.time} | Segment: ${msg.segmentId}`); });
{
"id": 0,
"ticker": "BANKNIFTY-1",
"segmentId": 2,
"time": "2024-01-18T15:29:52.000Z",
"price": 46560,
"qty": 300,
"volume": 7499525,
"oi": 3215240,
"kind": "T"
}📸 Trade Snapshot fires once at subscription
Fires once immediately after subscribing, with the last known price. Use this to populate your UI before live updates start flowing.
apidata.callbacks.onTradeSnapshot((msg) => { // Seed your UI with the latest known price updateUI(msg.ticker, msg.price, msg.volume); });
📊 Best Bid/Ask kind: "B"
Fires when the best bid or ask price/quantity changes.
apidata.callbacks.onBest((msg) => { console.log(`[BEST] ${msg.ticker}`); console.log(` Bid: ₹${msg.bidPrice} × ${msg.bidQty} qty`); console.log(` Ask: ₹${msg.askPrice} × ${msg.askQty} qty`); });
{
"ticker": "NIFTY-1", "kind": "B",
"bidPrice": 21780, "bidQty": 350,
"askPrice": 21782, "askQty": 250
}📋 Reference Data — Refs & RefsSnapshot kind: "A" / "V"
onRefsSnapshot fires once on subscription with OHLC + OI data. onRefs fires as those values change during the day.
// Fires once on subscription — current OHLC snapshot apidata.callbacks.onRefsSnapshot((msg) => { console.log(`[OHLC Snap] ${msg.ticker}`); console.log(` O:${msg.open} H:${msg.high} L:${msg.low} C:${msg.close} OI:${msg.oi}`); console.log(` Upper Band:${msg.upperBand} Lower Band:${msg.lowerBand}`); // EQ only }); // Fires when O/H/L/C/OI values are updated during session apidata.callbacks.onRefs((msg) => { console.log(`[Ref Update] ${msg.ticker} price=${msg.price} kind=${msg.kind}`); });
🔢 Option Greeks kind: "G"
Provides real-time option pricing analytics — delta, gamma, theta, vega, IV, and higher-order Greeks.
apidata.callbacks.onGreeks((msg) => { console.log(`[Greeks] ${msg.ticker}`); console.log(` IV: ${msg.iv?.toFixed(4)} IVVWAP: ${msg.ivvwap?.toFixed(4)}`); console.log(` Δ Delta: ${msg.delta?.toFixed(4)}`); console.log(` Γ Gamma: ${msg.gamma?.toFixed(6)}`); console.log(` Θ Theta: ${msg.theta?.toFixed(2)}`); console.log(` ν Vega: ${msg.vega?.toFixed(4)}`); }); // Fires once at subscription with current values apidata.callbacks.onGreekSnapshot((msg) => { console.log("Greeks Snapshot:", msg.ticker, "IV:", msg.iv); });
All Greeks Fields
| Field | Greek Name | Description |
|---|---|---|
| iv | Implied Volatility | Market's expectation of future volatility |
| ivvwap | IV VWAP | Volume-weighted average of IV |
| twapiv | IV TWAP | Time-weighted average of IV |
| delta | Delta (Δ) | Option price change per ₹1 move in underlying |
| gamma | Gamma (Γ) | Rate of change of delta |
| theta | Theta (Θ) | Daily time decay (negative for long options) |
| vega | Vega (ν) | Price change per 1% change in IV |
| vanna | Vanna | Sensitivity of delta to volatility changes |
| charm | Charm | Rate of change of delta over time |
| speed | Speed | Rate of change of gamma vs underlying price |
| zomma | Zomma | Rate of change of gamma vs volatility |
| volga | Volga | Second-order sensitivity of vega to volatility |
| timestamp | Timestamp | Nanoseconds since 01-Jan-1980 00:00:00 UTC |
🔌 Connection Events
apidata.callbacks.onConnected(() => { console.log("✅ WebSocket connected to Accelpix"); }); apidata.callbacks.onClosed((err) => { console.error("❌ Connection closed:", err); // Re-initialize and re-subscribe here if you want auto-reconnect setTimeout(() => start(), 5000); // retry after 5s });
Live Stream Subscriptions
Call these methods after initialize() resolves. You can subscribe to multiple symbols in a single call by passing an array.
Subscribe Methods
// ── ALL updates: Trade + Best + Refs ───────────────── await apidata.stream.subscribeAll(['NIFTY-1', 'BANKNIFTY-1', 'TCS']); // ── Trade ticks only (lower bandwidth) ─────────────── await apidata.stream.subscribeTrade(['NIFTY-1', 'BANKNIFTY-1']); // ── Bid/Ask + Refs only ─────────────────────────────── await apidata.stream.subscribeBestAndRefs(['NIFTY-1', 'INFY']); // ── Option Greeks — use full option ticker ──────────── await apidata.stream.subscribeGreeks(['NIFTY2411822200CE', 'NIFTY2411821800PE']); // ── Full option chain for one expiry ───────────────── await apidata.stream.subscribeOptionChain('NIFTY', '20240118'); // expiry: YYYYMMDD // ── Range chain: N strikes above+below spot ────────── // 10 strikes = 10 CE + 10 PE above + 10 CE + 10 PE below = 40 contracts await apidata.stream.subscribeOptionChainRange('NIFTY', '20240118', 10); // ── Greeks + chain range ───────────────────────────── await apidata.stream.subscribeGreeksChainRange('NIFTY', '20240118', 5); // ── Full segment (all entitled symbols) ────────────── const needSnapshot = false; await apidata.stream.subscribeSegments(needSnapshot);
Unsubscribe Methods
await apidata.stream.unsubscribeAll(['NIFTY-1', 'BANKNIFTY-1']); await apidata.stream.unsubscribeOptionChain('NIFTY', '20240118'); await apidata.stream.unsubscribeGreeks(['NIFTY2411822200CE']); await apidata.stream.unsubscribeGreeksChain('NIFTY', '20240118');
Subscription Methods Reference
| Method | Data Received | Use When |
|---|---|---|
| subscribeAll(tickers) | Trade + Best + Refs | Full market data per symbol |
| subscribeTrade(tickers) | Trade ticks only | Price-only feed, lower bandwidth |
| subscribeBestAndRefs(tickers) | Bid/Ask + OHLC | Order book + reference values |
| subscribeGreeks(tickers) | Greeks (IV, Δ, Γ, Θ, ν...) | Options analytics |
| subscribeOptionChain(under, expiry) | All strikes for expiry | Full options chain |
| subscribeOptionChainRange(under, expiry, n) | N strikes above+below spot | ATM-focused chain |
| subscribeGreeksChainRange(under, expiry, n) | Greeks for range chain | ATM Greeks + IV surface |
| subscribeSegments(snapshot) | All entitled symbols | Bulk subscription |
Historical Data
Pull EOD (end-of-day) bars, intraday minute bars, or tick data. All date parameters use YYYYMMDD format.
EOD Historical Bars
// Continuous contract EOD // Parameters: ticker, startDate (YYYYMMDD), endDate (YYYYMMDD) let eod = await apidata.history.getEod("NIFTY-1", "20240112", "20240118"); console.log(eod); // Array of {td, op, hp, lp, cp, vol, oi} // Contract-specific EOD (with exact expiry date) // Parameters: underlying, startDate, endDate, contractExpiry (YYYYMMDD) let eodC = await apidata.history.getEodContract( "NIFTY", "20240109", "20240118", "20240125" );
Intraday Minute Bars
// Supported resolutions: "1", "3", "5", "7", "10" (minutes) // 5-minute bars, multiple days let bars5m = await apidata.history.getIntraEod("NIFTY-1", "20240112", "20240118", "5"); // 1-minute bars, single day (use today's date for live aggregation) let bars1m = await apidata.history.getIntraEod("BANKNIFTY-1", "20240118", "20240118", "1"); // 10-minute bars let bars10m = await apidata.history.getIntraEod("TCS", "20240110", "20240115", "10"); // Contract-specific intraday bars let cBars = await apidata.history.getIntraEodContract( "NIFTY", "20240109", "20240118", "20240125", "5" );
Tick / Back-Tick Data
// All ticks from a given datetime to live/latest // Parameters: ticker, fromDateTime ("YYYYMMDD HH:mm:ss") let ticks = await apidata.history.getBackTicks("BANKNIFTY-1", "20240118 15:00:00"); // Returns all trade ticks from 15:00 to present console.log(`Got ${ticks.length} ticks`);
Response Fields — Historical Data
| Field | EOD | Intra | Tick | Description |
|---|---|---|---|---|
| td | ✅ | ✅ | ✅ | Date (EOD) or datetime (intra/tick) of the bar |
| op | ✅ | ✅ | — | Open price of the bar |
| hp | ✅ | ✅ | — | High price of the bar |
| lp | ✅ | ✅ | — | Low price of the bar |
| cp | ✅ | ✅ | — | Close price of the bar |
| vol | ✅ | ✅ | ✅ | Volume traded in the bar or at the tick |
| oi | ✅ | ✅ | ✅ | Open Interest at end of bar/tick |
| pr | — | — | ✅ | Last trade price (tick data only) |
Complete Working Example
A full end-to-end script — copy this, replace your-api-key-here, and run with node app.js.
const apidata = require('pix-apidata'); // ── CONFIG ────────────────────────────────────────────────────── const API_KEY = "your-api-key-here"; const API_HOST = "apidata.accelpix.in"; const SCHEME = "https"; // ── STEP 1: Register ALL callbacks BEFORE initialize ───────────── apidata.callbacks.onConnected(() => console.log("✅ Connected to Accelpix")); apidata.callbacks.onClosed((err) => { console.error("❌ Disconnected:", err); // Optional: add reconnect logic here }); apidata.callbacks.onTrade((t) => console.log(`[TRADE] ${t.ticker.padEnd(20)} ₹${t.price} | Vol:${t.volume} OI:${t.oi}`) ); apidata.callbacks.onTradeSnapshot((t) => console.log(`[SNAP] ${t.ticker.padEnd(20)} ₹${t.price} (last known price)`) ); apidata.callbacks.onBest((b) => console.log(`[BEST] ${b.ticker.padEnd(20)} Bid:₹${b.bidPrice}×${b.bidQty} Ask:₹${b.askPrice}×${b.askQty}`) ); apidata.callbacks.onRefsSnapshot((r) => console.log(`[OHLC] ${r.ticker.padEnd(20)} O:${r.open} H:${r.high} L:${r.low} C:${r.close}`) ); apidata.callbacks.onRefs((r) => console.log(`[REFS] ${r.ticker} price=${r.price} kind=${r.kind}`) ); apidata.callbacks.onGreeks((g) => console.log(`[GREEK] ${g.ticker} IV:${g.iv?.toFixed(4)} Δ:${g.delta?.toFixed(4)} Θ:${g.theta?.toFixed(2)}`) ); apidata.callbacks.onGreekSnapshot((g) => console.log(`[GSNAP] ${g.ticker} IV:${g.iv?.toFixed(4)}`) ); // ── STEP 2: Initialize ─────────────────────────────────────────── apidata.initialize(API_KEY, API_HOST, SCHEME) .then(async () => { // ── STEP 3: Pull historical data ───────────────────────────── console.log("Fetching EOD data..."); const eod = await apidata.history.getEod('NIFTY-1', '20240112', '20240116'); console.log(`📊 EOD: ${eod.length} days`, eod[0]); console.log("Fetching 5-min bars..."); const intra = await apidata.history.getIntraEod('NIFTY-1', '20240112', '20240112', '5'); console.log(`📉 5-min bars: ${intra.length} bars`, intra[0]); // ── STEP 4: Subscribe to live streams ──────────────────────── console.log("Subscribing to live data..."); await apidata.stream.subscribeAll(['NIFTY-1', 'BANKNIFTY-1']); await apidata.stream.subscribeGreeks(['NIFTY2411822200CE', 'NIFTY2411821800PE']); await apidata.stream.subscribeOptionChainRange('NIFTY', '20240118', 7); console.log("🚀 Live streams active. Waiting for data..."); }) .catch((err) => console.error("❌ Initialization failed:", err));
Installation & Project Setup
Create project folder and virtual environment
mkdir accelpix-py
cd accelpix-py
python -m venv venv
venv\Scripts\activate
# Your prompt will now show: (venv)mkdir accelpix-py
cd accelpix-py
python3 -m venv venv
source venv/bin/activate
# Your prompt will now show: (venv)Install pix-apidata
pip install pix-apidata
Version: 1.3.5
...
Create your first file and import modules
import asyncio from pix_apidata import * # This imports both apidata_lib and apidata_models
Run your script
python main.py
Initialization
Always the first call. Create the ApiData object, register callbacks, then call initialize().
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Required | Your API access key from Accelpix |
| apiHost | string | Required | Data server: apidata.accelpix.in |
import asyncio from pix_apidata import * # Create API instance and event loop api = apidata_lib.ApiData() event_loop = asyncio.get_event_loop() API_KEY = "your-api-key-here" API_HOST = "apidata.accelpix.in" async def main(): await api.initialize(API_KEY, API_HOST) # ✅ Ready — all subscriptions and history calls go here print("Connected!")
Callbacks — Receiving Live Data
Register all callbacks before initializing. Use apidata_models to get typed access to message fields.
📈 Trade Data
def on_trade(msg): t = apidata_models.Trade(msg) print(f"[TRADE] {t.ticker} @ ₹{t.price}") print(f" Qty: {t.qty} | Volume: {t.volume} | OI: {t.oi}") print(f" Time: {t.time} | Segment: {t.segmentId}") api.on_trade_update(on_trade)
📸 Trade Snapshot
def on_trade_snapshot(msg): t = apidata_models.Trade(msg) print(f"[SNAP] {t.ticker} last known price: ₹{t.price}") api.on_tradeSnapshot_update(on_trade_snapshot)
📊 Best Bid/Ask
def on_best(msg): b = apidata_models.Best(msg) print(f"[BEST] {b.ticker}") print(f" Bid: ₹{b.bidPrice} × {b.bidQty} | Ask: ₹{b.askPrice} × {b.askQty}") api.on_best_update(on_best)
📋 Refs & RefsSnapshot
def on_refs(msg): r = apidata_models.Refs(msg) print(f"[REFS] {r.ticker} price={r.price} kind={r.kind}") def on_srefs(msg): s = apidata_models.RefsSnapshot(msg) print(f"[OHLC] {s.ticker} O:{s.open} H:{s.high} L:{s.low} C:{s.close} OI:{s.oi}") print(f" Upper Band: {s.upperBand} Lower Band: {s.lowerBand}") # EQ only api.on_refs_update(on_refs) api.on_srefs_update(on_srefs)
🔢 Option Greeks
def on_greeks(msg): g = apidata_models.Greeks(msg) print(f"[GREEK] {g.ticker}") print(f" IV: {g.iv:.4f} IVVWAP: {g.ivvwap:.4f}") print(f" Δ Delta: {g.delta:.4f}") print(f" Γ Gamma: {g.gamma:.6f}") print(f" Θ Theta: {g.theta:.2f}") print(f" ν Vega: {g.vega:.4f}") def on_greeks_snapshot(msg): g = apidata_models.Greeks(msg) print(f"[GSNAP] {g.ticker} IV:{g.iv:.4f}") api.on_greeks_update(on_greeks) api.on_greekSnapshot_update(on_greeks_snapshot)
🔌 Connection Events
def on_connected(): print("✅ Connected to Accelpix") def on_stopped(): print("❌ Connection stopped — re-initialize to reconnect") api.on_connection_started(on_connected) api.on_connection_stopped(on_stopped)
Callback Registration Reference
| Register Method | Fires When | Model Class |
|---|---|---|
| api.on_trade_update(fn) | Each live trade tick | apidata_models.Trade |
| api.on_tradeSnapshot_update(fn) | Once at subscription | apidata_models.Trade |
| api.on_best_update(fn) | Bid/Ask change | apidata_models.Best |
| api.on_refs_update(fn) | OHLC/OI update during day | apidata_models.Refs |
| api.on_srefs_update(fn) | Once at subscription with OHLC | apidata_models.RefsSnapshot |
| api.on_greeks_update(fn) | Greeks update | apidata_models.Greeks |
| api.on_greekSnapshot_update(fn) | Once at subscription with Greeks | apidata_models.Greeks |
| api.on_connection_started(fn) | WebSocket connected | — |
| api.on_connection_stopped(fn) | WebSocket disconnected | — |
Live Stream Subscriptions
# All updates: Trade + Best + Refs await api.subscribeAll(['NIFTY-1', 'BANKNIFTY-1', 'NIFTY 50']) # Trade ticks only await api.subscribeTrade(['NIFTY-1', 'BANKNIFTY-1']) # Bid/Ask + Refs only await api.subscribeBestAndRefs(['NIFTY-1', 'BANKNIFTY-1']) # Option Greeks for specific options await api.subscribeGreeks(['NIFTY2220318500CE', 'NIFTY2220318000PE']) # Full option chain for one expiry date (YYYYMMDD) await api.subscribeOptionChain('BANKNIFTY', '20220901') # Range chain: N strikes above and below spot await api.subscribeOptionChainRange('NIFTY', '20220901', 10) # Full segment subscription await api.subscribeSegments(False)
Unsubscribe Methods
await api.unsubscribeAll(['NIFTY-1', 'BANKNIFTY-1']) await api.unsubscribeOptionChain('NIFTY', '20220609') await api.unsubscribeGreeks(['NIFTY2220318500CE']) await api.unsubscribeGreeksChain('NIFTY', '20220609')
Historical Data
All date parameters use YYYYMMDD format. Resolution for intraday: "1", "3", "5", "7", "10" (minutes).
# EOD — continuous contract eod = await api.get_eod("NIFTY-1", "20200828", "20200901") print(f"Got {len(eod)} EOD bars") # EOD — contract specific (include expiry date) eod_c = await api.get_eod_contract("NIFTY", "20200828", "20200901", "20201029") # Intraday bars — 5-minute resolution intra5 = await api.get_intra_eod("NIFTY-1", "20210603", "20210604", "5") # Intraday bars — 1-minute resolution (today only) intra1 = await api.get_intra_eod("BANKNIFTY-1", "20240118", "20240118", "1") # Intraday — contract specific intra_c = await api.get_intra_eod_contract( "NIFTY", "20200828", "20200901", "20201029", "5" ) # Tick data — from a specific datetime to live # Format: "YYYYMMDD HH:mm:ss" ticks = await api.get_back_ticks("BANKNIFTY-1", "20201016 15:00:00") print(f"Got {len(ticks)} ticks")
Processing Historical Data
bars = await api.get_intra_eod("NIFTY-1", "20240115", "20240115", "5") for bar in bars: print(f"{bar['td']} O:{bar['op']} H:{bar['hp']} L:{bar['lp']} C:{bar['cp']} V:{bar['vol']}") # Convert to pandas DataFrame (install with: pip install pandas) import pandas as pd df = pd.DataFrame(bars) df['td'] = pd.to_datetime(df['td']) df.set_index('td', inplace=True) print(df.head())
Complete Working Example
A full end-to-end script. Replace your-api-key-here, save as main.py, run with python main.py.
import asyncio from pix_apidata import * # ── CONFIG ──────────────────────────────────────────────────────── API_KEY = "your-api-key-here" API_HOST = "apidata.accelpix.in" # ── CREATE INSTANCE ─────────────────────────────────────────────── api = apidata_lib.ApiData() event_loop = asyncio.get_event_loop() # ── CALLBACK HANDLERS ───────────────────────────────────────────── def on_trade(msg): t = apidata_models.Trade(msg) print(f"[TRADE] {t.ticker:20} ₹{t.price} | Vol:{t.volume} OI:{t.oi}") def on_trade_snapshot(msg): t = apidata_models.Trade(msg) print(f"[SNAP] {t.ticker:20} ₹{t.price} (last known)") def on_best(msg): b = apidata_models.Best(msg) print(f"[BEST] Bid:₹{b.bidPrice}×{b.bidQty} Ask:₹{b.askPrice}×{b.askQty}") def on_refs(msg): r = apidata_models.Refs(msg) print(f"[REFS] {r.ticker} price={r.price}") def on_srefs(msg): s = apidata_models.RefsSnapshot(msg) print(f"[OHLC] {s.ticker} O:{s.open} H:{s.high} L:{s.low} C:{s.close}") def on_greeks(msg): g = apidata_models.Greeks(msg) print(f"[GREEK] {g.ticker} IV:{g.iv:.4f} Δ:{g.delta:.4f} Θ:{g.theta:.2f}") def on_greeks_snapshot(msg): g = apidata_models.Greeks(msg) print(f"[GSNAP] {g.ticker} IV:{g.iv:.4f}") async def main(): # STEP 1: Register connection callbacks api.on_connection_started(lambda: print("✅ Connected to Accelpix")) api.on_connection_stopped(lambda: print("❌ Disconnected")) # STEP 2: Register data callbacks api.on_trade_update(on_trade) api.on_tradeSnapshot_update(on_trade_snapshot) api.on_best_update(on_best) api.on_refs_update(on_refs) api.on_srefs_update(on_srefs) api.on_greeks_update(on_greeks) api.on_greekSnapshot_update(on_greeks_snapshot) # STEP 3: Initialize — always await this before anything else await api.initialize(API_KEY, API_HOST) # STEP 4: Pull historical data print("Fetching 5-min bars...") bars = await api.get_intra_eod("NIFTY-1", "20210603", "20210604", "5") print(f"📊 Got {len(bars)} bars. First: {bars[0] if bars else 'none'}") # STEP 5: Subscribe to live data print("Subscribing to live data...") await api.subscribeAll(['NIFTY-1', 'BANKNIFTY-1']) await api.subscribeGreeks(['NIFTY2220318500CE']) await api.subscribeOptionChainRange('NIFTY', '20220901', 10) print("🚀 Live. Waiting for data (Ctrl+C to stop)...") # ── ENTRY POINT ─────────────────────────────────────────────────── event_loop.create_task(main()) try: event_loop.run_forever() except KeyboardInterrupt: print("\n👋 Stopped.") finally: event_loop.close()
Installation & Project Setup
Create your project
dotnet new console -n AccelpixApp cd AccelpixApp
Any project type works the same way — WinForms (dotnet new winforms) and WPF (dotnet new wpf) apps reference the SDK identically.
Add the NetApiClient.dll reference
Unlike the Node.js and Python SDKs, NetApiClient.dll is currently distributed directly by Accelpix rather than published on nuget.org. Place the DLL (and its .pdb for debugging) in a libs/ folder inside your project, then add it as a reference:
<ItemGroup>
<Reference Include="NetApiClient">
<HintPath>libs\NetApiClient.dll</HintPath>
</Reference>
</ItemGroup>In Visual Studio you can do this visually instead: right-click the project → Add → Project Reference → Browse → select NetApiClient.dll.
Install required NuGet dependencies
The SDK uses SignalR for its real-time connection and MessagePack for the binary wire format. Install the exact versions below to match the SDK build:
dotnet add package Microsoft.AspNetCore.SignalR.Client --version 5.0.4 dotnet add package Microsoft.AspNetCore.SignalR.Protocols.MessagePack --version 5.0.4 dotnet add package Newtonsoft.Json --version 13.0.1
Import the namespaces and run
using NetApiClient; using FeedData.Models; // ApiClient and all model types (Tick, Best, Refs, Sref, Hd, Htd...) are now available
dotnet run
Initialization
Create one ApiClient instance and call InitializeAsync() — always the very first call in your application. It authenticates your session and opens the underlying SignalR connection. No other method will work until it returns true.
Constructor & Method
var client = new ApiClient(); Task<bool> InitializeAsync(string apiKey, string apiHost, string protoScheme = "http", CancellationToken cancellationToken = default);
Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| apiKey | string | Required | Your API access key from Accelpix | "abc123XYZ==" |
| apiHost | string | Required | Data server hostname | "apidata.accelpix.in" |
| protoScheme | string | Optional | Protocol. Defaults to "http" — pass "https" explicitly for production | "https" |
| cancellationToken | CancellationToken | Optional | Standard .NET cancellation token for the connect operation | default |
Console App Example
using NetApiClient; const string ApiKey = "your-api-key-here"; const string ApiHost = "apidata.accelpix.in"; var client = new ApiClient(); bool ok = await client.InitializeAsync(ApiKey, ApiHost, "https"); if (!ok) { Console.WriteLine("Unable to connect — check your API key/host."); return; } // ✅ Connection ready — subscriptions and history calls go here Console.WriteLine("Connected and ready!");
Callbacks — Receiving Live Data (Events)
ApiClient exposes plain C# events backed by Action delegates — no polling or message-routing required. Register every handler you need with += before calling any Subscribe method so you don't miss the first packets.
📈 Trade Updates Tick — Kind 'T'
Fires on every live trade tick after SubscribeTradeAsync(). This is the primary price update event.
client.TradeUpdate += (Tick t) =>
{
Console.WriteLine($"[TRADE] {t.Ticker} @ ₹{t.Price}");
Console.WriteLine($" Qty: {t.Qty} | Volume: {t.Volume} | OI: {t.Oi}");
};Tick Fields
| Field | Type | Description |
|---|---|---|
| Id | int | Internal tick sequence id |
| Ticker | string | Symbol the tick belongs to |
| SegmentId | byte | 1 = EQ, 2 = F&O |
| Time | uint | Seconds since 1980-01-01 00:00:00 UTC |
| Price | float | Last trade price (LTP) |
| Qty | uint | Quantity traded in this tick |
| Volume | uint | Cumulative day volume |
| Oi | uint | Open Interest |
| Kind | char | Always 'T' |
📊 Best Bid/Ask Best — Kind 'B'
Fires when the best bid or ask price/quantity changes, after SubscribeAsync().
client.BestUpdate += (Best b) =>
{
Console.WriteLine($"[BEST] {b.Ticker}");
Console.WriteLine($" Bid: ₹{b.BidPrice} × {b.BidQty} qty");
Console.WriteLine($" Ask: ₹{b.AskPrice} × {b.AskQty} qty");
};Best Fields
| Field | Type | Description |
|---|---|---|
| Ticker | string | Symbol |
| SegmentId | byte | 1 = EQ, 2 = F&O |
| BidPrice / BidQty | float / uint | Best bid price and quantity |
| AskPrice / AskQty | float / uint | Best ask price and quantity |
| Time | uint | Seconds since 1980-01-01 00:00:00 UTC |
| Kind | char | Always 'B' |
📋 Reference Data — Refs & RefsSnapshot Sref 'A..W' / Refs 'V'
RefsSnapshotUpdate fires once on subscription with the full OHLC + OI snapshot. RefsUpdate fires as individual fields (Open/High/Low/Close/OI/Avg) change during the session — check Kind to know which field updated.
// Fires once on subscription — current OHLC snapshot client.RefsSnapshotUpdate += (Refs r) => { Console.WriteLine($"[OHLC Snap] {r.Ticker}"); Console.WriteLine($" O:{r.Open} H:{r.High} L:{r.Low} C:{r.Close} OI:{r.Oi}"); Console.WriteLine($" Upper Band:{r.UpperBand} Lower Band:{r.LowerBand}"); // EQ only }; // Fires when a single O/H/L/C/OI/Avg value updates during the session client.RefsUpdate += (Sref s) => { Console.WriteLine($"[Ref Update] {s.Ticker} price={s.Price} kind={s.Kind}"); };
Refs Fields (snapshot)
| Field | Type | Description |
|---|---|---|
| Ticker | string | Symbol |
| Open / High / Low / Close | float | Day OHLC values |
| Avg | float | VWAP (average price) |
| Oi | uint | Open Interest |
| Poi | uint | Previous day OI |
| UpperBand / LowerBand | float | Circuit bands (EQ segment only) |
| Kind | char | Always 'V' for the full snapshot |
Sref Fields (single-field update)
| Field | Type | Description |
|---|---|---|
| Ticker | string | Symbol |
| Price | object | The new value — cast based on Kind |
| Kind | char | Which field changed: O=Open, H=High, L=Low, C=Close, N=OI, A/W=Avg |
🔌 Connection Events
client.Connected += () =>
Console.WriteLine("✅ Connected to Accelpix");
client.Closed += (string reason) =>
{
Console.WriteLine($"❌ Connection closed: {reason}");
// Re-initialize and re-subscribe here if you want auto-reconnect
};Live Stream Subscriptions
Call these methods after InitializeAsync() returns true. Each takes a List<string> of tickers so you can subscribe to several symbols in one call.
Subscribe Methods
// ── Best bid/ask + OHLC refs (RefsSnapshotUpdate, RefsUpdate, BestUpdate) ── await client.SubscribeAsync(new List<string> { "NIFTY-1", "BANKNIFTY-1", "TCS" }); // ── Trade ticks only (lower bandwidth) — fires TradeUpdate ──────────────── await client.SubscribeTradeAsync(new List<string> { "NIFTY-1", "BANKNIFTY-1" }); // ── Full option chain for one expiry (YYYYMMDD) ─────────────────────────── await client.SubscribeOptionChainAsync("NIFTY", "20240118"); // ── Range chain: N strikes above + below spot ───────────────────────────── // 10 strikes = 10 CE + 10 PE above + 10 CE + 10 PE below = 40 contracts await client.SubscribeOptionChainRangeAsync("NIFTY", "20240118", 10);
Unsubscribe & Disconnect
await client.UnSubscribeOptionChainAsync("NIFTY", "20240118"); // Cleanly close the SignalR connection when your app shuts down await client.DisposeAsync();
Subscription Methods Reference
| Method | Events Fired | Use When |
|---|---|---|
| SubscribeAsync(tickers) | RefsSnapshotUpdate, RefsUpdate, BestUpdate | Full OHLC + bid/ask feed per symbol |
| SubscribeTradeAsync(tickers) | TradeUpdate | Price-only feed, lower bandwidth |
| SubscribeOptionChainAsync(under, expiry) | RefsSnapshotUpdate / BestUpdate per strike | Full options chain for an expiry |
| SubscribeOptionChainRangeAsync(under, expiry, n) | Same as above, limited to N strikes | ATM-focused chain, fewer contracts |
| UnSubscribeOptionChainAsync(under, expiry) | Stops chain updates | Free up bandwidth or entitlement |
| DisposeAsync() | Fires Closed, ends the connection | Application shutdown |
Historical Data
Pull EOD (end-of-day) bars, intraday minute bars, or tick data. All date parameters use YYYYMMDD format. Every call returns a Task<List<T>> you can await directly.
EOD Historical Bars
// Continuous contract EOD — returns List<Hd> List<Hd> eod = await client.GetEodAsync("NIFTY-1", "20240112", "20240118"); Console.WriteLine($"Got {eod.Count} EOD bars"); // Contract-specific EOD (with exact expiry date) List<Hd> eodC = await client.GetEodContractAsync( "NIFTY", "20240109", "20240118", "20240125" );
Intraday Minute Bars
// Supported resolutions: "1", "3", "5", "7", "10" (minutes). Default is "5". // 5-minute bars, multiple days List<Hd> bars5m = await client.GetIntraEodAsync("NIFTY-1", "20240112", "20240118", "5"); // 1-minute bars, single day (use today's date for live aggregation) List<Hd> bars1m = await client.GetIntraEodAsync("BANKNIFTY-1", "20240118", "20240118", "1"); // Contract-specific intraday bars List<Hd> cBars = await client.GetIntraEodContractAsync( "NIFTY", "20240109", "20240118", "20240125", "5" );
Tick / Back-Tick Data
// All ticks from a given datetime to live/latest — returns List<Htd> // Parameters: ticker, lastDateTime ("YYYYMMDD HH:mm:ss") List<Htd> ticks = await client.GetBackTicksAsync("BANKNIFTY-1", "20240118 15:00:00"); Console.WriteLine($"Got {ticks.Count} ticks");
Response Fields — Hd (EOD / Intra-EOD)
| Field | Type | Description |
|---|---|---|
| Tkr | string | Ticker symbol |
| Td | DateTime | Date (EOD) or datetime (intraday) of the bar |
| Op / Hp / Lp / Cp | decimal | Open / High / Low / Close price of the bar |
| Vol | uint | Volume traded in the bar |
| Oi | int | Open Interest at end of bar |
| Eod | bool | True for an end-of-day bar |
Response Fields — Htd (Back Ticks)
| Field | Type | Description |
|---|---|---|
| Tkr | string | Ticker symbol |
| Tm | int | Trade time — unix epoch |
| Pr | decimal | Last trade price at this tick |
| Qt | int | Quantity traded at this tick |
| Oi | int | Open Interest at this tick |
Processing Historical Data
List<Hd> bars = await client.GetIntraEodAsync("NIFTY-1", "20240115", "20240115", "5"); foreach (var bar in bars) { Console.WriteLine( $"{bar.Td:yyyy-MM-dd HH:mm} O:{bar.Op} H:{bar.Hp} L:{bar.Lp} C:{bar.Cp} V:{bar.Vol}"); }
Complete Working Example
A full console app. Replace your-api-key-here, save as Program.cs, and run with dotnet run.
using System; using System.Collections.Generic; using System.Threading.Tasks; using NetApiClient; using FeedData.Models; class Program { private const string ApiKey = "your-api-key-here"; private const string ApiHost = "apidata.accelpix.in"; static async Task Main(string[] args) { var client = new ApiClient(); // ── STEP 1: Register ALL callbacks BEFORE subscribing ───────────── client.Connected += () => Console.WriteLine("✅ Connected to Accelpix"); client.Closed += reason => Console.WriteLine($"❌ Disconnected: {reason}"); client.TradeUpdate += (Tick t) => Console.WriteLine($"[TRADE] {t.Ticker,-20} ₹{t.Price} | Vol:{t.Volume} OI:{t.Oi}"); client.BestUpdate += (Best b) => Console.WriteLine($"[BEST] {b.Ticker,-20} Bid:₹{b.BidPrice}×{b.BidQty} Ask:₹{b.AskPrice}×{b.AskQty}"); client.RefsSnapshotUpdate += (Refs r) => Console.WriteLine($"[OHLC] {r.Ticker,-20} O:{r.Open} H:{r.High} L:{r.Low} C:{r.Close}"); client.RefsUpdate += (Sref s) => Console.WriteLine($"[REFS] {s.Ticker} price={s.Price} kind={s.Kind}"); // ── STEP 2: Initialize — always await this before anything else ── bool ok = await client.InitializeAsync(ApiKey, ApiHost, "https"); if (!ok) { Console.WriteLine("Unable to connect — check your API key/host."); return; } // ── STEP 3: Pull historical data ────────────────────────────────── Console.WriteLine("Fetching EOD data..."); var eod = await client.GetEodAsync("NIFTY-1", "20240112", "20240118"); Console.WriteLine($"📊 EOD: {eod.Count} bars"); Console.WriteLine("Fetching 5-min bars..."); var intra = await client.GetIntraEodAsync("NIFTY-1", "20240112", "20240112", "5"); Console.WriteLine($"📉 5-min bars: {intra.Count} bars"); // ── STEP 4: Subscribe to live streams ───────────────────────────── Console.WriteLine("Subscribing to live data..."); await client.SubscribeAsync(new List<string> { "NIFTY-1", "BANKNIFTY-1" }); await client.SubscribeTradeAsync(new List<string> { "NIFTY-1", "BANKNIFTY-1" }); await client.SubscribeOptionChainRangeAsync("NIFTY", "20240118", 7); Console.WriteLine("🚀 Live streams active. Press any key to exit..."); Console.ReadKey(); await client.DisposeAsync(); } }
Overview & Authentication
The REST API is a standard HTTP interface — works from any programming language or tool. No SDK required. Best for pulling data on demand, scheduled scripts, Excel integrations, or languages where the SDK isn't available.
Base URL
http://apidata.accelpix.in/api/fda/rest
Authentication
All REST endpoints require your API key as a URL query parameter. The key must be URL-encoded — special characters like +, =, and / must be percent-encoded.
{base_url}/{endpoint}?api_token=YOUR_URL_ENCODED_KEYHow to URL-encode your key
| Language | Code |
|---|---|
| Python | urllib.parse.quote("your+key==", safe="") |
| C# / .NET | Uri.EscapeDataString("your+key==") |
| JavaScript | encodeURIComponent("your+key==") |
| Java | URLEncoder.encode("your+key==", "UTF-8") |
| Postman | Paste key into the variable field — Postman auto-encodes |
Endpoint 1 — EOD Historical Data
Returns daily OHLCV + OI bars for any symbol and date range.
| Parameter | Format | Example | Notes |
|---|---|---|---|
| {ticker} | string | NIFTY-1 or NIFTY%2050 | URL-encode spaces in index names |
| {startDate} | YYYYMMDD | 20240101 | First date to fetch |
| {endDate} | YYYYMMDD | 20240115 | Last date to fetch (inclusive) |
Example Requests
# Continuous futures EOD GET http://apidata.accelpix.in/api/fda/rest/NIFTY-1/20240101/20240115?api_token=YOUR_KEY # Index EOD (space encoded as %20) GET http://apidata.accelpix.in/api/fda/rest/NIFTY%2050/20240101/20240115?api_token=YOUR_KEY # Equity EOD GET http://apidata.accelpix.in/api/fda/rest/TCS/20240101/20240115?api_token=YOUR_KEY
Response
[
{
"tkr": "NIFTY 50",
"td": "2024-01-01 00:00:00",
"op": 21727.80,
"hp": 21834.30,
"lp": 21680.80,
"cp": 21741.90,
"vol": 0,
"oi": 0,
"eod": true
},
...
]Endpoint 2 — Intra-EOD (Minute Bars)
Returns intraday OHLCV + OI bars at the specified minute resolution.
| Parameter | Options | Notes |
|---|---|---|
| {resolution} | 1, 3, 5, 7, 10 | Minutes per bar. "5" = 5-minute bars |
| {startDate} | YYYYMMDD | Use today's date for live session data |
Example Requests
# 5-minute bars, multi-day GET http://apidata.accelpix.in/api/fda/rest/NIFTY%2050/20240111/20240112/5?api_token=YOUR_KEY # 1-minute bars, single day (current session) GET http://apidata.accelpix.in/api/fda/rest/BANKNIFTY-1/20240118/20240118/1?api_token=YOUR_KEY # 10-minute bars, equity GET http://apidata.accelpix.in/api/fda/rest/TCS/20240110/20240115/10?api_token=YOUR_KEY # 3-minute bars GET http://apidata.accelpix.in/api/fda/rest/NIFTY-1/20240110/20240115/3?api_token=YOUR_KEY
Endpoint 3 — Live Intra OHLC (with Timestamp Range)
Returns intraday bars within a specific datetime range — both start and end include the time component.
DateTime format: YYYYMMDD HH:mm:ss — spaces must be URL-encoded as %20
Example Requests
# Last 15 minutes of a session — 5-min bars GET http://apidata.accelpix.in/api/fda/rest/NIFTY%2050/20240112%2015:00:00/20240112%2015:15:00/5?api_token=YOUR_KEY # Morning session 9:15 to 11:30 — 1-min bars GET http://apidata.accelpix.in/api/fda/rest/NIFTY-1/20240115%2009:15:00/20240115%2011:30:00/1?api_token=YOUR_KEY
Endpoint 4 — Real-Time Quotes (POST)
Returns the latest market snapshot for a list of symbols — LTP, OHLC, volume, OI, bid/ask, change%, and circuit bands.
Request body: JSON array of ticker strings. Returns one object per ticker.
["NIFTY-1", "BANKNIFTY-1", "TCS", "RELIANCE", "INFY"]
Response Fields
| Field | Full Name | Field | Full Name |
|---|---|---|---|
| tkr | Ticker symbol | pr | Last trade price (LTP) |
| sid | Segment (1=EQ, 2=F&O) | vol | Cumulative day volume |
| tm | Last trade time (unix epoch) | oi | Open Interest |
| op | Day open price | poi | Previous day OI |
| hp | Day high price | avg | VWAP (average price) |
| lp | Day low price | chg | Price change vs prev close |
| cp | Previous close price | chgpc | Change percentage |
| bp / bq | Best bid price / qty | upc | Upper circuit price |
| ap / aq | Best ask price / qty | lrc | Lower circuit price |
| val | Total traded value | band | Circuit band (EQ only) |
Sample Response
[
{
"tkr": "NIFTY-1", "sid": 2, "pr": 21741.90,
"op": 21727.80, "hp": 21834.30, "lp": 21680.80, "cp": 21710.50,
"vol": 15432150, "oi": 9321200,
"chg": 31.40, "chgpc": 0.14,
"bp": 21741, "bq": 150, "ap": 21742, "aq": 200,
"avg": 21755.60
}
]Endpoint 5 — Master Data
Returns the full symbol list with metadata. Same as the Symbol Master JSON but served through the REST API endpoint.
GET http://apidata.accelpix.in/api/fda/rest/master?api_token=YOUR_KEY
For the full master with lot sizes, use the dedicated endpoints instead:
# Without lot size GET https://apidata.accelpix.in/api/hsd/Masters/2?fmt=json # With lot size (F&O and MCX) GET https://apidata.accelpix.in/api/hsd/Masters/3?fmt=json
Code Samples
🐍 Python
import requests import urllib.parse BASE = "http://apidata.accelpix.in/api/fda/rest" KEY = urllib.parse.quote("your_api_key_here", safe="") # ── EOD Data ───────────────────────────────────────── eod = requests.get(f"{BASE}/NIFTY-1/20240116/20240118?api_token={KEY}").json() print(f"EOD bars: {len(eod)}") for bar in eod: print(f" {bar['td']} O:{bar['op']} H:{bar['hp']} L:{bar['lp']} C:{bar['cp']}") # ── 5-min Intraday ─────────────────────────────────── intra = requests.get(f"{BASE}/NIFTY-1/20240116/20240118/5?api_token={KEY}").json() print(f"5-min bars: {len(intra)}") # ── Real-time Quotes ───────────────────────────────── quotes = requests.post( f"{BASE}/quote?api_token={KEY}", json=["NIFTY-1", "BANKNIFTY-1", "TCS", "RELIANCE"] ).json() print("\n=== Live Quotes ===") for q in quotes: print(f"{q['tkr']:20} LTP: ₹{q['pr']:10} Chg: {q['chgpc']:+.2f}% Vol: {q['vol']}") # ── Symbol Master ──────────────────────────────────── master_url = "https://apidata.accelpix.in/api/hsd/Masters/3?fmt=json" master = requests.get(master_url).json() print(f"\nMaster: {len(master)} instruments") # Find all NIFTY weekly options expiring on 18-Jan-2024 jan18_opts = [x for x in master if x.get('utkr') == 'NIFTY' and '20240118' in x.get('exp', '')] print(f"NIFTY 18-Jan options: {len(jan18_opts)}") for opt in jan18_opts[:5]: print(f" {opt['tkr']} strike:{opt.get('sp')} lot:{opt.get('lot')}")
⚙️ C# (.NET)
using System; using System.Net.Http; using System.Text; using System.Threading.Tasks; using System.Collections.Generic; using Newtonsoft.Json; using Newtonsoft.Json.Linq; class AccelpixClient { static readonly string BASE = "http://apidata.accelpix.in/api/fda/rest"; static readonly string KEY = Uri.EscapeDataString("your_api_key_here"); static readonly HttpClient http = new HttpClient(); static async Task Main() { // ── EOD Data var eodJson = await http.GetStringAsync( $"{BASE}/NIFTY-1/20240116/20240118?api_token={KEY}" ); var eod = JArray.Parse(eodJson); Console.WriteLine($"EOD bars: {eod.Count}"); foreach (var bar in eod) Console.WriteLine($" {bar["td"]} C:{bar["cp"]}"); // ── 5-min Intraday var intraJson = await http.GetStringAsync( $"{BASE}/NIFTY-1/20240116/20240118/5?api_token={KEY}" ); var intra = JArray.Parse(intraJson); Console.WriteLine($"5-min bars: {intra.Count}"); // ── Quotes POST var symbols = new List<string> { "NIFTY-1", "BANKNIFTY-1", "TCS" }; var payload = new StringContent( JsonConvert.SerializeObject(symbols), Encoding.UTF8, "application/json" ); var qResp = await http.PostAsync($"{BASE}/quote?api_token={KEY}", payload); var qJson = await qResp.Content.ReadAsStringAsync(); var quotes = JArray.Parse(qJson); Console.WriteLine("\n=== Live Quotes ==="); foreach (var q in quotes) Console.WriteLine($"{q["tkr"],-20} LTP: ₹{q["pr"]} Chg: {q["chgpc"]:+0.00}%"); } }
Postman Setup Guide
Postman is the easiest way to test the REST API without writing any code. Follow these steps to get started in under 5 minutes.
Download & Install Postman
Go to postman.com/downloads and install the free desktop app for your OS.
⬇ Download PostmanCreate a Collection
Open Postman → Click Collections in the left sidebar → Click + → Name it "Accelpix API"
Set a Collection Variable for your API Key
Click your collection → Variables tab → Add:
| Variable | Initial Value |
|---|---|
| api_token | your_api_key_here |
| base_url | http://apidata.accelpix.in/api/fda/rest |
Now use {{api_token}} and {{base_url}} in all your requests.
Add an EOD Request
Click + Add Request on your collection:
| Field | Value |
|---|---|
| Method | GET |
| URL | {{base_url}}/NIFTY-1/20240110/20240118?api_token={{api_token}} |
| Name | EOD Data - NIFTY |
Click Send — you should see a JSON array of EOD bars in the response.
Add a Quotes Request (POST)
| Field | Value |
|---|---|
| Method | POST |
| URL | {{base_url}}/quote?api_token={{api_token}} |
| Body | raw → JSON |
["NIFTY-1", "BANKNIFTY-1", "TCS", "RELIANCE", "INFY"]
Click Send — you'll get real-time quote snapshots for all listed symbols.
Import the Pre-Built Collection
In Postman: File → Import → paste this JSON directly to get all endpoints ready:
{
"info": {
"name": "Accelpix Pix APIs",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{ "key": "api_token", "value": "YOUR_API_KEY_HERE" },
{ "key": "base_url", "value": "http://apidata.accelpix.in/api/fda/rest" }
],
"item": [
{
"name": "1. EOD Data - NIFTY",
"request": { "method": "GET", "url": "{{base_url}}/NIFTY-1/20240110/20240118?api_token={{api_token}}" }
},
{
"name": "2. EOD Data - NIFTY 50 Index",
"request": { "method": "GET", "url": "{{base_url}}/NIFTY%2050/20240110/20240118?api_token={{api_token}}" }
},
{
"name": "3. Intra-EOD 5min - NIFTY",
"request": { "method": "GET", "url": "{{base_url}}/NIFTY-1/20240110/20240118/5?api_token={{api_token}}" }
},
{
"name": "4. Intra-EOD 1min - Today",
"request": { "method": "GET", "url": "{{base_url}}/NIFTY-1/20240118/20240118/1?api_token={{api_token}}" }
},
{
"name": "5. Real-Time Quotes (POST)",
"request": {
"method": "POST",
"url": "{{base_url}}/quote?api_token={{api_token}}",
"header": [{ "key": "Content-Type", "value": "application/json" }],
"body": { "mode": "raw", "raw": "[\"NIFTY-1\", \"BANKNIFTY-1\", \"TCS\", \"RELIANCE\"]" }
}
},
{
"name": "6. Symbol Master (with Lot Size)",
"request": { "method": "GET", "url": "https://apidata.accelpix.in/api/hsd/Masters/3?fmt=json" }
},
{
"name": "7. Live Intra OHLC with Timestamp",
"request": { "method": "GET", "url": "{{base_url}}/NIFTY%2050/20240112%2015:00:00/20240112%2015:15:00/5?api_token={{api_token}}" }
},
{
"name": "8. REST Master Data",
"request": { "method": "GET", "url": "{{base_url}}/master?api_token={{api_token}}" }
}
]
}Overview & Connection
The Greeks WebSocket API streams live option Greeks (IV, Delta, Gamma, Theta, Vega, Rho, and second/third-order Greeks), real-time trade ticks, and best Bid/Ask updates over a persistent Socket.IO connection. This is the right choice for options trading desks, risk dashboards, and any application that needs continuously updating Greeks rather than periodic snapshots.
Live Greeks
IV, Delta, Gamma, Theta, Vega, Rho, Vanna, Charm, Speed, Zomma, Color, Volga pushed on every recalculation.
Trade Ticks
Real-time price, quantity, volume and OI on every executed trade for subscribed symbols.
Best Bid/Ask
Live top-of-book updates via the bidask channel, with a bidask_latest snapshot channel too.
Connection URL
https://greeks.accelpix.in?apiKey={YOUR_API_KEY}Authentication
Pass your API key as the apiKey query parameter when establishing the connection. There is no separate handshake or token exchange — the key is validated at connect time.
| Parameter | Location | Required | Notes |
|---|---|---|---|
| apiKey | Query string | Yes | Your Accelpix API key |
Subscribing & Unsubscribing
After connecting, emit a subscribe event with the list of symbols you want to receive updates for. Symbols use the standard Accelpix option-symbol format (see the Symbols tab for the full notation guide).
Subscribe to Symbols
socket.emit("subscribe", { symbols: ["NIFTY25MAY24550PE"] });
Unsubscribe from Symbols
socket.emit("unsubscribe", { symbols: ["NIFTY25MAY24550PE"] });
Event Channels
Once subscribed, the server pushes data on the following named events. Register a listener for each event type your application needs.
| Event | Description |
|---|---|
| trade | Real-time tick data on every executed trade |
| trade_latest | Latest available trade snapshot for subscribed symbols |
| greeks | Real-time Greeks updates as they recalculate |
| greeks_latest | Latest available Greeks snapshot for subscribed symbols |
| bidask | Real-time best Bid/Ask updates |
| bidask_latest | Latest available Bid/Ask snapshot |
| errors | Subscription or authentication errors |
Trade Event Payload
{
"id": 2061691,
"kind": "T",
"ticker": "NIFTY25MAY24700CE",
"segmentId": 2,
"time": "2025-05-15T10:22:02.000Z",
"price": 261,
"qty": 75,
"volume": 1624950,
"oi": 2034600
}Greeks Event Payload
{
"ticker": "NIFTY25MAY24700CE",
"iv": 0.1746,
"delta": 0.4714,
"gamma": 0.00047,
"theta": -4369.10,
"vega": 19.19,
"rho": 4.33,
"vanna": -0.0803,
"charm": 1.38,
"speed": -0.000009,
"zomma": -0.00268,
"color": -0.00617,
"volga": 83.52,
"tgr": -33.20,
"dtr": -43.80,
"tv": 300,
"timestamp": 1747285593971
}Greeks Field Reference
| Field | Meaning |
|---|---|
| iv | Implied volatility |
| delta | Rate of change of option price vs. underlying price |
| gamma | Rate of change of delta vs. underlying price |
| theta | Time decay — daily option value loss |
| vega | Sensitivity to a 1% change in implied volatility |
| rho | Sensitivity to a 1% change in interest rates |
| vanna | Sensitivity of delta to a change in volatility |
| charm | Rate of change of delta over time |
| speed | Rate of change of gamma vs. underlying price |
| zomma | Rate of change of gamma vs. volatility |
| color | Rate of change of gamma over time |
| volga | Rate of change of vega vs. volatility |
| tv | Theoretical value of the option |
| tgr / dtr | Internal risk indicators (total gamma risk / delta-theta ratio) |
Error Event Payload
{
"error": "Invalid API key or exceeded subscription limit"
}HTTP API — Instant Snapshot Endpoints
For cases where you need the latest Greeks or trade data immediately without waiting for the next WebSocket push, two HTTP POST endpoints return the most recent cached value for each requested symbol.
Returns the most recently computed Greeks for each requested symbol, without waiting for a live push.
Headers
{
"x-api-key": "YOUR_API_KEY"
}Request Body
{
"symbols": ["NIFTY25MAY24800CE", "BANKNIFTY25MAY46000PE", "NIFTY25MAY25000CE"]
}Response
[{
"ticker": "NIFTY25MAY24800CE",
"iv": 0.1746,
"delta": 0.4714,
"gamma": 0.00047,
"theta": -4369.10,
"vega": 19.19,
"rho": 4.33,
"tv": 300,
"timestamp": 1747285593971
}]Returns the most recent trade tick for each requested symbol instantly.
Headers
{
"x-api-key": "YOUR_API_KEY"
}Request Body
{
"symbols": ["NIFTY25MAY24700CE", "BANKNIFTY25MAY46000PE", "NIFTY25MAY25000CE"]
}Response
[{
"id": 2061691,
"kind": "T",
"ticker": "NIFTY25MAY24700CE",
"segmentId": 2,
"time": "2025-05-15T10:22:02.000Z",
"price": 261,
"qty": 75,
"volume": 1624950,
"oi": 2034600
}]Plan Limits & Rules
| Plan | Max Symbols per Connection |
|---|---|
| Basic | 5 symbols |
| Pro | 25 symbols |
| Enterprise | Custom — contact support |
- Only one active WebSocket connection is permitted per API key at any time.
- Exceeding your plan's subscription limit triggers an errors event rather than a silent failure.
Node.js Example (socket.io-client)
// Install with: npm install socket.io-client const { io } = require("socket.io-client"); // Replace with your actual API key const API_KEY = "YOUR_API_KEY"; // Connect to the WebSocket server const socket = io("https://greeks.accelpix.in", { query: { apiKey: API_KEY }, transports: ["websocket"] }); // Symbol(s) to subscribe const symbolsToSubscribe = ["NIFTY25JUN24700CE"]; socket.on("connect", () => { console.log("✅ Connected to Accelpix WebSocket"); socket.emit("subscribe", { symbols: symbolsToSubscribe }); console.log(`📡 Subscribed to symbols: ${symbolsToSubscribe.join(", ")}`); }); socket.on("trade", (data) => { console.log("📈 Trade Data:", data); }); socket.on("greeks", (data) => { console.log("📊 Greeks Data:", data); }); socket.on("errors", (err) => { console.error("❌ Error:", err); }); socket.on("disconnect", () => { console.log("🔌 Disconnected from server"); });
Python Example (python-socketio)
#pip install "python-socketio[client]" import socketio import time API_KEY = "YOUR_API_KEY" sio = socketio.Client() @sio.event def connect(): print("✅ Connected to server") sio.emit("subscribe", {"symbols": ["NIFTY25JUN24550PE"]}) @sio.event def disconnect(): print("❌ Disconnected from server") @sio.on("trade") def on_trade(data): print("Trade:", data) @sio.on("greeks") def on_greeks(data): print("Greeks:", data) @sio.on("errors") def on_errors(data): print("Error:", data) if __name__ == "__main__": try: sio.connect( f"https://greeks.accelpix.in?apiKey={API_KEY}", transports=["websocket"] ) print("Press Ctrl+C to exit.") while True: time.sleep(1) except KeyboardInterrupt: sio.disconnect()
Support
Integration Help
Symbol master references and integration assistance available on request.
Overview & Authentication
The News API is a standard HTTP REST interface — works from any programming language or tool, no SDK required. Best for displaying market news feeds, building a news widget, or pulling headlines into a dashboard alongside live quotes and Greeks.
Latest News
The most recent published articles across all categories and publishers.
Filterable List
Paginated article list, filterable by category and/or publisher.
Article Detail
Full article body, image, and source link for a single newsId.
Authentication
All endpoints require an API key, passed as a apikey query parameter (lowercase, no underscore — different from the api_token parameter used by the market data REST API).
?apikey={YOUR_API_KEY}1. Get Latest News
Returns the latest published news articles, sorted newest first.
No additional parameters required beyond the API key.
Response Fields
| Field | Description |
|---|---|
| newsId | Unique identifier for the article |
| title | Headline |
| shortDescription | Brief summary / excerpt |
| fullDescription | Full article body (may be null on list endpoints) |
| image | Cover image URL |
| date | Publish timestamp (ISO 8601, UTC) |
| publisher | Source publication name |
| publisherUrl | Source publication domain |
| category | Article category |
Example Response
[{
"newsId": "NEWS33696",
"title": "US Stock Market Live: Dow futures down 700 points...",
"shortDescription": "US Stock Market Live: Futures on Wall Street...",
"date": "2025-04-09T11:17:29.000Z",
"publisher": "CNBCTV18",
"category": "market"
}]2. Get News List (Filterable)
Returns a paginated, filterable list of articles — the right choice for a browsable news feed with category or publisher tabs.
All filters are optional — omit a parameter to leave that dimension unfiltered.
Query Parameters
| Parameter | Required | Description |
|---|---|---|
| categories | Optional | Comma-separated category names, e.g. Market,Business |
| publisher | Optional | Comma-separated publisher names, e.g. LiveMint,CNBCTV18 |
| page | Optional | Page number for pagination — default 1 |
Example Response
[{
"newsId": "NEWS33615",
"title": "India scraps cargo transshipment route for Bangladesh...",
"shortDescription": "The government has terminated the transshipment facility...",
"date": "2025-04-09T06:59:01.000Z",
"publisher": "CNBCTV18",
"category": "business"
}]3. Get News Detail
Returns the complete article — including the full body text and original source link — for a single newsId. Use this when the user taps into a headline from the list or latest feed.
Path Parameter
| Parameter | Description |
|---|---|
| newsId | ID of the news article, e.g. NEWS33696 |
Example Response
{
"newsId": "NEWS33696",
"title": "US Stock Market Live: Dow futures down 700 points after China retaliates",
"shortDescription": "US Stock Market Live: Futures on Wall Street...",
"fullDescription": null,
"image": "https://images.cnbctv18.com/uploads/...",
"date": "2025-04-09T11:17:29.000Z",
"orgLink": "https://www.cnbctv18.com/market/us-stock-market-live...",
"publisher": "CNBCTV18",
"publisherUrl": "cnbctv18.com",
"category": "market"
}Categories & Publishers
Use these exact values when filtering the news list endpoint.
Available Categories
| Category |
|---|
| All |
| Market |
| Business |
| Economy |
| Technology |
| Politics |
| Sports |
| Education |
| World |
| India |
Available Publishers
| Publisher |
|---|
| CNBCTV18 |
| LiveMint |
| TimesOfIndia |
Rate Limits & Error Codes
Rate Limits
| Window | Limit |
|---|---|
| Per Minute | 10 requests |
| Per Day | 1,000 requests |
Error Codes
| Code | Meaning |
|---|---|
| 400 | Bad Request — invalid request format |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — daily quota exceeded |
| 429 | Too Many Requests — rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable |