Third-Party API Landscape

Beyond broker APIs, several third-party vendors provide enhanced market data, signals, and trading APIs for Indian markets.

Market Data APIs

1. TrueData

Historical and real-time market data for NSE, BSE. Options data, Greeks, IV data.

  • Free: Delayed data
  • Pro: Rs 999/month, real-time
  • Enterprise: Custom pricing

2. ChartInk

Real-time scanning and alerts. Technical analysis data.

  • Free: Basic scans
  • Pro: Rs 499/month, advanced scans

3. NSE API (Unofficial)

Scraping NSE website for market data. Not officially supported.

Signal Providers

1. TradingView

Charts, indicators, and alerts. Pine Script for custom indicators.

  • Free: Basic charts
  • Pro: Rs 1500/month, alerts

2. Chartink Screener

Real-time stock screening based on technical criteria.

Execution APIs

1. TT (Trading Technologies)

Professional trading platform. Direct market access.

2. Omnesys

Institutional trading platform. Algo execution.

Python Libraries

# TrueData
from truedata import TD

# ChartInk
import requests
url = 'https://chartink.com/api/scans'

# NSE Data
import nsetools
nse = Nse()

Recommendation

  • Data: TrueData for options, ChartInk for screening
  • Signals: TradingView for alerts
  • Execution: Broker APIs (Zerodha, Upstox)

SEBI Disclaimer

Algo trading involves risk of loss. This article is for educational purposes only.

Latency Budgets Explained

Latency claims from API vendors mean nothing without a budget. Break your strategy into stages and attach a number to each:

  • Data refresh: tick feed to your process, target under 50 ms in India for a swing strategy; under 10 ms for serious intraday work.
  • Signal computation: feature extraction plus model inference, generally 5-50 ms for LightGBM-scale models.
  • Order placement: your broker connection and exchange admission, commonly 200-600 ms end to end on NSE for retail REST paths.
  • Confirmation and settlement: fills, position marks and P&L, seconds rather than milliseconds, and the least latency-sensitive of all.
  • The honest conclusion for Indian retail is that REST via a broker API is not an HFT path, but it is perfectly adequate for 1-minute to daily signals, which is where most retail edges actually live.

    The Broker-API Connectivity Stack

    Nearly every third-party execution API in India wraps one of the established broker gateways:

    • NSE NOW and NEST: the classic terminal-of-record protocols used by multiple discount brokers.
    • IB's TWS API: only relevant if you trade internationally or use IB-compatible Indian flows.
    • Broker-native REST/WebSocket APIs: each vendor exposes order placement, positions and websocket streams with rate limits measured in requests per second.

    When evaluating vendors, ask one question first: who holds the margin and the sequence number? A vendor that proxies your orders through a broker's online-trading mode is fragile; one with exchange-backed compatibility handles reconnects and duplicate-order protection properly.

    Compliance Checklist for Third-Party Apps

    SEBI's position on third-party trading platforms is clear: the broker remains accountable, and unauthorised automation can get accounts suspended. Before subscribing, verify:

    • The vendor negotiates the broker's API consent flow, not a shared password.
    • Backoffice reporting and trade uploads happen through sanctioned feeds.
    • The vendor documents its own data retention and does not silently store your trading passwords.

    Free APIs that demand your broker password are not a feature; they are a liability that a single risky trade could make expensive.

    Data Quality Benchmarks for Tick Data

    Market data subscriptions vary wildly. Use these benchmarks when comparing vendors:

    • Record coverage gaps: missing the 09:15-09:20 auction window on Nifty options by more than 0.5% of ticks disqualifies a vendor for intraday work.
    • Check timestamp hygiene: exchange time versus vendor arrival time; a 2-second offset corrupts order-flow features.
    • Verify a clean index level versus the option chain for moneyness calculations; misaligned snapshots are the classic silent bug.

    Fallback Design and Rate Limits

    Every strategy needs a fallback plan for the day its vendor fails:

    1. Run a market snapshot poll on a spare connection once a minute as a heartbeat.
    2. If the execution feed disconnects, switch to a manual kill-switch policy: flatten positions via the broker's app, not the third party.
    3. Keep your own alerts when vendor latency exceeds twice its p99, signalling degradation before a full outage.

    Vendor reliability is a probability, not a promise; the strategy that survives a vendor outage is the one that planned for one.

    Keeping the Vendor Bill Proportional to Capital

    Treat API subscriptions as a line in your P&L rather than unavoidable overhead: a sensible ceiling in India is roughly 0.1 to 0.3 percent of the capital you actually trade, which keeps a few-hundred-rupee stack honest on accounts below a few lakh rupees. Start with the cheapest useful combination, delayed data for research plus real-time feeds for only the symbols you trade, and add premium tiers only after a strategy survives paper trading.

    Divide the month's vendor spend by the number of executed signals to get the cost per trade and review it quarterly. A subscription that quietly powers no decisions should be the first cut, while a few hundred rupees spent on the feed a live strategy actually depends on is the cheapest insurance in the stack.