Accelpix
Pix APIs DEVELOPER PLATFORM
🚀Apply for Free API Trial
Enter API key
👋 Need a hand?
Reach the Accelpix team or jump straight to what you need.
💬 Live ChatTalk to support in real time 🎫 Raise a TicketTrack issues on our help desk 📧 Contact Us[email protected] 📞 Call Us+99 990 999 3349 💳 Pricing & PlansCompare API plans & register 🚀 Free API TrialGet a trial key in minutes
Select Endpoint to Test
GET
EOD Data
Daily OHLCV bars
GET
Intra-EOD
1/3/5/7/10 min bars
GET
Live Intra OHLC
Datetime-range bars
LIVE
Live Stream Monitor
Auto-polling ticker feed
POST
Real-Time Quotes
Multi-symbol snapshot
GET
Symbol Master
Without lot size
GET
Master + Lot Size
F&O & MCX
GET
REST Master
Via REST endpoint
LIVE
Greeks Live (WebSocket)
Real-time Greeks/trade/bidask
POST
Latest Greeks
Instant Greeks snapshot
POST
Latest Trades
Instant trade snapshot
GET
Latest News
Most recent articles
GET
News List
Filterable, paginated
GET
News Detail
Single article by ID
API Key
API Host
GET
Configure parameters above
Response
🔬

Select an endpoint above

Enter your API key and click Send Request

Overview & Getting Started
Introduction

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.

Prerequisites & Software

Software Download & Installation — Step by Step

Follow the section for your chosen SDK. Each section is self-contained — you only need to complete one.

🟩 Node.js Setup (for Node.js SDK)
🟩
Node.js v18 LTS
JavaScript runtime required to run the SDK. Download v18 LTS — the most stable version. npm package manager is bundled automatically.
⬇ Download Node.js
🖊️
VS Code Editor (Recommended)
Free code editor from Microsoft. After installing, add the "JavaScript (ES2015+) snippets" extension for better syntax highlighting and autocompletion.
⬇ Download VS Code
1

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.

2

Verify Installation

Open Terminal (macOS/Linux) or Command Prompt / PowerShell (Windows) and run:

Check versions:
node --version
Expected: v18.x.x or higher
npm --version
Expected: 9.x.x or higher
3

Create Project & Install pix-apidata

bash — Terminal / PowerShell
# 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
🐍 Python Setup (for Python SDK)
🐍
Python 3.10+
Download the latest stable Python. On Windows: during install, tick ✅ "Add Python to PATH" — this is critical for pip and python commands to work.
⬇ Download Python
🖊️
VS Code + Python Extension
Install VS Code then add the "Python" extension by Microsoft (Ctrl+Shift+X). Provides debugging, autocomplete, inline error highlighting, and run buttons.
⬇ Download VS Code
⚠️
Windows — Critical: During Python installation, tick "Add Python to PATH" before clicking Install Now. Without this, python and pip commands will not work in Command Prompt.
1

Install Python

Go to python.org/downloads → Click the download button → Run installer → ✅ Check "Add Python to PATH" → Click Install Now.

2

Verify Installation

Windows — Command Prompt:
python --version
Python 3.10.x or higher
pip --version
pip 23.x from ...
macOS / Linux — Terminal:
python3 --version
Python 3.10.x or higher
3

Create Project & Virtual Environment

A virtual environment keeps packages isolated — recommended to avoid conflicts with other projects.

bash
# 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)
4

Install pix-apidata Library

bash
# Install the Accelpix library
pip install pix-apidata

# Verify installation
pip show pix-apidata
🟣 .NET Setup (for .NET SDK)
🟣
.NET SDK 6.0+ (or VS 2022)
The SDK assembly targets .NET Standard 2.0, so it works from .NET Framework 4.6.1+, .NET Core 2.0+, and modern .NET 5/6/7/8 projects alike. Visual Studio 2022 Community is free and includes the .NET SDK.
⬇ Download .NET SDK
🖊️
Visual Studio 2022 / VS Code
Visual Studio gives you the WinForms/WPF designer and NuGet UI. VS Code + C# Dev Kit works equally well for console apps and services.
⬇ Download Visual Studio
ℹ️
Distributed as a DLL, not NuGet: The NetApiClient.dll assembly is provided directly by Accelpix rather than published on nuget.org. Contact support to receive the latest build.
1

Create a Console App

bash — Terminal / PowerShell
# Create project folder
dotnet new console -n AccelpixApp
cd AccelpixApp
2

Add the NetApiClient.dll Reference

Drop NetApiClient.dll into a libs/ folder in your project, then reference it directly in the .csproj:

xml — AccelpixApp.csproj
<ItemGroup>
  <Reference Include="NetApiClient">
    <HintPath>libs\NetApiClient.dll</HintPath>
  </Reference>
</ItemGroup>
3

Install Required NuGet Dependencies

bash
# 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
🔗 REST API Setup — No SDK Needed

The REST API is plain HTTP — no special SDK required. Works from any tool or language. Choose below:

🟠
Postman (Easiest)
GUI tool — best for non-developers and quick testing. No code needed.
⬇ Download Postman
🐍
Python + requests
Simple HTTP calls from Python scripts.
bash
pip install requests
⚙️
C# / .NET
HttpClient is built-in to .NET. Add Newtonsoft.Json for JSON parsing.
nuget
Install-Package Newtonsoft.Json
Authentication

API Key — Getting & Using Your Credentials

1

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.

2

Your Credentials

CredentialWhat it isExample
API KeyUnique authentication token for all requestscvFRDRmyKXp2+Y9KKgPBfC0=m
API HostData server addressapidata.accelpix.in
3

Store Credentials Securely

Never hardcode your key in shared or public code. Use environment variables:

.env file — create in project root
ACCELPIX_API_KEY=your-api-key-here
ACCELPIX_HOST=apidata.accelpix.in
🔒
Security: Add .env to your .gitignore file. Treat the API key like a password. If compromised, contact Accelpix immediately to rotate it.

How the Key is Passed — by Interface

InterfaceHow to pass the keyNotes
Node.js SDKapidata.initialize(apiKey, host, scheme)1st argument to initialize()
Python SDKawait api.initialize(apiKey, host)1st argument to initialize()
.NET SDKawait client.InitializeAsync(apiKey, host, "https")1st argument to InitializeAsync()
REST API?api_token=YOUR_URL_ENCODED_KEYURL query param — must be URL-encoded
Symbol Master

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.

💡
Non-technical explanation: Think of the Symbol Master like a phone directory. Before you can "call" a symbol (subscribe to its data), you look up its "number" (the tkr field). Download this file at the start of each trading day — new weekly option contracts are added every week.
GEThttps://apidata.accelpix.in/api/hsd/Masters/2?fmt=json

Returns all symbols without lot size. Use for equities and indices.

GEThttps://apidata.accelpix.in/api/hsd/Masters/3?fmt=json

Returns all symbols with lot size. Use for F&O and MCX instruments.

Symbol Master Response Fields

FieldTypeDescriptionExample
xidintSegment ID: 1=EQ, 2=F&O, 3=NCD, 5=MCX2
tkrstringTicker — use this in all subscriptions and API callsNIFTY-1
atkrstringAlternative ticker for mapping or displayNIFTY_1
ctkrstringContract ticker (current futures name)NIFTY24JAN
expstringExpiry date (ISO 8601). Epoch = no expiry2024-01-25T00:00:00Z
utkrstringUnderlying ticker for F&O contractsNIFTY
inststringInstrument type: EQUITY, FUTSTK, FUTIDX, OPTSTK, OPTIDX, INDEXFUTIDX
spstringStrike price (options only)"22000.00"
tkintExchange-defined token number16921
lotintLot size (0 for equities and indices)50

Sample Symbol Master Entry

json — Symbol Master Response
{
  "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
}
Reference

Complete Field & Acronym Reference

Packet Type Codes — "kind" Field

CodeFull NameWhen it firesCallback
TTrade PacketEvery live trade tickonTrade / on_trade_update
BBest PacketBest bid or ask changesonBest / on_best_update
VReference SnapshotOnce at subscription (full OHLC+OI+bands)onRefsSnapshot / on_srefs_update
AAverage / Ref UpdateOHLC reference changes during dayonRefs / on_refs_update
GOption GreeksGreeks recalculation updateonGreeks / on_greeks_update
OOpen PriceOpening price update
HHigh PriceNew intraday high
LLow PriceNew intraday low
CClose PriceClosing price update
NOpen InterestOI change

All Response Field Acronyms

FieldFull NameSegment / Notes
apAsk PriceBest ask price
aqAsk QuantityBest ask quantity
avgAverage Price (VWAP)Volume-weighted average for the day
bandCircuit Price Band %EQ / Cash segment only
bpBid PriceBest bid price
bqBid QuantityBest bid quantity
chgChange Pricevs previous day close
chgpcChange Percentage% vs previous day close
cpClose PricePrevious day's closing price
hpHigh PriceDay high
lpLow PriceDay low
lrcLower Circuit PriceEQ segment
oiOpen InterestCurrent open interest
opOpen PriceDay opening price
poiPrevious Open InterestPrevious day's OI
prLast Trade Price (LTP)Most recent trade price
qtyQuantity (per tick)Volume in this specific trade tick
sidSegment ID1 = EQ (Cash), 2 = F&O
tdTrade Date / DateTimeISO 8601 format
tknToken NumberExchange token — not actively used currently
tmTrade TimeUnix epoch timestamp
upcUpper Circuit PriceEQ segment
valTraded ValueVolume × Price
volCumulative Day VolumeTotal volume since market open

Option Greeks Fields

FieldDescription
ivImplied Volatility
ivvwapIV Volume-Weighted Average Price
twapivIV Time-Weighted Average Price
deltaOption price change per ₹1 move in underlying
gammaRate of change of delta
thetaDaily time decay value
vegaSensitivity to 1% change in IV
vannaCross-sensitivity: delta to volatility
charmRate of change of delta over time
speedRate of change of gamma vs underlying price
zommaRate of change of gamma vs volatility
volgaSensitivity of vega to volatility (Vomma)
colorRate of change of gamma over time
tgrTotal gamma risk
tvTheoretical value
dtrDays to ratio
highiv / lowivIntraday IV high and low
timestampNanoseconds from 01-Jan-1980 00:00:00 UTC
Changelog

Python SDK Version History

v1.3.5
13 Dec 2024
Bug fixes and stability improvements.
v1.3.4
11 Dec 2024
  • Removed scheme parameter from initialize() — update any existing code that passes 3 arguments
  • Updated library dependency tree to latest version
v1.3.3
29 Aug 2022
Added Option Chain Range subscription and unsubscription methods.
v1.3.2
02 Aug 2022
Introduced Option Chain full subscription and unsubscription methods.
v1.3.1
28 Jan 2022
  • Trade Snapshot is now a separate callback (previously combined with Trade callback)
  • Segment subscription enabled for entitled users
  • Option Greeks introduced
v1.3.0
06 May 2021
  • Added upper and lower price bands for EQ market in Refs Snapshot
  • Live tick aggregation for current-day minute bars
Support

Contact & Support

New to Accelpix? Get full sandbox access in minutes — no commitment required.
🚀 Apply for Free API Trial
💬

Live Chat

Chat with us now

📞

Phone Support

+99 990 999 3349

📧

Email Support

[email protected]

🌐

Knowledge Base

support.accelpix.com

💳

Pricing & Plans

View plans & register

🏢

Office

Accelpix Solutions Pvt. Ltd.
Gandhinagar / Ahmedabad, Gujarat, India

Symbols Format Guide
Symbol Format Reference

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 StringIndex NameREST URL Form
NIFTY 50Nifty 50 Index (Benchmark)NIFTY%2050
NIFTY BANKBank Nifty IndexNIFTY%20BANK
NIFTY MIDCAPNifty Midcap IndexNIFTY%20MIDCAP
NIFTY 500Nifty 500 IndexNIFTY%20500
NIFTY 100Nifty 100 IndexNIFTY%20100
NIFTY FIN SERVICEFin Nifty (FINNIFTY) Spot IndexNIFTY%20FIN%20SERVICE
ℹ️
Index symbols are for spot/cash index values only. For trading derivatives on these indices, use the Futures or Options formats below.

🔄 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.

⚠️
Pick one style and stick with it. Don't mix hyphen and roman numerals within the same application. Also, use either continuous or contract futures — not both simultaneously, as this can cause data conflicts.
ContractHyphenUnderscoreNumberRoman
Current / 1st MonthNIFTY-1NIFTY_1NIFTY1NIFTY-I
Next / 2nd MonthNIFTY-2NIFTY_2NIFTY2NIFTY-II
Far / 3rd MonthNIFTY-3NIFTY_3NIFTY3NIFTY-III
BankNifty CurrentBANKNIFTY-1BANKNIFTY_1BANKNIFTY-I
FinNifty CurrentFINNIFTY-1FINNIFTY_1FINNIFTY-I
Reliance CurrentRELIANCE-1RELIANCE_1RELIANCE-I

📅 3. Contract Futures

Contract symbols map to a specific expiry month. Format: SYMBOL + YY + MMM

NIFTY
+
24
JAN
NIFTY24JAN  =  Nifty Futures expiring January 2024
SymbolInstrumentExpiry
NIFTY24JANNifty 50 FuturesJanuary 2024
NIFTY24FEBNifty 50 FuturesFebruary 2024
NIFTY24MARNifty 50 FuturesMarch 2024
BANKNIFTY24JANBank Nifty FuturesJanuary 2024
RELIANCE24FEBReliance Industries FuturesFebruary 2024
TCS24DECTCS FuturesDecember 2024

📆 4. Monthly Options

Format: <Ticker><YYMMM><StrikePrice><CE or PE>

NIFTY
24FEB
21900
CE
Ticker = NIFTY  |  Expiry = 24FEB (Feb 2024)  |  Strike = 21900  |  Type = CE (Call)  →  NIFTY24FEB21900CE

More Monthly Option Examples

SymbolBreakdown
NIFTY24FEB21900CENIFTY · Feb 2024 · Strike 21,900 · Call
NIFTY24FEB21900PENIFTY · Feb 2024 · Strike 21,900 · Put
ZEEL24MAR150PEZEEL · March 2024 · Strike 150 · Put
BANKNIFTY24MAR48000CEBANKNIFTY · March 2024 · Strike 48,000 · Call
RELIANCE24APR2500CEReliance · April 2024 · Strike 2,500 · Call
INFY24DEC1700PEInfosys · December 2024 · Strike 1,700 · Put

Month Codes (MMM) for Monthly Options

MonthCodeMonthCodeMonthCode
JanuaryJANMayMAYSeptemberSEP
FebruaryFEBJuneJUNOctoberOCT
MarchMARJulyJULNovemberNOV
AprilAPRAugustAUGDecemberDEC

🗓️ 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>

⚠️
Oct/Nov/Dec use letters, not numbers: October = O, November = N, December = D. This avoids ambiguity — e.g., 24O03 is Oct 3rd, not "24003" which would be unreadable.
NIFTY
24
1
18
21800
PE
Ticker=NIFTY | Year=24 | Month=1 (Jan) | Date=18 | Strike=21800 | PE  →  NIFTY2411821800PE

Weekly Expiry: Decoding the Date Segment

SegmentValue in NIFTY2411821800PEMeaning
YY24Year 2024
M1January (single digit)
DD1818th of the month
Full expiry2411818-January-2024

Weekly Month Single-Character Codes

MonthCodeMonthCodeMonthCode
January1May5September9
February2June6OctoberO
March3July7NovemberN
April4August8DecemberD

Weekly Option Examples — Multiple Underlyings & Months

SymbolExpiry DateStrikeType
NIFTY2411821800PE18-Jan-2024 (24·1·18)21800Put
BANKNIFTY2411745500CE17-Jan-2024 (24·1·17)45500Call
FINNIFTY2411221600CE12-Jan-2024 (24·1·12)21600Call
NIFTY24O0322000CE03-Oct-2024 (24·O·03)22000Call
NIFTY24N1424500PE14-Nov-2024 (24·N·14)24500Put
NIFTY24D2623000CE26-Dec-2024 (24·D·26)23000Call
BANKNIFTY24O1748000PE17-Oct-2024 (24·O·17)48000Put

🏪 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.

SymbolCompanyNotes
TCSTata Consultancy ServicesSeries auto: EQ
RELIANCEReliance IndustriesSeries auto: EQ
INFYInfosys LtdSeries auto: EQ
HDFCBANKHDFC BankSeries auto: EQ
ZEELZee EntertainmentSeries auto: BE
WIPROWipro LtdSeries auto: EQ
💡
To find the exact NSE scrip name, download the Symbol Master JSON file and look up the tkr field for the instrument you need.

🔧 Interactive Symbol Builder

Use this tool to construct any symbol quickly. Select the type and parameters — the symbol is generated in real time.

Generated Symbol
NIFTY-1
Node.js SDK
Node.js SDK

Installation & Project Setup

ℹ️
Prerequisite: Node.js v16 or higher must be installed. Not installed yet? See the Prerequisites section for step-by-step instructions. Verify: node --version
1

Create your project folder

bash — Terminal / Command Prompt
mkdir my-market-feed
cd my-market-feed
npm init -y

This creates a package.json file that tracks your project's dependencies.

2

Install the pix-apidata library

bash
npm install pix-apidata --save
Verify installation
ls node_modules/pix-apidata
Should list files — confirms the library is installed
3

Create your first file and import the library

javascript — app.js (Node.js / CommonJS)
const apidata = require("pix-apidata");
// All SDK methods are now available via the apidata object
html — Browser integration
<script src="bundle.js"></script>
<!-- apidata is available as a global object after bundling -->
4

Run your script

bash
node app.js
Node.js SDK

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

ParameterTypeRequiredDescriptionExample
apiKeystringRequiredYour API access key from Accelpix"abc123XYZ=="
apiHoststringRequiredData server hostname"apidata.accelpix.in"
schemestringOptionalProtocol: 'https' or 'http'"https"

async/await (recommended)

javascript
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

javascript
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);
  });
⚠️
Important: Never call subscribeAll(), getEod(), or any other method before initialize() resolves. Doing so will result in an error or silent failure.
Node.js SDK

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.

javascript
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}`);
});
json — Sample Response
{
  "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.

javascript
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.

javascript
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`);
});
json — Sample Response
{
  "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.

javascript
// 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.

javascript
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

FieldGreek NameDescription
ivImplied VolatilityMarket's expectation of future volatility
ivvwapIV VWAPVolume-weighted average of IV
twapivIV TWAPTime-weighted average of IV
deltaDelta (Δ)Option price change per ₹1 move in underlying
gammaGamma (Γ)Rate of change of delta
thetaTheta (Θ)Daily time decay (negative for long options)
vegaVega (ν)Price change per 1% change in IV
vannaVannaSensitivity of delta to volatility changes
charmCharmRate of change of delta over time
speedSpeedRate of change of gamma vs underlying price
zommaZommaRate of change of gamma vs volatility
volgaVolgaSecond-order sensitivity of vega to volatility
timestampTimestampNanoseconds since 01-Jan-1980 00:00:00 UTC

🔌 Connection Events

javascript
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
});
Node.js SDK

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

javascript — all subscription 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

javascript
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

MethodData ReceivedUse When
subscribeAll(tickers)Trade + Best + RefsFull market data per symbol
subscribeTrade(tickers)Trade ticks onlyPrice-only feed, lower bandwidth
subscribeBestAndRefs(tickers)Bid/Ask + OHLCOrder book + reference values
subscribeGreeks(tickers)Greeks (IV, Δ, Γ, Θ, ν...)Options analytics
subscribeOptionChain(under, expiry)All strikes for expiryFull options chain
subscribeOptionChainRange(under, expiry, n)N strikes above+below spotATM-focused chain
subscribeGreeksChainRange(under, expiry, n)Greeks for range chainATM Greeks + IV surface
subscribeSegments(snapshot)All entitled symbolsBulk subscription
Node.js SDK

Historical Data

Pull EOD (end-of-day) bars, intraday minute bars, or tick data. All date parameters use YYYYMMDD format.

EOD Historical Bars

javascript
// 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

javascript
// 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

javascript
// 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

FieldEODIntraTickDescription
tdDate (EOD) or datetime (intra/tick) of the bar
opOpen price of the bar
hpHigh price of the bar
lpLow price of the bar
cpClose price of the bar
volVolume traded in the bar or at the tick
oiOpen Interest at end of bar/tick
prLast trade price (tick data only)
Node.js SDK

Complete Working Example

A full end-to-end script — copy this, replace your-api-key-here, and run with node app.js.

javascript — 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));
Python SDK
Python SDK

Installation & Project Setup

ℹ️
Prerequisite: Python 3.10 or higher must be installed. Not installed yet? See the Prerequisites section for step-by-step instructions. Verify: python --version
1

Create project folder and virtual environment

bash — Windows Command Prompt
mkdir accelpix-py
cd accelpix-py
python -m venv venv
venv\Scripts\activate
# Your prompt will now show: (venv)
bash — macOS / Linux Terminal
mkdir accelpix-py
cd accelpix-py
python3 -m venv venv
source venv/bin/activate
# Your prompt will now show: (venv)
2

Install pix-apidata

bash
pip install pix-apidata
Verify installation
pip show pix-apidata
Name: pix-apidata
Version: 1.3.5
...
3

Create your first file and import modules

python — main.py
import asyncio
from pix_apidata import *
# This imports both apidata_lib and apidata_models
4

Run your script

bash
python main.py
Python SDK

Initialization

Always the first call. Create the ApiData object, register callbacks, then call initialize().

Parameters

ParameterTypeRequiredDescription
apiKeystringRequiredYour API access key from Accelpix
apiHoststringRequiredData server: apidata.accelpix.in
⚠️
v1.3.4 breaking change: The scheme parameter was removed. If upgrading from an older version, remove the 3rd argument from initialize().
python
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!")
Python SDK

Callbacks — Receiving Live Data

Register all callbacks before initializing. Use apidata_models to get typed access to message fields.

📈 Trade Data

python
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

python
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

python
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

python
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

python
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

python
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 MethodFires WhenModel Class
api.on_trade_update(fn)Each live trade tickapidata_models.Trade
api.on_tradeSnapshot_update(fn)Once at subscriptionapidata_models.Trade
api.on_best_update(fn)Bid/Ask changeapidata_models.Best
api.on_refs_update(fn)OHLC/OI update during dayapidata_models.Refs
api.on_srefs_update(fn)Once at subscription with OHLCapidata_models.RefsSnapshot
api.on_greeks_update(fn)Greeks updateapidata_models.Greeks
api.on_greekSnapshot_update(fn)Once at subscription with Greeksapidata_models.Greeks
api.on_connection_started(fn)WebSocket connected
api.on_connection_stopped(fn)WebSocket disconnected
Python SDK

Live Stream Subscriptions

python — all subscription methods
# 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

python
await api.unsubscribeAll(['NIFTY-1', 'BANKNIFTY-1'])
await api.unsubscribeOptionChain('NIFTY', '20220609')
await api.unsubscribeGreeks(['NIFTY2220318500CE'])
await api.unsubscribeGreeksChain('NIFTY', '20220609')
Python SDK

Historical Data

All date parameters use YYYYMMDD format. Resolution for intraday: "1", "3", "5", "7", "10" (minutes).

python
# 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

python — typical processing pattern
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())
Python SDK

Complete Working Example

A full end-to-end script. Replace your-api-key-here, save as main.py, run with python main.py.

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()
.NET SDK
.NET SDK

Installation & Project Setup

ℹ️
Prerequisite: The SDK assembly (NetApiClient.dll) targets .NET Standard 2.0, so it works unmodified in .NET Framework 4.6.1+, .NET Core 2.0+, and .NET 5/6/7/8 projects — console apps, WinForms, WPF, ASP.NET, or services. Not installed yet? See the Prerequisites section. Verify: dotnet --version
1

Create your project

bash — Terminal / Command Prompt
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.

2

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:

xml — AccelpixApp.csproj
<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.

3

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:

bash
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
Verify installation
dotnet build
Build succeeded — confirms all references resolve
4

Import the namespaces and run

csharp — Program.cs
using NetApiClient;
using FeedData.Models;
// ApiClient and all model types (Tick, Best, Refs, Sref, Hd, Htd...) are now available
bash
dotnet run
.NET SDK

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

csharp
var client = new ApiClient();
Task<bool> InitializeAsync(string apiKey, string apiHost, string protoScheme = "http", CancellationToken cancellationToken = default);

Parameters

ParameterTypeRequiredDescriptionExample
apiKeystringRequiredYour API access key from Accelpix"abc123XYZ=="
apiHoststringRequiredData server hostname"apidata.accelpix.in"
protoSchemestringOptionalProtocol. Defaults to "http" — pass "https" explicitly for production"https"
cancellationTokenCancellationTokenOptionalStandard .NET cancellation token for the connect operationdefault

Console App Example

csharp — Program.cs
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!");
⚠️
Important: Never call SubscribeAsync(), GetEodAsync(), or any other method before InitializeAsync() resolves to true. Doing so will throw or fail silently.
.NET SDK

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.

csharp
client.TradeUpdate += (Tick t) =>
{
    Console.WriteLine($"[TRADE] {t.Ticker} @ ₹{t.Price}");
    Console.WriteLine($"  Qty: {t.Qty} | Volume: {t.Volume} | OI: {t.Oi}");
};

Tick Fields

FieldTypeDescription
IdintInternal tick sequence id
TickerstringSymbol the tick belongs to
SegmentIdbyte1 = EQ, 2 = F&O
TimeuintSeconds since 1980-01-01 00:00:00 UTC
PricefloatLast trade price (LTP)
QtyuintQuantity traded in this tick
VolumeuintCumulative day volume
OiuintOpen Interest
KindcharAlways 'T'

📊 Best Bid/Ask Best — Kind 'B'

Fires when the best bid or ask price/quantity changes, after SubscribeAsync().

csharp
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

FieldTypeDescription
TickerstringSymbol
SegmentIdbyte1 = EQ, 2 = F&O
BidPrice / BidQtyfloat / uintBest bid price and quantity
AskPrice / AskQtyfloat / uintBest ask price and quantity
TimeuintSeconds since 1980-01-01 00:00:00 UTC
KindcharAlways '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.

csharp
// 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)

FieldTypeDescription
TickerstringSymbol
Open / High / Low / ClosefloatDay OHLC values
AvgfloatVWAP (average price)
OiuintOpen Interest
PoiuintPrevious day OI
UpperBand / LowerBandfloatCircuit bands (EQ segment only)
KindcharAlways 'V' for the full snapshot

Sref Fields (single-field update)

FieldTypeDescription
TickerstringSymbol
PriceobjectThe new value — cast based on Kind
KindcharWhich field changed: O=Open, H=High, L=Low, C=Close, N=OI, A/W=Avg

🔌 Connection Events

csharp
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
};
ℹ️
No Option Greeks in this client: The .NET ApiClient currently covers trade ticks, best bid/ask, OHLC reference data, and option-chain subscriptions over SignalR. Option Greeks (delta, gamma, IV, etc.) are streamed over a separate Socket.IO endpoint — see the Greeks WebSocket tab. To consume that from .NET, use a Socket.IO-compatible client library (e.g. the SocketIOClient NuGet package) following the same event names shown in the Node.js/Python examples there.
.NET SDK

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

csharp — all subscription 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

csharp
await client.UnSubscribeOptionChainAsync("NIFTY", "20240118");

// Cleanly close the SignalR connection when your app shuts down
await client.DisposeAsync();

Subscription Methods Reference

MethodEvents FiredUse When
SubscribeAsync(tickers)RefsSnapshotUpdate, RefsUpdate, BestUpdateFull OHLC + bid/ask feed per symbol
SubscribeTradeAsync(tickers)TradeUpdatePrice-only feed, lower bandwidth
SubscribeOptionChainAsync(under, expiry)RefsSnapshotUpdate / BestUpdate per strikeFull options chain for an expiry
SubscribeOptionChainRangeAsync(under, expiry, n)Same as above, limited to N strikesATM-focused chain, fewer contracts
UnSubscribeOptionChainAsync(under, expiry)Stops chain updatesFree up bandwidth or entitlement
DisposeAsync()Fires Closed, ends the connectionApplication shutdown
.NET SDK

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

csharp
// 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

csharp
// 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

csharp
// 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)

FieldTypeDescription
TkrstringTicker symbol
TdDateTimeDate (EOD) or datetime (intraday) of the bar
Op / Hp / Lp / CpdecimalOpen / High / Low / Close price of the bar
VoluintVolume traded in the bar
OiintOpen Interest at end of bar
EodboolTrue for an end-of-day bar

Response Fields — Htd (Back Ticks)

FieldTypeDescription
TkrstringTicker symbol
TmintTrade time — unix epoch
PrdecimalLast trade price at this tick
QtintQuantity traded at this tick
OiintOpen Interest at this tick

Processing Historical Data

csharp — typical processing pattern
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}");
}
.NET SDK

Complete Working Example

A full console app. Replace your-api-key-here, save as Program.cs, and run with dotnet run.

csharp — Program.cs
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();
    }
}
REST API Reference
REST API

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

Base URL — all endpoints prepend this
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.

URL pattern
{base_url}/{endpoint}?api_token=YOUR_URL_ENCODED_KEY

How to URL-encode your key

LanguageCode
Pythonurllib.parse.quote("your+key==", safe="")
C# / .NETUri.EscapeDataString("your+key==")
JavaScriptencodeURIComponent("your+key==")
JavaURLEncoder.encode("your+key==", "UTF-8")
PostmanPaste key into the variable field — Postman auto-encodes
⚠️
If your API key contains + or = characters (base64-style keys do), you MUST URL-encode them before appending to the URL. An unencoded + is treated as a space by web servers.
REST API

Endpoint 1 — EOD Historical Data

Returns daily OHLCV + OI bars for any symbol and date range.

GET/{ticker}/{startDate}/{endDate}?api_token={key}
ParameterFormatExampleNotes
{ticker}stringNIFTY-1 or NIFTY%2050URL-encode spaces in index names
{startDate}YYYYMMDD20240101First date to fetch
{endDate}YYYYMMDD20240115Last date to fetch (inclusive)

Example Requests

http
# 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

json — Response Array
[
  {
    "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
  },
  ...
]
REST API

Endpoint 2 — Intra-EOD (Minute Bars)

Returns intraday OHLCV + OI bars at the specified minute resolution.

GET/{ticker}/{startDate}/{endDate}/{resolution}?api_token={key}
ParameterOptionsNotes
{resolution}1, 3, 5, 7, 10Minutes per bar. "5" = 5-minute bars
{startDate}YYYYMMDDUse today's date for live session data

Example Requests

http
# 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
💡
Live bar aggregation: Pass today's date as both startDate and endDate (same date) with resolution "1" to get live 1-minute bars for the current trading session — including the still-forming bar.
REST API

Endpoint 3 — Live Intra OHLC (with Timestamp Range)

Returns intraday bars within a specific datetime range — both start and end include the time component.

GET/{ticker}/{startDT}/{endDT}/{resolution}?api_token={key}

DateTime format: YYYYMMDD HH:mm:ss — spaces must be URL-encoded as %20

Example Requests

http
# 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
ℹ️
All spaces in datetime values must be encoded: 20240112 15:00:00 becomes 20240112%2015:00:00 in the URL.
REST API

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.

POST/quote?api_token={key}

Request body: JSON array of ticker strings. Returns one object per ticker.

json — Request Body
["NIFTY-1", "BANKNIFTY-1", "TCS", "RELIANCE", "INFY"]

Response Fields

FieldFull NameFieldFull Name
tkrTicker symbolprLast trade price (LTP)
sidSegment (1=EQ, 2=F&O)volCumulative day volume
tmLast trade time (unix epoch)oiOpen Interest
opDay open pricepoiPrevious day OI
hpDay high priceavgVWAP (average price)
lpDay low pricechgPrice change vs prev close
cpPrevious close pricechgpcChange percentage
bp / bqBest bid price / qtyupcUpper circuit price
ap / aqBest ask price / qtylrcLower circuit price
valTotal traded valuebandCircuit band (EQ only)

Sample Response

json
[
  {
    "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
  }
]
REST API

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/master?api_token={key}
http
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:

http — dedicated master endpoints (recommended)
# 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
REST API

Code Samples

🐍 Python

python — rest_client.py
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)

csharp — AccelpixClient.cs
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}%");
    }
}
REST API

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.

1

Download & Install Postman

Go to postman.com/downloads and install the free desktop app for your OS.

⬇ Download Postman
2

Create a Collection

Open Postman → Click Collections in the left sidebar → Click + → Name it "Accelpix API"

3

Set a Collection Variable for your API Key

Click your collection → Variables tab → Add:

VariableInitial Value
api_tokenyour_api_key_here
base_urlhttp://apidata.accelpix.in/api/fda/rest

Now use {{api_token}} and {{base_url}} in all your requests.

4

Add an EOD Request

Click + Add Request on your collection:

FieldValue
MethodGET
URL{{base_url}}/NIFTY-1/20240110/20240118?api_token={{api_token}}
NameEOD Data - NIFTY

Click Send — you should see a JSON array of EOD bars in the response.

5

Add a Quotes Request (POST)

FieldValue
MethodPOST
URL{{base_url}}/quote?api_token={{api_token}}
Bodyraw → JSON
json — Postman Body
["NIFTY-1", "BANKNIFTY-1", "TCS", "RELIANCE", "INFY"]

Click Send — you'll get real-time quote snapshots for all listed symbols.

6

Import the Pre-Built Collection

In Postman: File → Import → paste this JSON directly to get all endpoints ready:

json — Postman Collection (copy and import)
{
  "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}}" }
    }
  ]
}
Greeks WebSocket API
Greeks WebSocket API

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

WebSocket Endpoint
https://greeks.accelpix.in?apiKey={YOUR_API_KEY}
ℹ️
Socket.IO recommended: While Socket.IO is the best-supported client, any compatible WebSocket client library can connect to this endpoint.
⚠️
One connection per API key: Only a single active WebSocket connection is permitted per API key at any time. Opening a second connection with the same key will not run in parallel with the first.

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.

ParameterLocationRequiredNotes
apiKeyQuery stringYesYour 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

javascript
socket.emit("subscribe", {
  symbols: ["NIFTY25MAY24550PE"]
});

Unsubscribe from Symbols

javascript
socket.emit("unsubscribe", {
  symbols: ["NIFTY25MAY24550PE"]
});
💡
You can subscribe to multiple symbols in a single emit call by adding more entries to the symbols array. Subscription limits depend on your plan — see Plan Limits below.

Event Channels

Once subscribed, the server pushes data on the following named events. Register a listener for each event type your application needs.

EventDescription
tradeReal-time tick data on every executed trade
trade_latestLatest available trade snapshot for subscribed symbols
greeksReal-time Greeks updates as they recalculate
greeks_latestLatest available Greeks snapshot for subscribed symbols
bidaskReal-time best Bid/Ask updates
bidask_latestLatest available Bid/Ask snapshot
errorsSubscription or authentication errors

Trade Event Payload

json — "trade"
{
  "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

json — "greeks"
{
  "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

FieldMeaning
ivImplied volatility
deltaRate of change of option price vs. underlying price
gammaRate of change of delta vs. underlying price
thetaTime decay — daily option value loss
vegaSensitivity to a 1% change in implied volatility
rhoSensitivity to a 1% change in interest rates
vannaSensitivity of delta to a change in volatility
charmRate of change of delta over time
speedRate of change of gamma vs. underlying price
zommaRate of change of gamma vs. volatility
colorRate of change of gamma over time
volgaRate of change of vega vs. volatility
tvTheoretical value of the option
tgr / dtrInternal risk indicators (total gamma risk / delta-theta ratio)

Error Event Payload

json — "errors"
{
  "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.

POST/api/live/latest-greeks

Returns the most recently computed Greeks for each requested symbol, without waiting for a live push.

Headers

headers
{
  "x-api-key": "YOUR_API_KEY"
}

Request Body

json
{
  "symbols": ["NIFTY25MAY24800CE", "BANKNIFTY25MAY46000PE", "NIFTY25MAY25000CE"]
}

Response

json — Response Array
[{
  "ticker": "NIFTY25MAY24800CE",
  "iv": 0.1746,
  "delta": 0.4714,
  "gamma": 0.00047,
  "theta": -4369.10,
  "vega": 19.19,
  "rho": 4.33,
  "tv": 300,
  "timestamp": 1747285593971
}]
POST/api/live/latest-trades

Returns the most recent trade tick for each requested symbol instantly.

Headers

headers
{
  "x-api-key": "YOUR_API_KEY"
}

Request Body

json
{
  "symbols": ["NIFTY25MAY24700CE", "BANKNIFTY25MAY46000PE", "NIFTY25MAY25000CE"]
}

Response

json — Response Array
[{
  "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

PlanMax Symbols per Connection
Basic5 symbols
Pro25 symbols
EnterpriseCustom — 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)

📦
1. Install dependency
Inside your project folder
terminal
npm install socket.io-client
▶️
2. Run the script
After adding your API key
terminal
node accelpix-greeks-test.js
javascript — accelpix-greeks-test.js
// 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)

terminal
pip install "python-socketio[client]"
python — greeks_socket_io.py
#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()
💡
Both examples connect, subscribe to one symbol, and print every event to the console — a good starting point before wiring the data into your own application or risk engine.

Support

💬

Live Chat

Chat with us now

📧

Email Support

[email protected]

📚

Integration Help

Symbol master references and integration assistance available on request.

News API
News API

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).

URL Pattern
?apikey={YOUR_API_KEY}

1. Get Latest News

Returns the latest published news articles, sorted newest first.

GEThttps://market.accelpix.in/news/latest?apikey={API_KEY}

No additional parameters required beyond the API key.

Response Fields

FieldDescription
newsIdUnique identifier for the article
titleHeadline
shortDescriptionBrief summary / excerpt
fullDescriptionFull article body (may be null on list endpoints)
imageCover image URL
datePublish timestamp (ISO 8601, UTC)
publisherSource publication name
publisherUrlSource publication domain
categoryArticle category

Example Response

json — Response Array
[{
  "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.

GEThttps://market.accelpix.in/news/all?categories=[categories]&publisher=[publisher]&apikey={API_KEY}&page=1

All filters are optional — omit a parameter to leave that dimension unfiltered.

Query Parameters

ParameterRequiredDescription
categoriesOptionalComma-separated category names, e.g. Market,Business
publisherOptionalComma-separated publisher names, e.g. LiveMint,CNBCTV18
pageOptionalPage number for pagination — default 1
ℹ️
Maximum 10 articles per page. Results are sorted newest first regardless of filters applied.

Example Response

json — Response Array
[{
  "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.

GEThttps://market.accelpix.in/news/detail/{newsId}?apikey={API_KEY}

Path Parameter

ParameterDescription
newsIdID of the news article, e.g. NEWS33696

Example Response

json — Single Article
{
  "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"
}
⚠️
fullDescription may be null: Some publishers only supply a short summary; when the full body isn't available, fall back to shortDescription and link out via orgLink.

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
ℹ️
More publishers may be added over time — contact support for the current full list.

Rate Limits & Error Codes

Rate Limits

WindowLimit
Per Minute10 requests
Per Day1,000 requests
⚠️
Exceeding either limit returns HTTP 429 or 403 — back off and retry rather than hammering the endpoint.

Error Codes

CodeMeaning
400Bad Request — invalid request format
401Unauthorized — invalid or missing API key
403Forbidden — daily quota exceeded
429Too Many Requests — rate limit exceeded
500Internal Server Error
503Service Unavailable