What Is the P/E Ratio (and How to Get It via API)
The price-to-earnings (P/E) ratio is the share price divided by earnings per share (EPS). It's a quick gauge of how much the market pays per rupee of a company's earnings — a higher P/E implies higher growth expectations (or a richer price).
How it's calculated
P/E = current price ÷ trailing-twelve-month EPS. BharatStock computes a single canonical current P/E (today's price over TTM EPS) and serves the identical value across the stock page, the /ratios endpoint, and the screener — so the number never disagrees between surfaces.
The gotchas
P/E is only meaningful when EPS is positive — for a loss-making company (negative EPS) the ratio is left empty rather than shown as a misleading negative number. Note too that a company with negative book value can still show a valid positive P/E if a one-off exceptional gain made its earnings positive; that's the as-filed reality, not an error.
Getting it via API
Call GET /v1/stocks/{ticker}/ratios (or read the pe_ratio field on GET /v1/stocks/{ticker}). You also get P/B, ROE, ROCE, and dividend yield in the same response — the same figures shown on each stock page and used by the screener.
Historical vs current P/E
The current P/E uses today's price. Each financials row also exposes a point-in-time P/E for that period (that period's close over that period's EPS) — a distinct, correct-per-period metric, not today's price over an old EPS.