Developer API Documentation
REST API for Indian stock market intelligence. AI-powered DVM scores, convergence signals, market regime analysis, composite ML forecasts, institutional flow, options intelligence, and 330+ endpoints across v1/v2/v3.
Authentication
All API requests (except /api/health and /api/v3/openapi-spec) require an API key sent via the X-API-Key header.
curl -H "X-API-Key: dalalai_YOUR_KEY_HERE" \
https://dalalai.com/api/v1/stocks
Getting a Key
- Paid: Subscribe to the Developer plan (₹1,999/mo or ₹19,999/yr), then generate keys in the API Dashboard.
- Trial: Any registered user can generate a trial key (25 calls, 3 days) — no payment required.
You can have up to 3 active keys per account. Keys are SHA-256 hashed on our end — the raw key is shown only once at creation.
Free Trial No Card Required
Try the API before subscribing. Every registered user gets 25 API calls over 3 days with a trial key.
To generate a trial key, go to the API Dashboard and click “Try Free”. The trial key works on all endpoints with the same response format.
After 25 calls or 3 days, the key expires. Subscribe to the Developer plan for unlimited access.
Base URL & Versioning
https://dalalai.com/api/v1/
Current version: v1. The X-API-Version: 1 header is included in all responses. When v2 launches, v1 will remain supported for at least 6 months.
Response Format
All responses use a consistent JSON envelope:
{
"data": { ... }, // The actual payload (null on error)
"meta": {
"timestamp": "2026-03-14T08:30:00Z",
"version": 1,
"endpoint": "/api/v1/stocks",
"dataTimestamp": "2026-03-14 07:32:40",
"cached": true,
"pagination": { "page": 1, "limit": 50, "total": 799, "pages": 16 }
},
"error": null // null on success
}
On error:
{
"data": null,
"meta": { ... },
"error": {
"code": 1004,
"message": "Rate limit exceeded",
"suggestion": "Wait and retry after the Retry-After period.",
"docs": "https://dalalai.com/docs/api"
}
}
Query Parameters
These query parameters work on all data endpoints. On /api/v1/stocks, they apply to the stocks array.
Field Selection — ?fields=
Return only specified fields, reducing payload size significantly.
curl -H "X-API-Key: YOUR_KEY" \
"https://dalalai.com/api/v1/stocks?fields=Symbol,CMP,DVM_Score"
# Response: only Symbol, CMP, DVM_Score per stock (other fields omitted)
Sorting — ?sort=
Sort results server-side. Prefix with - for descending order.
# Top stocks by DVM_Score (descending)
curl -H "X-API-Key: YOUR_KEY" \
"https://dalalai.com/api/v1/stocks?sort=-DVM_Score&limit=10"
# Alphabetical by symbol (ascending)
curl ... "https://dalalai.com/api/v1/stocks?sort=Symbol"
Filtering — ?filter=
Filter records using comparison operators. Comma-separate multiple clauses (AND logic). Max 10 clauses.
| Operator | Example | Meaning |
> | ?filter=DVM_Score>80 | Greater than 80 |
< | ?filter=CMP<500 | Less than 500 |
>= | ?filter=DVM_Score>=90 | Greater or equal |
= | ?filter=AI_Rating=Strong Buy | Exact match |
!= | ?filter=Sector!=IT | Not equal |
# High-conviction stocks above ₹100
curl -H "X-API-Key: YOUR_KEY" \
"https://dalalai.com/api/v1/stocks?filter=DVM_Score>80,CMP>100&sort=-DVM_Score&fields=Symbol,CMP,DVM_Score"
Batch Requests
Fetch up to 5 endpoints in a single API call. Saves latency and rate limit quota.
curl -H "X-API-Key: YOUR_KEY" \
"https://dalalai.com/api/v1/batch?endpoints=stocks,regime,breadth"
# Response:
{
"data": {
"stocks": { ... }, // full stocks response
"regime": { ... }, // full regime response
"breadth": { ... } // full breadth response
},
"meta": { "endpoints": ["stocks", "regime", "breadth"], ... }
}
Files are deduplicated internally — if two endpoints share the same data file, it's fetched only once.
ETag & Conditional Requests
Every response includes an ETag header. On subsequent requests, send If-None-Match to get a 304 Not Modified (empty body) if data hasn't changed. Ideal for polling.
# First request — save the ETag
curl -v -H "X-API-Key: YOUR_KEY" https://dalalai.com/api/v1/regime
# Response header: ETag: "a1b2c3d4e5f6..."
# Subsequent request — include If-None-Match
curl -H "X-API-Key: YOUR_KEY" \
-H 'If-None-Match: "a1b2c3d4e5f6..."' \
https://dalalai.com/api/v1/regime
# → 304 Not Modified (0 bytes, no bandwidth cost)
Embed live market data badges in your blog, dashboard, or social profile. Returns an SVG image. No API key needed.
# SVG badge (default)
https://dalalai.com/api/v1/widget?type=regime&format=svg
# JSON (for custom rendering)
https://dalalai.com/api/v1/widget?type=regime&format=json
Embed in HTML:
<img src="https://dalalai.com/api/v1/widget?type=regime" alt="DalalAI Market Regime" />
Available types: regime (market regime), stocks (stocks scored count), or any endpoint name.
Error Codes
| Code | HTTP | Message | Suggestion |
1001 | 401 | Missing or invalid API key | Include X-API-Key header |
1002 | 401 | Invalid or revoked API key | Check key or generate new one |
1003 | 401 | API subscription expired | Renew Developer plan |
1004 | 429 | Rate limit exceeded | Wait for Retry-After period |
1005 | 405 | Method not allowed | Use HTTP GET |
1006 | 403 | Trial quota exhausted | Subscribe for unlimited |
1007 | 429 | Daily quota exhausted | Upgrade plan or wait until midnight UTC |
2001 | 200 | Unknown resource | Call /api/v1 for endpoint list |
2002 | 404 | Stock not found | Use NSE symbol |
5001 | 502 | Data source unavailable | Retry in a few minutes |
5002 | 500 | Internal error | Report with X-Request-Id |
5003 | 503 | API temporarily disabled | Check status page |
Rate Limits
Rate limits are tier-based:
| Tier | Req/min | Req/day | API Keys |
| Free | 5 | 10 | 1 |
| Starter (₹1,999/mo) | 100 | 5,000 | 3 |
| Pro (₹9,999/mo) | 500 | 50,000 | 10 |
| Enterprise (₹24,999/mo) | 1,000 | 1,00,000 | 20 |
| Trial | 5 | 25 total lifetime | 1 |
Every response includes rate limit headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 27
X-RateLimit-Reset: 1710403260
X-Request-Id: a1b2c3d4-e5f6-...
X-Data-Age-Hours: 3.2
When rate limited (HTTP 429), the Retry-After header indicates seconds to wait.
The X-Data-Age-Hours header shows how old the underlying data is. The meta.warnings array will contain a staleness warning if data is older than 26 hours.
Python SDK Guide
No library to install — just requests. Here's a production-ready wrapper:
import requests
from typing import Optional
class DalalAI:
BASE = "https://dalalai.com/api/v1"
def __init__(self, api_key: str):
self.session = requests.Session()
self.session.headers["X-API-Key"] = api_key
self._etags = {}
def _get(self, endpoint: str, params: Optional[dict] = None):
url = f"{self.BASE}/{endpoint}"
headers = {}
if url in self._etags:
headers["If-None-Match"] = self._etags[url]
r = self.session.get(url, params=params, headers=headers, timeout=15)
if r.status_code == 304:
return None # data unchanged
r.raise_for_status()
if "ETag" in r.headers:
self._etags[url] = r.headers["ETag"]
return r.json()["data"]
def stocks(self, sort=None, filter=None, fields=None, page=1, limit=50):
p = {"page": page, "limit": limit}
if sort: p["sort"] = sort
if filter: p["filter"] = filter
if fields: p["fields"] = fields
return self._get("stocks", p)
def regime(self):
return self._get("regime")
def batch(self, endpoints: list):
return self._get("batch", {"endpoints": ",".join(endpoints)})
def widget(self, type="regime", format="json"):
return self._get("widget", {"type": type, "format": format})
# Usage:
api = DalalAI("dalalai_YOUR_KEY_HERE")
top = api.stocks(sort="-DVM_Score", filter="DVM_Score>80", fields="Symbol,CMP,DVM_Score", limit=10)
regime = api.regime()
multi = api.batch(["stocks", "regime", "breadth"])
🧪 Interactive API Playground
Try any endpoint live. Enter your API key (or use the trial endpoint) and hit Send.
Endpoints
GET /api/v1/stocks
AI-powered DVM scores, ratings, and signals for 800+ Indian stocks. Supports filtering, sorting, field selection, and pagination.
| ?symbol=RELIANCE | Filter by NSE symbol (returns single stock object) |
| ?sort=-DVM_Score | Sort by any field. Prefix - for descending. |
| ?filter=DVM_Score>80 | Filter with operators: > < >= <= = != |
| ?fields=Symbol,CMP | Return only specified fields (reduce payload) |
| ?page=1&limit=50 | Pagination. Default: page 1, limit 50. Max limit: 100. |
// Response shape (paginated):
{
"data": {
"stocks": [{ "Symbol": "MAHABANK", "DVM_Score": 87.4, "AI_Rating": "Strong Buy", ... }],
"total": 799, "page": 1, "limit": 50,
"regime": { "state": "RANGING", ... }
},
"meta": { "pagination": { "page": 1, "limit": 50, "total": 799, "pages": 16 }, ... }
}
// Response shape (single stock):
{
"data": { "stock": { "Symbol": "RELIANCE", "DVM_Score": 44.7, ... } }
}
GET /api/v1/regime
Current market regime status (BULL, BEAR, RANGING) with summary metrics.
{
"data": {
"regime": { "state": "RANGING", "confidence": 0.72, ... },
"summary": { "stocks_scored": 799, "avg_convergence": 53.8, ... },
"timestamp": "2026-03-14 07:32:40"
}
}
GET /api/v1/convergence
Multi-signal convergence scores for all stocks. Scores range 0-100; higher = more signals aligned.
{
"data": {
"top_20": [{ "symbol": "MAHABANK", "convergence_score": 87.4, "signal_strength": "very_high_convergence", ... }],
"summary": { "stocks_scored": 799, "very_high_count": 19, "avg_convergence": 53.8 },
"regime": "RANGING"
}
}
GET /api/v1/signals
Signal accuracy and backtesting metrics across all signal types.
GET /api/v1/breadth
Advanced market breadth indicators — advance/decline, new highs/lows, moving average internals.
GET /api/v1/fii-dii
FII and DII flow patterns — daily cash/derivatives, cumulative trends, sentiment patterns.
GET /api/v1/scoreboard
AI prediction scoreboard — accuracy history, hit rate, prediction vs actual tracking.
GET /api/v1/options
Options chain data — open interest, PCR, max pain, strike-wise analysis.
GET /api/v1/morning-brief
Daily digest / morning brief — market summary, key events, sector outlook.
GET /api/v1/crash-opportunity
Crash opportunity picks — oversold quality stocks identified as buying opportunities.
GET /api/v1/breakout
Breakout scanner results — stocks breaking key technical levels with volume confirmation.
GET /api/v1/smart-money
Smart money signals — institutional buying/selling patterns, bulk/block deal analysis.
GET /api/v1/correlation
Correlation engine — cross-stock and cross-sector correlation matrices.
GET /api/v1/momentum
Momentum scanner — RSI, MACD, and multi-timeframe momentum rankings.
GET /api/v1/sector-rotation
Sector rotation (RRG chart data) — relative strength and momentum by sector.
GET /api/v1/backtest
Backtest report — strategy performance, drawdowns, and risk metrics.
GET /api/v1/alerts
Alerts engine data — triggered price/signal/volume alerts.
GET /api/v1/delivery
Delivery volume analytics — delivery % trends, unusual delivery spikes.
GET /api/v1/earnings
Earnings calendar — upcoming and past quarterly results with surprise analysis.
GET /api/v1/credit-ratings
Credit rating changes — upgrades, downgrades, and watch listings by CRISIL, ICRA, etc.
GET /api/v1/analyst-targets
Analyst consensus price targets, recommendations, and upside potential.
GET /api/v1/buybacks
Buyback signals — announced and ongoing share buyback programs.
GET /api/v1/mf-holdings
Mutual fund holdings tracker — institutional ownership changes month-over-month.
Wave 9 — Advanced Analytics (20 endpoints)
Quantitative analytics, microstructure, multi-factor scoring, and institutional-grade tooling. Auto-registered data endpoints.
GET /api/tax-harvest
Tax-loss harvesting candidates — unrealised losses, estimated STCG savings, wash-sale status.
GET /api/liquidity-scores
Liquidity scorer — impact cost, bid-ask spread proxy, tier classification (ultra-liquid to illiquid).
GET /api/fii-dii-heatmap
Sector-wise FII/DII institutional flow heatmap with rotation signals.
GET /api/options-greeks
Options Greeks — Black-Scholes delta, gamma, theta, vega for ATM strikes.
GET /api/drawdown-analysis
Drawdown analyzer — max drawdown, 52w-high distance, severity classification.
GET /api/sector-momentum
Sector momentum Z-scores, rotation rank, zone classification (leading/lagging).
GET /api/overnight-risk
Overnight gap risk — gap %, holding risk score, risk level.
GET /api/dividend-yield
Dividend yield analytics — trailing yield, payout ratio, category classification.
GET /api/intraday-levels
Intraday levels — Classic Pivots, CPR, Camarilla, day-type prediction.
GET /api/pair-trades
Pair trade scanner — cointegrated pairs, spread Z-scores, entry/exit signals.
GET /api/volatility-surface
Volatility surface — IV rank, IV-HV premium, vol regime, strategy hint.
GET /api/fund-flows
Fund flow tracker — MF/ETF inflows, SIP trends, thematic flow patterns.
GET /api/support-resistance
Support/resistance engine — auto-detected S/R zones, proximity alerts.
GET /api/earnings-whisper
Earnings whisper — pre-earnings sentiment, whisper numbers, surprise probability.
GET /api/theme-baskets
Thematic stock baskets — EV, Defence, AI, Infra, Pharma, Banking, and more.
GET /api/risk-parity
Risk parity allocator — inverse-volatility weighted allocation.
GET /api/mtf-signals
Multi-timeframe signals — daily/weekly/monthly alignment, confluence score.
GET /api/market-microstructure
Market microstructure — order flow imbalance, HFT activity score, market quality.
GET /api/governance-scores
Corporate governance score — board quality, pledge risk, institutional confidence (A+ to D).
GET /api/quant-factors
Quant factor library — value, momentum, quality, size, low-vol Z-scores with composite ranking.
v2 — Composite & Developer APIs
Higher-level endpoints that compose multiple ML models and analytics into unified, actionable responses. All v2 endpoints require authentication.
Composite Data APIs
GET /api/v2/stock-forecast/{symbol}
Unified 3/5/10-day price forecast with confidence bands. Composes: LSTM/TCN/Transformer forecasts + Conformal prediction intervals + AI Ensemble signals.
{
"symbol": "RELIANCE",
"lstm_forecast": { "direction": "UP", "magnitude": 2.3, ... },
"conformal_intervals": { "5d": { "lower": 2780, "upper": 2950 }, ... },
"ai_signal": { "ensemble_action": "BUY", "ensemble_confidence": 0.82, "models": { ... } },
"cmp": 2856.45
}
GET /api/v2/stock-dna/{symbol}
Complete stock DNA — cluster assignment, SHAP feature drivers, causal analysis, and GNN peer graph influence.
GET /api/v2/ai-consensus/{symbol}
Per-model vote breakdown (RF, XGB, MLP, SVM, LSTM, GNN) with weighted consensus, agreement %, and disagreement score.
{
"symbol": "MAHABANK",
"votes": { "RandomForest": { "action": "BUY", "probability": 0.87 }, ... },
"consensus": { "action": "BUY", "agreement_pct": 83.3, "buy_votes": 5, "sell_votes": 1, "hold_votes": 0 },
"lstm": { ... }, "gnn_peer_boost": { ... }
}
GET /api/v2/risk-score/{symbol}
Single 0-100 risk score combining ATR volatility (50%), conformal band width (30%), and model drift (20%). Labels: Low / Medium / High / Very High.
GET /api/v2/trade-plan/{symbol}
Actionable trade plan: entry/exit zones, conformal bands, AI signal + confidence, historical hit rate from backtest, and signal accuracy.
GET /api/v2/smart-screener
Multi-factor AI screener. Filter by signal (BUY/SELL/HOLD), minimum convergence score, minimum AI confidence, and news sentiment.
| ?signal=BUY | Filter by ensemble signal |
| ?min_convergence=70 | Minimum convergence score (0-100) |
| ?min_confidence=80 | Minimum AI confidence % |
| ?sentiment=positive | Filter by news sentiment |
| ?limit=20 | Max results (1-100, default 20) |
GET /api/v2/market-pulse
Real-time market health score (0-100) combining regime (30%), breadth (25%), FII/DII flow (20%), sentiment (15%), and cross-asset signals (10%). Labels: Bearish → Strong Bullish.
GET /api/v2/portfolio-xray
Full portfolio diagnostic — Black-Litterman allocation, VaR analysis, cluster diversity, RL-optimized allocation, health score, and resonance.
GET /api/v2/earnings-edge/{symbol}
Pre-earnings play data: earnings surprise history, event study, news sentiment, seasonality pattern, and upcoming earnings date.
GET /api/v2/momentum-radar
Stocks transitioning between momentum clusters, with regime context. Identifies momentum regime shifts early.
| ?limit=20 | Max results (1-100, default 20) |
Developer APIs
GET /api/v2/features/{symbol}
Raw 70 numeric feature vectors (RSI, MACD, ADX, Bollinger, volume ratios, sentiment, macro, calendar, fundamental, quant factors, governance, microstructure). Ideal for building custom ML models on top of DalalAI's feature pipeline.
{
"symbol": "RELIANCE",
"feature_count": 70,
"features": { "RSI": 58.3, "MACD": 12.7, "ADX": 34.2, "ATR_pct": 1.8, ... },
"metadata": { "Symbol": "RELIANCE", "Sector": "Energy" }
}
GET /api/v2/predictions/batch
Batch AI predictions for up to 50 symbols in a single call. Returns ensemble signal, confidence, per-model vote, and LSTM direction for each.
| ?symbols=RELIANCE,TCS,INFY | Comma-separated symbols (max 50, required) |
GET /api/v2/model-health
Full MLOps dashboard: drift monitor, calibration status, champion-challenger comparison, experiment tracking, model registry, leakage audit, latency report, and retrain state.
GET /api/v2/factor-returns
Pure factor returns with factor-neutral alpha decomposition and risk-adjusted rankings.
GET /api/v2/correlation-graph
GNN peer influence graph + top-N correlated stocks for a focal symbol. Query-based graph exploration.
| ?symbol=RELIANCE | Focal stock (optional — omit for full graph overview) |
| ?top_n=10 | Top-N correlated peers (1-50, default 10) |
GET /api/v2/regime-playbook
Optimal strategy for the current market regime — backtest-proven weight profiles, calibrated weights, RL policy, and weight backtest history.
GET /api/v2/explainability/{symbol}
Full model explainability: SHAP feature importance, Granger causality analysis, and LLM-generated narrative explaining why each model scored this stock this way.
v3 — Premium Institutional APIs
High-value endpoints targeting FIIs, HNIs, institutional investors, and retail brokers. Each composes multiple data assets into institutional-grade intelligence. Pro Enterprise
Institutional Flow & Positioning
GET /api/v3/institutional-flow Enterprise
Unified institutional money flow dashboard — FII/DII daily flows + participant-wise OI + FPI stock-level holdings + smart money composite. Includes FII long/short ratio and net institutional bias.
{
"institutional_bias": "Bullish",
"fii_dii": { "fii_net_cr": 1247.3, "dii_net_cr": 832.1, "combined_net_cr": 2079.4 },
"fii_long_short_ratio": 1.42,
"participant_oi": { ... }, "fpi_stock_holdings": { ... }, "smart_money": { ... }
}
GET /api/v3/fii-sector-rotation Enterprise
FII sector-level rotation tracker — which sectors FIIs are accumulating/distributing, overlaid with RRG quadrant positioning and sector playbook. Includes sector-wise FPI holding aggregation.
GET /api/v3/block-deal-intel Enterprise
Block/bulk deal intelligence enriched with delivery volume spikes, smart money signals, and insider patterns. Identifies institutional accumulation footprints.
| ?limit=50 | Max deals to return (1-200, default 50) |
GET /api/v3/smart-money-tracker Enterprise
Smart money composite tracker — ranked stocks by institutional footprint (delivery spikes + block deals + FPI holding changes). Follow the big money.
| ?limit=30 | Top N stocks (1-100, default 30) |
Options & Derivatives Intelligence
GET /api/v3/options-flow/{symbol} Enterprise
Options flow intelligence — unusual activity detection, OI heatmap, put-call ratio, futures OI, India VIX context, max pain, and historical options time series for a single stock/index.
{
"symbol": "NIFTY",
"unusual_activity": { ... },
"oi_heatmap": { ... },
"put_call_ratio": 0.87,
"vix": { "level": 14.2, "label": "Normal" },
"options_chain_summary": { "max_pain": 22500, "total_ce_oi": 1234567, "total_pe_oi": 987654 }
}
GET /api/v3/options-strategy/{symbol} Enterprise
Options strategy recommendations with chain data, OI distribution, and VIX context. Pre-built strategies (straddle, strangle, spread) based on current volatility regime.
Insider, Regulatory & Compliance
GET /api/v3/insider-radar/{symbol} Enterprise
360° insider activity radar — insider transactions, promoter holding changes, promoter pledge status, SEBI takeover filings, and shareholding pattern. Includes automated risk flags (high pledge, insider selling clusters, SAST alerts).
{
"symbol": "RELIANCE",
"risk_flags": ["High promoter pledge: 22.5%", "2 SEBI takeover filing(s)"],
"insider_transactions": [ ... ],
"promoter_holding": { ... }, "promoter_pledge": { ... },
"shareholding_pattern": { ... }, "sebi_takeover_filings": [ ... ]
}
GET /api/v3/regulatory-radar Enterprise
Unified compliance feed — SEBI takeover filings, BSE corporate announcements, corporate actions calendar, and regulatory intelligence. Material event tracker for compliance teams.
| ?limit=50 | Max items per category (1-200, default 50) |
GET /api/v3/esg-compliance/{symbol} Enterprise
ESG compliance profile for institutional mandates — ESG scores, shareholding breakdown, promoter pledge risk, credit ratings, and compliance flags. Required by many FII mandates.
Index, Macro & Risk
GET /api/v3/index-rebalance Pro
Index rebalancing predictions (Nifty 50/Next 50/Midcap additions/deletions) with probability scores, passive fund flow frontrunning signals, and MF portfolio changes.
GET /api/v3/macro-dashboard Pro
India macro intelligence dashboard — RBI data, yield curve, G-Sec yields, macro time series, global cues, India VIX, and cross-asset regime classification. One-stop macro view for FIIs and fixed-income desks.
GET /api/v3/stress-test Pro
Portfolio stress-testing with scenario analysis — rate hike, 10% crash, FII exit, VIX spike, global selloff. Combines portfolio risk, VIX, cross-asset regime, conformal bands, and macro context.
| ?scenario=rate_hike | Scenario: rate_hike, crash_10pct, fii_exit, vix_spike, global_selloff |
IPO & Primary Markets
GET /api/v3/ipo-intel Enterprise
IPO & primary market intelligence — upcoming pipeline with filing status, active/recent IPO tracker with GMP, and concall sentiment from newly listed companies. Essential for HNI IPO allocation and broker distribution.
v3 — B2B Analytics & ML Empowerment
21 new endpoints that unlock webhooks, streaming, custom factor building, historical snapshots, execution quality, and explainable AI for institutional B2B clients. Pro Enterprise
Webhooks & Real-Time Push
GET /api/v3/webhooks/events Pro
List all supported webhook event types (regime_change, breakout_signal, convergence_spike, earnings_surprise, insider_trade, fii_flow_reversal, portfolio_alert, price_target_hit, vix_spike, block_deal).
GET /api/v3/webhooks Pro
List all active webhook subscriptions for your account with delivery stats.
POST /api/v3/webhooks Pro
Register a new HTTPS webhook endpoint. Provide target URL, event types, and optional signing secret. Payloads signed with HMAC-SHA256.
DELETE /api/v3/webhooks/{webhook_id} Pro
Remove a webhook subscription by ID.
GET /api/v3/webhooks/deliveries Pro
View recent webhook delivery attempts with latency, status codes, and failure details.
GET /api/v3/sse/signals Pro
Server-Sent Events (SSE) stream for real-time signals. Connect with EventSource and receive push updates during market hours. Filter by event type via ?events=regime_change,breakout_signal.
Custom Factor Builder
GET /api/v3/factor-builder Pro
List 30+ available factor components (Momentum, Quality, Value, FII Flow, etc.), operators, and preset strategies with backtest results.
POST /api/v3/factor-builder/backtest Pro
Backtest a custom factor formula. Submit any combination like (Momentum_Score * 0.6) + (Quality_Score * 0.4) and get CAGR, Sharpe, max drawdown, and top-ranked stocks.
Time-Series Historical Snapshots
GET /api/v3/timeseries/catalog Pro
List all endpoints with historical snapshot availability, date ranges, and retention policy (up to 365 days).
GET /api/v3/timeseries/{endpoint} Pro
Retrieve a historical snapshot for any tracked endpoint. See what the API returned on any past date. Supports symbol filtering: ?date=2026-03-20&symbol=RELIANCE.
Portfolio Attribution & Risk
GET /api/v3/attribution Pro
Enriched Brinson-Fachler sector/stock attribution + factor attribution (momentum, value, quality, size, volatility) + risk decomposition + portfolio resonance.
GET /api/v3/multi-asset-risk Enterprise
Cross-asset risk dashboard spanning equities, fixed income (G-Sec yield curve, bond analytics), and commodities. Includes VIX, stress scenarios, and cross-asset correlation matrix.
GET /api/v3/stress-scenarios Pro
10 pre-built stress scenarios (rate hikes, market crashes, FII exits, VIX spikes, crude shocks, rupee depreciation, SEBI regulatory actions, geopolitical events) with sector-level impacts and historical precedents.
Execution Quality (TCA)
GET /api/v3/execution-quality Enterprise
Market-wide transaction cost analysis — average spreads, VPIN levels, Amihud illiquidity, and optimal execution strategy recommendations.
GET /api/v3/execution-quality/{symbol} Enterprise
Per-stock TCA: spread, market impact by order size (₹10L to ₹5Cr), VPIN, Kyle's lambda, and optimal execution strategy (TWAP/VWAP).
Intelligence & Signals
GET /api/v3/fund-flow-prediction Enterprise
Predict passive/active inflows from index rebalancing, ETF creation/redemption, and MF flow patterns. Front-run index changes with data.
GET /api/v3/conviction-decay Enterprise
Market-wide institutional conviction decay — identifies stocks where FII/DII/insider conviction is building or decaying, with hedger capitulation probability.
GET /api/v3/conviction-decay/{symbol} Enterprise
Per-stock conviction trajectory: current score, 7d/30d decay rates, per-source breakdown (FII, DII, insider, delivery), and conviction half-life.
GET /api/v3/explainable-alerts Pro
Active alerts enriched with SHAP-based explanations. Each alert includes contributing factors ranked by importance, directional impact, and human-readable reasoning. Filter by ?severity=critical or ?alert_type=regime_change.
GET /api/v3/explainable-alerts/{symbol} Enterprise
Per-stock explainable alerts with SHAP factor breakdown.
OpenAPI Specification
GET /api/v3/openapi-spec No Key Required
Full OpenAPI 3.0 specification for all DalalAI APIs. Auto-generate Python/JS/Go SDKs, import into Postman, or render in Swagger UI.
ML Intelligence APIs
High-value composite endpoints that combine 10+ ML model outputs into actionable intelligence. Cross-model consensus, accuracy-weighted predictions, and full explainability. Pro Enterprise
Pro — ML Composites (v2)
GET /api/v2/ml-consensus/{symbol} Pro
Cross-model consensus — combines 10+ ML models with accuracy weighting, conflict detection, and explainability summary. Returns ensemble prediction, agreement ratio, and model leaderboard.
GET /api/v2/prediction-confidence/{symbol} Pro
Unified prediction with confidence intervals from 4 sources: conformal prediction, quantile regression, TFT intervals, and LSTM forecasts. Includes tail risk assessment.
GET /api/v2/stock-intelligence/{symbol} Pro
Complete ML intelligence brief — 8+ model outputs composited into signal, risk profile, earnings catalyst, regime context, GNN peer intelligence, and SHAP explainability.
GET /api/v2/circuit-breaker-risk Pro
Circuit breaker risk dashboard — stocks most likely to hit NSE circuit limits (2/5/10/20%) based on momentum, volatility, and OI signals.
GET /api/v2/earnings-edge-ml/{symbol} Pro
Enhanced earnings edge with XGBoost beat probability, TabNet attention analysis, multi-target risk forecast, and SHAP-based feature explanations.
Enterprise — ML Operations (v3)
GET /api/v3/ml-health Enterprise
Complete ML operations dashboard — model governance (champion/challenger status), accuracy trends, drift alerts, calibration quality, retraining status, and model registry across all 10 models.
GET /api/v3/alpha-signals Enterprise
Ranked alpha signals from all ML models — stocks sorted by ensemble conviction with cross-model agreement, GNN peer signals, earnings catalysts, and circuit risk. Filter by ?min_confidence=0.7&limit=20.
GET /api/v3/model-accuracy-trends Enterprise
30-day model accuracy trends with per-model breakdown. Track which models are improving vs degrading. Filter: ?days=30&model=LSTM.
GET /api/v3/ensemble-explainer/{symbol} Enterprise
Deep ensemble explanation — DES-KNN model selection, LightGBM feature importance, TabNet attention masks, regime-conditioned weights, SHAP values, and counterfactual analysis.
GET /api/v3/risk-return-matrix Enterprise
Multi-target risk/return matrix — forward return vs forward volatility vs max drawdown for all stocks, clustered by risk profile with quadrant classification.
Health Check
GET /api/v1/health No Key Required
Check API availability and data source status. No authentication needed.
{
"data": {
"status": "ok",
"uptime": true,
"dataSource": "ok",
"endpoints": 409,
"rateLimit": "tier-based"
}
}
GET /api/v1/quality No Key Required
Data quality report — shows freshness, record counts, and gate status for every API-served file. No authentication needed.
{
"data": {
"gate": "PASS",
"summary": "Quality Gate: PASS — 21/21 passed",
"stats": { "total": 21, "passed": 21, "warned": 0, "failed": 0 },
"files": [
{ "file": "dvm_scores.json", "status": "PASS", "age_hours": 3.2, "record_count": 806 },
...
]
}
}
Live API status page →
Tier Info
GET /api/v1/tier-info
Check your current API tier, rate limits, quotas, and the full tier comparison. Use this to programmatically determine what endpoints your key can access.
{
"tier": "PRO",
"rate_limits": { "daily_calls": 50000, "per_minute": 500 },
"quotas": { "keys": 10, "webhooks": 25, "historical_days": 1825 },
"all_tiers": { "free": { ... }, "starter": { ... }, "pro": { ... }, "enterprise": { ... } },
"upgrade_url": "https://dalalai.com/b2b#pricing"
}
Account Management
These endpoints manage API keys, webhooks, and organizations. They require Firebase Authentication (Bearer token) or a valid API key depending on the endpoint.
API Key Management
POST /api/manageApiKeys — Requires Firebase Auth token in Authorization header + App Check.
POST /api/manageApiKeys
Manage API keys for your account. All actions use the same endpoint with an action field in the JSON body.
| generate_trial | Generate a free trial key (25 calls, 3 days). One per account. |
| generate | Generate a new API key. Requires active B2B subscription. Keys are SHA-256 hashed in storage — save the raw key immediately. |
| list | List all your API keys (active + last 10 revoked) with usage stats and tier info. |
| revoke | Revoke a key by keyId. Atomic transaction decrements active key count. |
| rotate | Rotate a key: atomically revokes old key and creates a new one. 5-minute grace period for the old key. |
| get_usage | Returns 7-day usage sparkline data (daily call counts across all your keys). |
// Generate a trial key
POST /api/manageApiKeys
Authorization: Bearer {firebase_id_token}
{ "action": "generate_trial" }
// Response
{
"success": true,
"apiKey": "dalalai_a1b2c3d4...",
"prefix": "dalalai_a1b2c3d4",
"trial": true,
"limits": { "calls": 25, "expiresAt": "2026-03-26T..." }
}
Webhook Management
Manage webhook subscriptions for real-time event push notifications. Requires API key via X-API-Key header. Starter tier and above.
GET /api/webhooks
List all your webhook subscriptions. Add ?action=health for delivery stats + dead letter queue, or ?action=deadletters for paginated DLQ.
POST /api/webhooks
Register a new webhook. HTTPS URLs only (SSRF protection blocks private IPs). Max webhooks per tier enforced.
POST /api/webhooks
X-API-Key: dalalai_your_key
{
"url": "https://your-server.com/webhook",
"events": ["regime_change", "breakout_signal", "earnings_surprise"],
"secret": "optional-signing-secret"
}
// Response: { "id": "wh_abc123", "url": "...", "events": [...], "active": true }
Supported events: regime_change, breakout_signal, convergence_spike, earnings_surprise,
insider_trade, fii_flow_reversal, portfolio_alert, price_target_hit, vix_spike, block_deal
Delivery: HMAC-SHA256 signed payloads (X-DalalAI-Signature: sha256=...), exponential backoff retries (1s/5s/15s), auto-disabled after 10 consecutive failures, dead letter queue with 7-day retention.
POST /api/webhooks (action: retry / purge_deadletters)
Retry a failed dead-letter delivery or purge all dead letters. Body: { "action": "retry", "deadLetterId": "..." } or { "action": "purge_deadletters" }.
DELETE /api/webhooks?id={webhook_id}
Remove a webhook subscription.
Organization Management Enterprise
Multi-user organizations with RBAC. Enterprise tier only. Requires API key via X-API-Key.
POST /api/organization
Manage your organization. Actions via action field in the JSON body:
| create | Create an org. Body: { "name": "Acme Corp", "gstin": "optional" }. One org per user. |
| get | Get org details including all members and their roles. |
| invite | Invite a member by email. Body: { "email": "[email protected]", "role": "developer" }. Roles: admin, developer, viewer. |
| accept_invite | Accept an invitation. Body: { "orgId": "...", "inviteId": "..." } |
| remove_member | Remove a member (admin only). Cannot remove org owner. |
| update_role | Change a member's role (admin only). |
| ip_whitelist | Set org IP whitelist (up to 50 IPs). Body: { "ips": ["1.2.3.4", "5.6.7.8"] } |
| usage | Org-wide usage analytics (aggregated across all members' keys). |
API Versioning Policy
DalalAI uses additive versioning. v1/v2/v3 are concurrently supported. No endpoint is removed without at least 12 months notice via:
Deprecation: true response header when an endpoint is scheduled for removal
Sunset: Sat, 31 Mar 2027 23:59:59 GMT header with the exact removal date
- Email notification to all subscribed API key owners
- Changelog entry at changelog
Current status: All v1, v2, and v3 endpoints are stable. No deprecations are currently scheduled. v1 is guaranteed through at least March 31, 2027.
API Availability Matrix
Every endpoint is gated to a minimum tier. Higher tiers inherit all endpoints from lower tiers. This table shows what each pricing plan unlocks.
| Category |
Free ₹0 |
Starter ₹1,999/mo |
Pro ₹9,999/mo |
Enterprise ₹24,999/mo |
Core stock data DVM scores, tech data, regime, signal accuracy, history |
5 | ✓ | ✓ | ✓ |
Market overview Morning briefing, daily digest, NSE holidays, global cues |
4 | ✓ | ✓ | ✓ |
Portfolio & discovery Portfolio health, trending/smart/graduated discovery |
5 | ✓ | ✓ | ✓ |
Institutional & fundamental FII/DII, advisory, earnings, quarterlies |
5 | ✓ | ✓ | ✓ |
Derivatives & technicals Options, futures, breakout, volume shockers, RSI |
6 | ✓ | ✓ | ✓ |
| Free tier subtotal |
~30 | ✓ | ✓ | ✓ |
All v1 data endpoints Analytics, alternative data, ML models, predictions, alerts, screeners, sentiment (275 additional) |
— | 305 | ✓ | ✓ |
| Starter tier subtotal |
— | 306 | ✓ | ✓ |
v2 Composite APIs Stock forecast, DNA, AI consensus, risk score, trade plan, screener, market pulse, portfolio X-ray, earnings edge, etc. |
— | — | 38 | ✓ |
v2 ML Intelligence ML consensus, prediction confidence, stock intelligence, circuit breaker risk, earnings edge ML |
— | — | 5 | ✓ |
v3 Select premium Macro dashboard, index rebalance, stress test, attribution, stress scenarios, explainable alerts |
— | — | 6 | ✓ |
v3 B2B features Webhooks, SSE streaming, factor builder, timeseries snapshots |
— | — | 7 | ✓ |
| Pro tier subtotal |
— | — | 369 | ✓ |
v3 Premium institutional Institutional flow, FII sector rotation, block deal intel, smart money, options flow/strategy, insider radar, regulatory, ESG, IPO, overnight risk, event catalyst, flow heatmap, derivatives intel |
— | — | — | 14 |
v3 Premium advanced Risk cockpit, portfolio construction, MLOps health, prediction stack, regime intelligence, volatility lab, alpha lab, quant screener, India macro pulse, India NLP trends |
— | — | — | 10 |
v3 B2B enterprise exclusives Multi-asset risk, execution quality, fund flow prediction, conviction decay |
— | — | — | 4 |
v2 Enterprise developer Quant risk attribution, execution planner, market integrity, regulatory dashboard, anomaly radar |
— | — | — | 5 |
v3 ML Intelligence enterprise ML health dashboard, alpha signals, accuracy trends, ensemble explainer, risk/return matrix |
— | — | — | 5 |
| Enterprise tier total |
— | — | — | 409 |
Rate Limits & Quotas by Tier
| Limit |
Free |
Starter |
Pro |
Enterprise |
| Daily API calls | 10 | 5,000 | 50,000 | 1,00,000 |
| Requests/min | 5 | 100 | 500 | 1,000 |
| API keys | 1 | 3 | 10 | 20 |
| Webhooks | 0 | 3 | 25 | 50 |
| Historical depth | 30 days | 1 year | 5 years | 10 years |
| SLA | — | 99.5% | 99.9% | 99.99% |
| Endpoints | ~30 | 306 | 369 | 409 |
Tier is resolved from your API key via Firestore. Use GET /api/v1/tier-info to check your current tier and quotas programmatically. Response headers include X-API-Tier, X-RateLimit-Daily, and X-RateLimit-PerMinute on every request.
Postman Collection
Import the ready-made Postman collection to test all endpoints instantly:
⬇ Download Postman Collection
After importing, set the api_key variable in your Postman environment to your API key.
Changelog
v1.6 — March 23, 2026
- 10 new ML Intelligence composite APIs — cross-model consensus, prediction confidence intervals, stock intelligence briefs, circuit breaker risk, earnings edge ML, ML health dashboard, alpha signals, accuracy trends, ensemble explainer, risk/return matrix
- 17 ML data files populated — fixed 13 stub files (DES-KNN, earnings beat, GNN, LightGBM, TabNet, TFT, online SGD, regime ensemble, quantile forecasts, circuit breaker, explainability, multi-target, reconciliation) + created 4 new files (prediction stack, model governance, accuracy report, ensemble predictions)
- Tier-based access control — 4-tier enforcement (Free/Starter/Pro/Enterprise) with 403 + upgrade CTA, per-key Firestore tier resolution, rate limit headers
- New endpoint:
/api/v1/tier-info — self-service tier/quota check
- Model governance dashboard: champion/challenger tracking, drift alerts, compliance audit
- 30-day accuracy leaderboard: daily per-model scores with trend analysis
- Running total: 409 endpoints (305 v1 + 52 v2 + 52 v3)
v1.5 — March 23, 2026
- 21 new B2B Analytics & ML Empowerment APIs — webhooks, SSE streaming, custom factor builder, historical snapshots, execution quality TCA, multi-asset risk, conviction decay, explainable alerts, OpenAPI spec
- Webhooks: Register HTTPS endpoints, HMAC-SHA256 signed payloads, 10 event types (regime_change, breakout_signal, convergence_spike, earnings_surprise, insider_trade, fii_flow_reversal, portfolio_alert, price_target_hit, vix_spike, block_deal)
- SSE Streaming: Server-Sent Events for real-time signal push during market hours
- Custom Factor Builder: 30+ components, mathematical operators, walk-forward backtesting
- Time-Series Snapshots: Historical data for 13 key endpoints, up to 365-day retention
- Enriched Attribution: Brinson-Fachler + factor attribution + risk decomposition
- Multi-Asset Risk: Equities + bonds (G-Sec, yield curve) + commodities in one dashboard
- Execution Quality TCA: VPIN, Kyle's lambda, Amihud illiquidity, optimal execution planning
- 10 stress scenarios: Rate hikes, crashes, FII exits, VIX spikes, crude, rupee, SEBI, geopolitical
- Conviction Decay: Track institutional conviction trajectory + hedger capitulation signals
- Explainable Alerts: SHAP-powered "why this alert?" reasoning on every alert
- OpenAPI 3.0 spec endpoint: Auto-generate SDKs in any language
- Running total: 388+ endpoints after B2B additions
v1.4 — March 15, 2026
- 20 new Wave 9 Advanced Analytics endpoints — quant factors, microstructure, pair trades, Greeks, risk parity
- Pipeline optimization: Sunday full retrain, Wed+Fri refresh, dual scoring (pre-market + post-market)
- weekly_monthly module wired into plugin registry (stage 4.3295)
- 121 registered analytics plugins (was 98). Total v1 data endpoints: 255. Overall: 330+
v1.3 — March 15, 2026
- 13 new v3 Premium Institutional APIs — targeting FIIs, HNIs, brokers, and compliance teams
- Institutional Flow: unified FII/DII + participant OI + FPI holdings + smart money
- FII Sector Rotation: sector-level FPI aggregation + RRG + rotation playbook
- Block Deal Intelligence: enriched with delivery spikes + smart money signals
- Options Flow: unusual activity + OI heatmap + VIX + historical chain
- Insider Radar: trades + promoter + pledge + SEBI filings + risk flags
- Regulatory Radar: SEBI + BSE announcements + corporate actions
- ESG Compliance: ESG scores + shareholding + pledge + credit ratings
- Macro Dashboard: RBI + yield curve + G-Sec + VIX + cross-asset + global cues
- Stress Test: scenario analysis (rate hike, crash, FII exit, VIX spike, global selloff)
- Index Rebalance: predictions + passive flow + MF deltas
- IPO Intel: pipeline + tracker + concall sentiment
- Running total at this release: 53 (23 v1 + 17 v2 + 13 v3)
v1.2 — March 15, 2026
- 17 new v2 Composite & Developer APIs — compose 27 ML models into unified actionable endpoints
- Stock Forecast: unified LSTM + Conformal + AI Ensemble per symbol
- AI Consensus: per-model vote breakdown with weighted agreement %
- Risk Score: single 0-100 risk metric combining volatility, conformal width, and drift
- Smart Screener: multi-factor filter (signal, convergence, confidence, sentiment)
- Market Pulse: 0-100 market health score (regime + breadth + flows + sentiment + cross-asset)
- Developer APIs: batch predictions, raw features, model health dashboard, explainability, correlation graph, regime playbook, factor returns
- Total endpoints: 40 (23 v1 data + 17 v2 composite/developer)
v1.1 — March 14, 2026
- Field selection:
?fields=Symbol,CMP — reduce response payload
- Sorting:
?sort=-DVM_Score — server-side sorting
- Filtering:
?filter=DVM_Score>80 — multi-clause filtering
- Batch:
/api/v1/batch?endpoints=stocks,regime — up to 5 in one call
- ETag +
304 Not Modified for bandwidth-efficient polling
- Embeddable widgets:
/api/v1/widget?type=regime — SVG badges
- Usage sparkline in the API dashboard
- RSS feed for changelog
v1.0 — March 2026
- Initial release: 23 data endpoints
- API key authentication with SHA-256 hashing
- Tier-based rate limiting (Free/Starter/Pro/Enterprise)
- Standardized JSON response envelope (
data, meta, error)
- Rate limit headers (
X-RateLimit-*) and request tracing (X-Request-Id)
- Free trial mode: 25 calls / 3 days
- Health endpoint at
/api/v1/health
- Key rotation and admin revocation
View full changelog → | RSS Feed