Skip to content
Parth Parekh
STAGE 03SERVINGMARKET DATA PLANE
← ALL STAGES

The data API the whole desk reads

A distributor is only half the job — services need candles, history and quotes over an interface, with guarantees. This stage is the equity data service: REST and WebSocket, tiered caching, and a hard rule that a closed candle never changes underneath a consumer.

WHAT I BUILTSERVING

Built here.

  • 01

    A FastAPI service with REST and WebSocket surfaces for candles, quotes and instrument reference data across the NSE equity universe.

  • 02

    A candle-immutability guarantee: once an interval closes it is frozen, so two consumers asking the same question an hour apart get the same answer.

  • 03

    A tiered read path — local cache first, then the recent-tick store, then the warehouse, then the broker API — with an explicit fallback order rather than an accidental one.

  • 04

    A pooled broker-account layer so token limits and rate limits are handled centrally instead of being every caller's problem.

  • 05

    Symbol normalization and an instrument manager, because the same stock has a different identifier in every upstream dump.

  • 06

    Containerized deployment with health and cache-retention controls.

WHAT IT SURVIVESFAILURE MODES

Failure modes.

  • An upstream that is rate-limiting or unavailable, which degrades to the next tier instead of erroring the caller.
  • Cold start at the open, when the warmup universe has to be loaded before the first request arrives.
  • Cache growth, which is bounded by retention policy rather than by the disk filling up.

Research, dashboards and the order path all read one interface. When someone asks why a number differs between two screens, the answer is a cache tier, not a mystery.

STACKON THIS STAGE