Developer Documentation

Documentation

Everything you need to integrate Viralays into your trading apps, algos, and dashboards. Access real-time NSE & BSE data, AI-powered stock insights, a 200-filter screener, and portfolio analytics — all through a single REST API.

Quick Start

Go from zero to your first live NSE data fetch in under five minutes.

Get API Key

Create a free Viralays account, navigate to Settings → API Keys, and generate your first key in under a minute.

Make First Request

Fetch live NSE quotes with a single cURL command. Our REST API returns JSON — no SDK required to get started.

Explore Endpoints

Browse 60+ endpoints covering market data, screener, AI insights, portfolio tracking, and corporate actions.

SDK Setup

Install the official Viralays SDK for Python, Node.js, or Go. Includes typed models, auto-retry, and rate-limit handling.

Getting Started

Getting Started with Viralays API

The Viralays API gives you programmatic access to real-time and historical data for over 5,000 NSE and BSE listed securities, AI-powered research, advanced screeners, and more. Follow these five steps to make your first API call.

The Viralays API base URL is https://api.viralays.com. All endpoints require HTTPS. HTTP requests are automatically redirected.

1

Sign up for a Viralays account

Head to viralays.com/signup and create a free account. No credit card required for the Starter plan which includes 1,000 API calls per day.

2

Generate your API key

From the dashboard, go to Settings → API Keys → Create New Key. Choose a descriptive name (e.g. 'dev-local') and copy the key — it won't be shown again.

3

Make your first request

Use the key as a Bearer token in the Authorization header. The example below fetches the live quote for Reliance Industries (NSE: RELIANCE).

curl -X GET "https://api.viralays.com/v1/market/quote?symbol=RELIANCE&exchange=NSE" \
  -H "Authorization: Bearer vrl_live_YOUR_API_KEY" \
  -H "Content-Type: application/json"
4

Parse the JSON response

A successful response returns HTTP 200 with a JSON body. The key fields are ltp (last traded price), change_pct, volume, and metadata.

{
  "symbol": "RELIANCE",
  "exchange": "NSE",
  "ltp": 2934.50,
  "change": 18.35,
  "change_pct": 0.63,
  "volume": 4823011,
  "52w_high": 3217.90,
  "52w_low": 2220.30,
  "market_cap_cr": 1984521,
  "timestamp": "2026-06-23T09:45:12+05:30"
}
5

Install an SDK (optional)

For production use, install the official Python SDK to get typed responses, automatic retries, and streaming support.

pip install viralays
# Then in Python:
from viralays import ViraClient
client = ViraClient(api_key="vrl_live_YOUR_API_KEY")
quote = client.market.quote(symbol="RELIANCE", exchange="NSE")
print(quote.ltp)

Free Starter accounts get 1,000 API calls per day across all endpoints. For production workloads, upgrade to a Pro or Enterprise plan which includes WebSocket streaming, bulk endpoints, and dedicated support.

Popular Guides

Step-by-step tutorials for the most common Viralays API use cases.

Market Data

Fetching NSE Live Quotes

Stream real-time bid/ask, LTP, volume, and 52-week data for any NSE symbol using the /v1/market/quote endpoint.

Read guide
Screener

Building a Stock Screener

Compose multi-filter screens — P/E ratio, ROE, promoter holding, debt-to-equity — and paginate results efficiently.

Read guide
AI

AI Sentiment Analysis

Query the AI Insights API to retrieve sentiment scores, analyst tone, and key risk flags from earnings call transcripts.

Read guide
Portfolio

Portfolio Tracking

Push trade history, sync holdings from CDSL/NSDL, and retrieve live P&L, XIRR, and sector allocation breakdowns.

Read guide
Webhooks

Setting Up Webhooks

Receive real-time push notifications for price alerts, corporate actions, result dates, and AI signal changes.

Read guide
Rate Limits

Rate Limit Best Practices

Understand per-plan quotas, implement exponential back-off, use bulk endpoints, and track your usage in real time.

Read guide

Ready to start building?

Join 3,000+ developers already building on Viralays. Your first 1,000 API calls every day are free — no credit card required.