Trading2024

Sani Securities

Developed and optimized backend services for Sani Securities Company Limited, a NEPSE-licensed brokerage platform — enabling real-time trading, portfolio insights, and secure user transactions.

Role
Backend Developer
Timeline
From April 2024
Team
System Design

Architecture

ClientEdgeServicesDatalive ticksordersticksTrader WebREST APIWebSocket Feedpushed, not polledTradingorder lifecyclePortfolio Insightsderived on readNEPSElive marketHoldings DB

A brokerage backend has one non-negotiable: the price on screen is the price at the exchange. Ticks are pushed the moment they land — a second of lag is a wrong number.

01

Real-Time Is The Requirement

A brokerage is a different animal from a bank. A bank's balance can settle a second late and nobody notices; a trading screen a second late is actively misleading, because the price you're looking at is the price you think you're getting. Market data has to move as it happens.

02

Portfolio Insights

Portfolio views are read-heavy and derived — holdings, valuations, and position changes computed against live market data rather than stored as facts. The work is in making those reads fast enough to feel instant while staying correct against a price that never stops moving.

03

NEPSE Compliance

Operating under a NEPSE licence means the platform's constraints are regulatory as well as technical. Secure user transactions aren't a feature you can defer to a later sprint — they're the condition of being allowed to run at all.

In Practice

The API, Live

A WebSocket subscription to live NEPSE symbols. The server pushes every tick as it lands — the screen never waits on the next poll to learn the truth.

wscat — live market stream. Request: wscat -c wss://api.sani.internal/stream \ -x '{"subscribe": ["NIFRA", "NABIL"]}'. Response: < { "s": "NIFRA", "ltp": 312.50, "chg": "+1.8%" } < { "s": "NABIL", "ltp": 512.00, "chg": "-0.4%" } < { "s": "NIFRA", "ltp": 313.00, "chg": "+1.9%" } connected · ticks pushed as they happen, no polling

Built With

Node.jsMicroservicesREST APIWebSockets

Next Project

Gold & Silver

View →