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.
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.
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.
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"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"
}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.