https://tradingradar.in
No auth required for /api/health, /api/status, /api/anomalies/recent.
Payments flows are server-side to Razorpay; you call our endpoints as shown below.
/api/health GETBasic liveness probe.
curl -s https://tradingradar.in/api/health
{"ok":true}
/api/status GETService identity/version.
curl -s https://tradingradar.in/api/status
{"ok":true,"service":"tradingradar-api","version":"1.0"}
/api/anomalies/recent GETRecent anomaly items (sample/teaser). Returns an array; can be empty if no items yet.
curl -s https://tradingradar.in/api/anomalies/recent
{"items":[]}
/api/payments/create-order POSTCreate a Razorpay order for one-time plans: BASIC499 or PRO999. (Test mode until Razorpay live is enabled.)
curl -s -X POST https://tradingradar.in/api/payments/create-order \
-H "Content-Type: application/json" \
-d '{"plan":"BASIC499","email":"you@example.com","phone":"9999999999"}'
{
"key_id":"rzp_test_xxx",
"order":{"id":"order_abc123","amount":49900,"currency":"INR","status":"created"}
}
/api/payments/verify POSTVerify Razorpay signature after successful checkout.
curl -s -X POST https://tradingradar.in/api/payments/verify \
-H "Content-Type: application/json" \
-d '{
"razorpay_order_id":"order_abc123",
"razorpay_payment_id":"pay_def456",
"razorpay_signature":"generatedsig"
}'
{"ok":true,"access_until":"2025-11-01T00:00:00Z"}
/api/payments/webhook webhookRazorpay → TradingRadar events (payments/subscriptions). We validate X-Razorpay-Signature with your RAZORPAY_WEBHOOK_SECRET.
# (From Razorpay only) POST https://tradingradar.in/api/payments/webhook Headers: X-Razorpay-Signature: <hmac>
/api/payments/create-subscription POSTPlanned recurring billing. Disabled for end-users until Razorpay live + plans configured.
curl -s -X POST https://tradingradar.in/api/payments/create-subscription \
-H "Content-Type: application/json" \
-d '{"plan":"BASIC499"}'
/api/anomalies/stream SSE
Real-time anomaly feed over Server-Sent Events (HTTP). Events:
anomaly (payload with ts, symbol, facet, score)
and ping (keep-alive).
curl -N https://tradingradar.in/api/anomalies/stream
const es = new EventSource("/api/anomalies/stream");
// anomaly events
es.addEventListener("anomaly", (ev) => {
try {
const obj = JSON.parse(ev.data);
console.log("ANOMALY", obj);
// TODO: render into your dashboard list/tape
} catch(e) {}
});
// optional heartbeat
es.addEventListener("ping", () => {
// keep-alive; no-op
});
// connection errors
es.onerror = (e) => {
console.warn("SSE error, will auto-retry", e);
};
event: anomaly
data: {"ts": 1759420000, "symbol":"NIFTY","facet":"IV","score":3.4}
event: ping
data: {}
text/event-stream. Connection stays open.EventSource in browsers; use curl -N for testing.proxy_buffering off for this path.