The Sahi stock market data pipeline starts at the exchanges: data arrives over dedicated fibre lines, Sahi converts every feed into one internal format, streams live ticks straight to your app over WebSocket, and in parallel builds 5-second, 1-minute, 5-minute and 1-hour candles that it stores in ScyllaDB for charts and history. Here is how each step works and why it is built that way.
When you look at a chart on Sahi and see prices move in real time, a lot is happening behind the scenes.
Not just “getting data”, but moving, cleaning, distributing, summarizing, storing, and showing massive amounts of market information in a way that feels effortless.

- Market data arrives over dedicated fibre lines, not the public internet.
- Adaptors normalise every exchange format into one internal format.
- Live ticks go straight to feed servers and your app over WebSocket, with no database in the path.
- A separate path aggregates ticks into OHLCV candles; candles, not raw ticks, are stored.
- ScyllaDB, a Cassandra-compatible database, stores candles in time-based chunks so charts load only the data they need.
About Sahi
Sahi is a stock trading app operated by Aaritya Broking Private Limited, a broker on NSE and BSE. It launched in December 2024, was founded by Dale Vaz (formerly CTO of Swiggy) and Manish Jain, and raised a US$10.5 million Series A led by Accel and Elevation Capital in 2025 (YourStory). Its team built the data pipeline described below in-house rather than relying on a third-party charting backend.
Let’s walk through this journey in simple terms.
1) Getting Data from the Exchange – The Fastest Way Possible
Sahi receives market data directly from stock exchanges through dedicated fiber lines.
Think of this as a private highway instead of public roads.
- No internet congestion
- No middlemen
- No delays from third parties
As soon as a trade happens on the exchange, Sahi gets that update almost instantly.
2) Making All Data Speak the Same Language
Different exchanges send data in different formats.
Sahi runs small programs (called adaptors) that:
- Read raw exchange data
- Convert it into a common internal format
So downstream systems don’t waste time figuring out “what exchange sent this”: everything looks identical.
This saves precious milliseconds.
3) Two Parallel Paths: Live Prices & Historical Candles
Once normalized, the data splits into two paths:
A) Live Tick Path (For Instant Updates)
Used for:
- Last traded price
- Real-time chart movement
- Live quotes
These updates go straight to Sahi’s feed servers and then to your app over WebSocket.
No database in between.
Why?
Because writing every single tick to a database first would slow things down.
This is why live charts on Sahi feel “alive”.
B) Aggregated Data Path (For Candles & History)
Raw ticks are also sent to another system that:
- Groups thousands of trades
- Builds candles like:
- 5-second
- 1-minute
- 5-minute
- 1-hour
Instead of storing every trade, Sahi stores summaries:
Open, High, Low, Close, Volume
These summaries are what most charts actually use.
Live tick path vs aggregated candle path in the Sahi stock market data pipeline
| Live tick path | Aggregated candle path | |
|---|---|---|
| Purpose | Last traded price, quotes, the forming candle | Historical candles for charts and indicators |
| Storage | None (in memory, streamed) | ScyllaDB, in time-based chunks |
| Delivery | WebSocket push to the app | Candles API on request |
| Granularity | Every tick | 5-second, 1-minute, 5-minute, 1-hour |
| Optimised for | Lowest delay | Fast reads of long histories |
4) Why Sahi Stores Candles Instead of Raw Ticks
Imagine this:
- A liquid stock can generate millions of trades per day
- Storing all of them forever is expensive and unnecessary
Most traders care about:
- Price movement over time
- Candles
- Trends
So Sahi stores:
- Aggregated candles: stored
- Every raw tick: not stored long term
This keeps the system fast and efficient.
Change the number of symbols and the tick rate to see why storing candles instead of every tick keeps a charting backend fast.
Rows written per trading day. NSE equity and F&O trade from 9:15 am to 3:30 pm, which is 375 minutes. Tick rates vary widely: a liquid index option can tick many times a second while an illiquid stock may not trade for minutes.
5) Why Sahi Uses ScyllaDB
ScyllaDB is the database used to store candle data.
In simple words, Sahi chose ScyllaDB because it is:
Extremely Fast
It can handle millions of writes per second.
Perfect for constantly receiving fresh candles.
Built for Time-Series Data
Candles are time-based (every minute, every hour, etc.).
ScyllaDB is designed for exactly this type of workload.
Scales Easily
If data grows:
- Add more servers
- Capacity increases linearly
No need for painful migrations.
Always Available
Data is automatically replicated across machines.
If one server fails, others keep serving.
ScyllaDB is designed to be compatible with Apache Cassandra (same data model and query language), and its own guidance for time-series data is to split data into time-based buckets, for example by day or hour, so that partitions stay small and reads and writes are spread evenly across the cluster (ScyllaDB). That is exactly the “time-based chunks” approach Sahi uses in the next section.
6) How Sahi Handles Huge Amounts of Data Without Slowing Down
Instead of putting all history of a stock in one giant bucket, Sahi:
- Breaks data into time-based chunks
- Example:
- One chunk for Jan-Mar
- Another for Apr-Jun
So when you open a chart:
- Only the relevant chunks are read
- Not the entire lifetime of the stock
This keeps chart loading fast even for decades of data.
7) What Happens When You Open a Chart
- App asks for historical candles
- Candles API fetches from ScyllaDB
- Data is sent back in milliseconds
- Live ticks start streaming
- Chart updates instantly
To you, it feels instant.
8) Why This Architecture Matters for Traders
Because speed changes outcomes.
- Faster charts mean better entries
- No lag means no stale prices
- Smooth scrolling means better analysis
Instead of relying on generic third-party systems, Sahi built everything specifically for trading speed.
In One Sentence
Sahi streams live prices directly to your screen for zero delay, stores only smartly aggregated candle data in ScyllaDB for lightning-fast history, and designs every layer to remove unnecessary waiting.
That’s why when markets move fast, Sahi keeps up.
What this means for you as a trader
- The forming candle comes from the live path. Until a candle closes, what you see is built from streaming ticks; the stored version appears once the candle completes.
- Historical tick-by-tick data is not something to expect. Because raw ticks are not stored long term, backtests on Sahi charts use candles. If you need tick history, use a dedicated tick data vendor or record ticks yourself.
- Short timeframes are cheap to load. Time-based chunks mean zooming into a recent 1-minute chart reads only a small slice of data.
If you want to build a similar pipeline yourself, start with our WebSocket tutorial for traders and storing WebSocket tick data in ClickHouse. To see the other direction of the journey (your order going to the exchange), read how a Zerodha order reaches the exchange.
Frequently Asked Questions
Where does Sahi stock market data come from?
Directly from the exchanges (NSE and BSE) over dedicated fibre lines. The raw feeds are normalised by adaptors before being streamed to the app.
Why does Sahi store candles instead of every tick?
A liquid stock can produce millions of trades a day. Storing aggregated OHLCV candles is far cheaper and faster to query, and candles are what most charts and indicators use.
What database does Sahi use for stock market data?
ScyllaDB stores the aggregated candle data. Live ticks are not written to a database first; they go straight from feed servers to the app over WebSocket.
Who runs the Sahi trading app?
Sahi is operated by Aaritya Broking Private Limited, a broker on NSE and BSE, founded by Dale Vaz and Manish Jain. As with any broker, you can confirm its registration on the SEBI and exchange websites before opening an account.
Learn by watching: free videos every week
Market Profile, order flow, Python, AI and OpenAlgo tutorials on YouTube.
