BETA Welcome to Target Capital — India's AI-powered trading decision engine. Create a free account  ·  Sign in
v1 — Stable REST + Webhooks

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.

GEThttps://app.targetcapital.in/api/partner/v1/docs

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.

Sandbox vs live. All keys today are 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"
}
HTTPCodeMeaning
400INVALID_REQUEST / INVALID_INDEX / INVALID_SYMBOLMalformed input
401NO_API_KEY / INVALID_API_KEYMissing or bad bearer token
403FORBIDDENEndpoint requires admin
404NOT_FOUNDSubscription does not exist
500ENGINE_ERROR / DB_ERRORServer-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

GET/api/partner/v1/fno/signals/live?index=NIFTY

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

NameRequiredDescription
indexyesOne 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

GET/api/partner/v1/fno/signals/history?index=NIFTY&days=7

Returns past signals captured by our continuous monitor (60-second scans during market hours). Useful for backtests and dashboard "today's signals" rails.

NameDefaultRange
indexNIFTYRequired, one of the four
days71–30
limit1001–500

I-Score — single stock

GET/api/partner/v1/iscore/<symbol>?asset_type=stocks

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

POST/api/partner/v1/iscore/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.

GET/api/partner/v1/subscriptions
POST/api/partner/v1/subscriptions
DELETE/api/partner/v1/subscriptions/<id>

Body

FieldTypeDescription
enginestringfno or iscore
symbolstringIndex (NIFTY, BANKNIFTY, …) for F&O; NSE stock symbol for I-Score
min_confidenceintOnly fire when score ≥ this. Default 75 (F&O) / 60 (I-Score)
delta_thresholdintI-Score only. Re-fire when score moves by this many points. Default 5
channelsarrayCurrently ["webhook"]. Email coming soon
is_activeboolPause 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
  }'
POST is idempotent on (engine, symbol) — repeating with new thresholds updates the existing subscription instead of erroring.

Portfolio risk analysis

POST/api/partner/v1/portfolio/analyze

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

FieldTypeRequiredNotes
symbolstringyesTrading symbol (case-insensitive)
qtynumberyesQuantity held, > 0
avg_pricenumberyesAverage buy price
current_pricenumbernoDefaults to avg_price if omitted
sectorstringnoUsed for sector allocation
asset_classstringnoOne 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% ...", ... ]
  }
}
Limit: 50 holdings per request. Larger books should be split client-side (e.g. by account or asset class) and the summaries combined.

Behavioural analysis

POST/api/partner/v1/behaviour/analyze

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

FieldTypeRequiredNotes
symbolstringyesTrading symbol
sidestringyesBUY or SELL
qtynumberyesFilled quantity, > 0
pricenumberyesAverage fill price
entry_timestringyesISO 8601 timestamp
exit_timestringnoISO 8601, required for hold-time analysis
pnlnumbernoRealised P&L. Required for win-rate, loss aversion, revenge & tilt detection
segmentstringnoEQ, FNO, MCX. Default EQ
strategystringnoFree-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."
    ]
  }
}
Limit: 100 trades per request. For longer histories, send each lookback window (e.g. month-by-month) and aggregate the discipline trend on your side.

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 "")
Respond with 2xx within 5 seconds. We retry once on 5xx; 4xx is treated as permanent rejection. All attempts are logged.

Delivery log

GET/api/partner/v1/alerts?limit=50&engine=fno

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.