Partner API Documentation
Embed Target Capital's I-Score and MVLA F&O signal engines into your broker, advisory, or fintech platform. Pull on demand or receive real-time push alerts to your webhook.
Overview
The Partner API exposes two engines as a service:
- I-Score — a 6-component score (0–100) per NSE stock with explainability factors. Subscribe per symbol.
- MVLA F&O — momentum-validated, loss-averse intraday signals for NIFTY, BANKNIFTY, FINNIFTY and SENSEX with confidence tiers, ATM strike selection and risk levels. Subscribe per index.
All endpoints are mounted under /api/partner/v1 and respond with JSON.
Authentication
Every protected endpoint requires a Bearer token in the
Authorization header:
curl https://app.targetcapital.in/api/partner/v1/me \
-H "Authorization: Bearer tc_live_YOUR_API_KEY"
Keys begin with tc_live_. We never store the raw key — only a salted
hash — so a key shown to you at creation cannot be retrieved later. Lose it,
rotate it.
Getting an API key
Email partners@targetcapital.in
with your organisation, intended use and a webhook URL. Our team
provisions an account and returns the key once. The first response also
contains has_webhook_secret — store the secret to verify push payloads.
tc_live_.
A separate tc_test_ namespace with synthetic data is on the roadmap.
Errors & rate limits
Errors return a JSON body with a stable code string:
{
"success": false,
"error": "Invalid or revoked API key",
"code": "INVALID_API_KEY"
}
| HTTP | Code | Meaning |
|---|---|---|
| 400 | INVALID_REQUEST / INVALID_INDEX / INVALID_SYMBOL | Malformed input |
| 401 | NO_API_KEY / INVALID_API_KEY | Missing or bad bearer token |
| 403 | FORBIDDEN | Endpoint requires admin |
| 404 | NOT_FOUND | Subscription does not exist |
| 500 | ENGINE_ERROR / DB_ERROR | Server-side problem (retry safe) |
Default plan limit is 60 requests/minute per key. Pro and Elite plans raise this — see pricing.
F&O — live signal
Runs the MVLA engine on the latest spot + option-chain snapshot and returns the full analysis: direction, confidence (0–100), entry mode, ATM strike, three ranked option trades, layer-by-layer scoring breakdown and the data source.
Query parameters
| Name | Required | Description |
|---|---|---|
| index | yes | One of NIFTY, BANKNIFTY, FINNIFTY, SENSEX |
Example
curl "https://app.targetcapital.in/api/partner/v1/fno/signals/live?index=NIFTY" \
-H "Authorization: Bearer tc_live_YOUR_API_KEY"
{
"success": true,
"index": "NIFTY",
"analysis": {
"trade_direction": "BULLISH",
"confidence": 82,
"confidence_grade":"Strong",
"entry_mode": "BREAKOUT",
"atm_strike": 22500,
"spot_price": 22487.4,
"trades": [
{ "type": "ATM", "strike": 22500, "ltp": 118.4, "risk": "MEDIUM" },
{ "type": "OTM", "strike": 22550, "ltp": 78.1, "risk": "HIGH" },
{ "type": "ITM", "strike": 22400, "ltp": 175.6, "risk": "LOW" }
],
"layers": { "direction": {...}, "strength": {...}, "filters": {...} },
"data_source": "broker"
}
}
F&O — history
Returns past signals captured by our continuous monitor (60-second scans during market hours). Useful for backtests and dashboard "today's signals" rails.
| Name | Default | Range |
|---|---|---|
| index | NIFTY | Required, one of the four |
| days | 7 | 1–30 |
| limit | 100 | 1–500 |
I-Score — single stock
Computes the full 6-component I-Score with confidence, recommendation tier
(STRONG_BUY / BUY / HOLD / SELL) and "Why this
score?" factors. Result is cached till midnight IST.
curl "https://app.targetcapital.in/api/partner/v1/iscore/RELIANCE" \
-H "Authorization: Bearer tc_live_YOUR_API_KEY"
{
"success": true,
"symbol": "RELIANCE",
"result": {
"iscore": 72.4,
"confidence": 0.81,
"recommendation": "BUY",
"summary": "Strong fundamentals, improving trend, low risk regime.",
"components": {
"qualitative": { "score": 70, "weight": 15, ... },
"quantitative": { "score": 78, "weight": 35, ... },
"trend": { "score": 75, "weight": 20, ... },
"risk": { "score": 65, "weight": 15, ... },
"search": { "score": 60, "weight": 10, ... },
"market_context": { "score": 55, "weight": 5, ... }
},
"score_factors": [
"Wilder RSI(14) = 62 — bullish bias",
"Price > 50-EMA, EMA stack rising",
"Drawdown 6% — well below 20% penalty band"
]
}
}
I-Score — batch
Up to 25 symbols per call.
curl -X POST https://app.targetcapital.in/api/partner/v1/iscore/batch \
-H "Authorization: Bearer tc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "symbols": ["RELIANCE","TCS","HDFCBANK","INFY"] }'
Subscriptions — push alerts
Subscribe a symbol or index and we will POST every qualifying signal to the
webhook_url on your partner profile.
Body
| Field | Type | Description |
|---|---|---|
| engine | string | fno or iscore |
| symbol | string | Index (NIFTY, BANKNIFTY, …) for F&O; NSE stock symbol for I-Score |
| min_confidence | int | Only fire when score ≥ this. Default 75 (F&O) / 60 (I-Score) |
| delta_threshold | int | I-Score only. Re-fire when score moves by this many points. Default 5 |
| channels | array | Currently ["webhook"]. Email coming soon |
| is_active | bool | Pause without deleting |
curl -X POST https://app.targetcapital.in/api/partner/v1/subscriptions \
-H "Authorization: Bearer tc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"engine": "fno",
"symbol": "NIFTY",
"min_confidence": 75
}'
(engine, symbol) — repeating with new thresholds updates the
existing subscription instead of erroring.Portfolio risk analysis
Stateless risk analysis on a list of holdings — up to 50 per request. Pass any portfolio (your customer's or a model book) and get back a risk score, concentration metrics, sector/asset allocation, a heat map and prescriptive recommendations. Nothing is stored on our side.
curl -X POST https://app.targetcapital.in/api/partner/v1/portfolio/analyze \
-H "Authorization: Bearer tc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"currency": "INR",
"holdings": [
{"symbol":"RELIANCE","qty":50,"avg_price":2400,"current_price":2890,
"sector":"Energy","asset_class":"Equities"},
{"symbol":"TCS","qty":20,"avg_price":3500,"current_price":3850,
"sector":"IT","asset_class":"Equities"},
{"symbol":"GOLDBEES","qty":200,"avg_price":55,"current_price":62,
"sector":"ETF","asset_class":"Gold"}
]
}'
Holding fields
| Field | Type | Required | Notes |
|---|---|---|---|
symbol | string | yes | Trading symbol (case-insensitive) |
qty | number | yes | Quantity held, > 0 |
avg_price | number | yes | Average buy price |
current_price | number | no | Defaults to avg_price if omitted |
sector | string | no | Used for sector allocation |
asset_class | string | no | One of Equities, Mutual Funds, FD, Gold, Crypto, FNO, Bonds, Insurance, Real Estate. Default Equities |
Response
{
"success": true,
"summary": {
"currency": "INR",
"holdings_count": 3,
"sector_count": 3,
"total_invested": 141000.00,
"total_current_value": 233900.00,
"total_pnl": 92900.00,
"total_pnl_pct": 65.89,
"risk_score": 72.4, // 0–100, higher = riskier
"risk_grade": "Aggressive", // Conservative | Balanced | Aggressive | Highly Aggressive
"concentration_hhi": 3712.5, // Herfindahl index, >2500 = concentrated
"top_holding_pct": 61.78,
"top_holding_symbol": "RELIANCE",
"warnings_count": 2
},
"details": {
"holdings": [ ... per-holding metrics ... ],
"sector_allocation": [ {"name":"Energy","weight_pct":61.78, ...}, ... ],
"asset_allocation": [ {"name":"Equities","weight_pct":94.7, ...}, ... ],
"risk_heatmap": [ {"symbol":"RELIANCE","weight_pct":61.8,"risk_score":8, ...}, ... ],
"warnings": [ {"type":"concentration","severity":"high","message":"..."} ],
"recommendations": [ "Trim single-stock positions above 25% ...", ... ]
}
}
Behavioural analysis
Run our trading-psychology engine on a list of trades — up to 100 per request. Detects 8 patterns (overtrading, revenge trading, tilt, loss aversion, profit-booking bias, poor timing, position-sizing inconsistency, symbol concentration), produces a 0–100 Discipline Score, headline stats and prescriptive coaching.
curl -X POST https://app.targetcapital.in/api/partner/v1/behaviour/analyze \
-H "Authorization: Bearer tc_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"lookback": "Last 30 days",
"trades": [
{"symbol":"NIFTY","side":"BUY","qty":75,"price":120,
"entry_time":"2026-04-12T09:18:00","exit_time":"2026-04-12T09:25:00",
"pnl":-450,"segment":"FNO"},
{"symbol":"NIFTY","side":"BUY","qty":150,"price":110,
"entry_time":"2026-04-12T09:35:00","exit_time":"2026-04-12T09:50:00",
"pnl":-1200,"segment":"FNO"}
]
}'
Trade fields
| Field | Type | Required | Notes |
|---|---|---|---|
symbol | string | yes | Trading symbol |
side | string | yes | BUY or SELL |
qty | number | yes | Filled quantity, > 0 |
price | number | yes | Average fill price |
entry_time | string | yes | ISO 8601 timestamp |
exit_time | string | no | ISO 8601, required for hold-time analysis |
pnl | number | no | Realised P&L. Required for win-rate, loss aversion, revenge & tilt detection |
segment | string | no | EQ, FNO, MCX. Default EQ |
strategy | string | no | Free-form tag, echoed in response |
Response
{
"success": true,
"summary": {
"lookback": "Last 30 days",
"discipline_score": 62, // 0–100
"discipline_grade": "Fair", // Excellent | Good | Fair | Poor | Critical
"total_trades": 6,
"closed_trades": 6,
"win_rate_pct": 33.33,
"profit_factor": 0.94,
"total_pnl": -650.00,
"patterns_detected": 3,
"top_concern": "revenge_trading"
},
"details": {
"patterns": [
{"pattern":"revenge_trading","detected":true,"severity":"medium",
"evidence":"2 trade(s) entered within 30m of a loss with equal or larger size.",
"metric":{"count":2}},
{"pattern":"tilt","detected":true,"severity":"medium", ...},
{"pattern":"poor_timing","detected":true,"severity":"medium", ...},
...
],
"stats": {
"win_rate_pct": 33.33, "avg_win": 1050, "avg_loss": -687.5,
"profit_factor": 0.94, "segment_breakdown":{"FNO":6},
"top_5_symbols":[["NIFTY",5],["BANKNIFTY",1]],
"hourly_distribution":{"9":3,"10":1,"11":1,"15":1}
},
"recommendations": [
"Enforce a 30-minute cool-down after any losing trade before re-entering.",
"Use fixed position sizing — never increase size after a loss.",
"Avoid the first and last 15 minutes of the session — wait for stable price action."
]
}
}
Webhook payloads
F&O signal
POST https://your-platform.com/webhooks/tc
Content-Type: application/json
X-TC-Event: fno.signal
X-TC-Signature: sha256=<hex hmac of body>
{
"engine": "fno",
"event": "TRADE_TRIGGER",
"index": "NIFTY",
"symbol": "NIFTY",
"score": 82,
"confidence": 82,
"tier": "HIGH",
"trade_direction": "BULLISH",
"entry_mode": "BREAKOUT",
"atm_strike": 22500,
"entry_price": 120,
"sl": 105,
"target": 145,
"trade_code": "NIFTY-2026-05-03-001",
"data_source": "broker",
"subscription_id": 17,
"timestamp": "2026-05-03T05:21:00Z"
}
Tier maps directly to confidence: HIGH ≥ 75, REGULAR 60–74, AGGRESSIVE 50–59.
I-Score update
Fires on new subscription, recommendation tier change, or score delta ≥ delta_threshold:
POST https://your-platform.com/webhooks/tc
X-TC-Event: iscore.update
{
"engine": "iscore",
"symbol": "RELIANCE",
"score": 72.4,
"confidence": 0.81,
"tier": "BUY",
"recommendation": "BUY",
"summary": "...",
"components": { ... },
"subscription_id": 12,
"timestamp": "2026-05-03T05:30:00Z"
}
Verifying signatures
Every webhook carries an HMAC-SHA256 of the raw request body keyed by your
webhook_secret. Always verify before trusting the payload.
import hmac, hashlib
def verify(req_body: bytes, header_sig: str, secret: str) -> bool:
expected = "sha256=" + hmac.new(
secret.encode(), req_body, hashlib.sha256
).hexdigest()
return hmac.compare_digest(expected, header_sig or "")
2xx within 5 seconds. We retry once on 5xx; 4xx is
treated as permanent rejection. All attempts are logged.
Delivery log
Returns the last n webhook attempts with HTTP status, error and the
exact payload sent. Filter by engine.
Changelog
- 2026-05-03 — Added
/portfolio/analyze(50 holdings) and/behaviour/analyze(100 trades) on-demand endpoints. - 2026-05-01 — Initial public release: F&O live + history, I-Score single + batch, subscriptions, HMAC webhooks.
Support
Questions, integration help or to request a sandbox key: partners@targetcapital.in. For platform issues see the Help Center or contact our team.