Talk to Us +91 98847 45599

AlphaSync · Technical architecture

AlphaSync Architecture

From market data to strategy execution, AlphaSync is structured as a modular trading technology platform with dedicated layers for data, intelligence, risk, execution and analytics.

Status
In production
Markets
NSE · BSE · cash equity and F&O
Core stack
React · TypeScript · Python · FastAPI · MySQL · WebSockets
Brokers
Five, through official APIs

01 · System overview

One pipeline, with the risk engine in the path.

Data enters at the top and results leave at the bottom. Every stage is a separate component with a defined interface, and all of them share the same platform services.

Figure 1 · AlphaSync system architecture

  1. Market dataLive NSE and BSE prices from broker market-data interfaces
  2. Data processingValidated and normalised into one internal format
  3. Strategy engineOne strategy definition for backtest, paper and live
  4. Risk engineEvery intended order is checked here. No other path to a broker
  5. Order managementOrder creation, validation and status tracking
  6. Execution & broker connectivityOne adapter per broker, official APIs, the user’s own account
  7. Positions & portfolioPositions and P&L across accounts
  8. Analytics & reportingEvery signal, order and fill recorded and reported
Eight stages, read top to bottom: market data, data processing, the strategy engine, the risk engine, order management, execution and broker connectivity, positions and portfolio, and analytics and reporting. The risk engine is the enforcement point: no strategy can reach a broker without passing it. On the right, the platform services that every stage uses: authentication, user-level permissions, the FastAPI API layer, the MySQL database, logging, monitoring and the audit trail.

02 · Platform layers

Seven layers, each with one job.

Separating the platform into layers keeps each concern in one place. A change to how a broker responds, for example, is contained in the execution layer and does not reach strategy code.

L1PresentationWeb interface for dense, real-time information
  • React
  • TypeScript
  • Android monitor app
L2API / applicationEvery client request enters here
  • FastAPI
  • Python
L3Trading intelligenceWhere strategies are defined, tested and run
  • Strategy builder
  • Indicators
  • Python strategies
  • Backtesting
  • Paper trading
  • Signal generation
L4RiskLimits set by the user, enforced by the platform
  • Stop-loss
  • Position sizing
  • Daily loss limit
  • Margin cap
  • Order-rate limits
  • Kill switch
L5ExecutionFrom an approved order to a broker and back
  • Order management
  • Broker adapters
  • Position tracking
L6DataLogical domains of the system of record
  • Market data
  • Orders & fills
  • Strategies
  • Users & accounts
  • Analytics
L7InfrastructureWhat every layer depends on
  • MySQL
  • Logging
  • Monitoring
  • Access control

03 · Market data flow

Data quality comes first.

A trading system can only be as sound as the data it acts on. Inconsistent prices or timestamps become wrong decisions, so data is normalised early and treated as a first-class part of the architecture. When data is lost, the platform stops acting on it and tells the user.

Figure 2 · Market data flow

  1. Market data sourceLive NSE and BSE prices arrive through broker market-data interfaces: streaming where the broker offers it, polling where it offers only request-based access.
  2. IngestionEach broker’s feed is received by its own adapter, so no downstream component depends on one broker’s format.
  3. ValidationIncoming data is designed to be checked for gaps, staleness and ordering before anything acts on it.
  4. NormalisationData is converted into one internal format, so every component sees the same instrument, the same timestamp and the same price.
  5. ProcessingIndicators and derived values are calculated from the normalised stream.
  6. Strategy consumptionStrategies evaluate the same data in the same way in backtesting, paper trading and live.
  7. Risk evaluationAny order a strategy intends is checked against the user’s limits.
  8. Execution decisionOnly approved orders proceed to order management and the broker.
  9. AnalyticsSignals, orders and fills are recorded, which feeds reporting and the audit trail.
Nine steps from the market-data source to analytics: ingestion by broker adapter, validation, normalisation into one internal format, processing, strategy consumption, risk evaluation, the execution decision, and analytics, which records every signal, order and fill. No latency figures are given, because they depend on the broker and the deployment.

04 · Strategy engine

Define once. Test, validate and run the same definition.

The core design decision in AlphaSync is continuity: the strategy that is backtested is exactly the strategy that is paper traded and then traded live. There is no rewrite between stages, so validation applies to what actually trades.

A strategy only reaches live capital after it has been tested on history and validated on live prices.

  • Indicator-based rulesEntry and exit conditions from indicators such as RSI, MACD, Bollinger Bands and EMA, plus price action and time filters.
  • Visual strategy builderRules assembled without code.
  • Python for custom logicStrategies written in Python run through the same backtest, paper and live pipeline.
  • Signal generationStrategies emit signals; they never place orders themselves.
  • BacktestingHistorical NSE and BSE data, with reports on CAGR, Sharpe ratio, maximum drawdown, win rate and trade-by-trade P&L.
  • Parameters and variantsParameters are configurable, and variants are compared side by side.
  • Paper tradingLive prices, simulated orders, no capital at risk.

05 · Risk engine

In the path, not beside it.

No component can place an order without passing the risk engine. That is what makes limits enforceable rather than advisory. Limits are set by the user and enforced by AlphaSync between strategy and execution.

Figure 3 · Order validation by the risk engine

  1. 01Strategy signalAn intended order
  2. 02Risk engineChecks every limit
  3. 03ApprovedContinues to order management
  4. 04RejectedStopped and recorded
A strategy signal becomes an intended order, which the risk engine checks against every applicable limit. An approved order continues to order management; a rejected order is stopped and recorded. There is no route from a strategy to a broker that bypasses this check.
Risk controls enforced by AlphaSync
ScopeControl
Per tradeStop-loss · position sizing
Per dayMaximum-loss limit
Per accountMargin utilisation cap
Order flowOrder-rate limits
EmergencyKill switch that halts all live orders
RecordSignals, orders and fills logged for review

06 · Order management & execution

An order is a lifecycle, not a message.

Once an order leaves the platform, its true state is held by the broker. The design rule is never to assume a state that has not been confirmed.

Figure 4 · Order lifecycle

  1. Strategy signalThe strategy expresses an intended trade.
  2. Risk validationThe risk engine applies the user’s limits. Rejected orders stop here.
  3. Order creationAn approved order is created, and its state is tracked from this point on.
  4. Order validationThe order is shaped to the broker’s rules for order types and sessions by that broker’s adapter.
  5. Broker APIThe order is sent through the broker’s official API to the user’s own account.
  6. Order statusAcknowledgements, rejections and updates from the broker are tracked.
  7. Execution confirmationFills are recorded as the broker reports them.
  8. Position updatePositions and P&L are designed to update from confirmed executions.
Eight steps: the strategy signal, risk validation, order creation, order validation by the broker adapter, the broker API, order status tracking, execution confirmation and the position update. Every step is recorded, which forms the execution audit trail.
  • Status managementEach order’s state is tracked from creation to final status.
  • Error handlingWhen a connection or response is lost, the platform stops acting and reports to the user rather than guessing.
  • Retry where applicableAny resubmission is designed to follow a confirmed order status, never a timeout alone.
  • ReconciliationPositions are designed to be checked against broker-reported state.
  • Execution audit trailSignals, orders and fills are recorded for review.

07 · Broker connectivity

Every broker behind its own adapter.

Brokers differ in order types, sessions, responses and how they deliver market data. Isolating each one behind a controlled integration layer keeps those differences in one place, and lets new brokers be added without changing strategies.

Figure 5 · Broker connectivity

  1. 01AlphaSyncStrategy, risk and order management
  2. 02Broker connectivity layerOne adapter per broker
  3. 03Broker APIOfficial broker interface
  4. 04ExchangeNSE · BSE, via the broker
AlphaSync reaches the market only through brokers. Its broker connectivity layer holds one adapter per broker, which talks to that broker’s official API, and the broker routes orders to the exchange. Endpoints and credentials are not published.

Connected brokers

  • Zerodha
  • Alice Blue
  • IIFL
  • Zebu
  • BNR

Connections go to the user’s own broker account. Funds stay with the broker.

  • AuthenticationEach broker connection is authorised by the account holder.
  • API credentialsHeld server-side, never in front-end code.
  • Request validationOrders are shaped to each broker’s rules before they are sent.
  • Order routingApproved orders go to the right account through the right adapter.
  • Order statusBroker responses and updates are tracked per order.
  • Position synchronisationPositions are designed to follow broker-reported state.
  • Failure handlingA lost connection stops trading activity and alerts the user.
  • Multiple accountsSeveral accounts can be managed from one interface.

08 · Security architecture

Security surrounds every layer.

Security in AlphaSync is not a component in the pipeline. It is a set of controls that apply to every layer, from the interface to the data. How we approach technology and security.

Figure 6 · Security as a cross-cutting concern

  1. PresentationReact web interface and Android monitor app
  2. API layerFastAPI services: the only entry point
  3. Domain servicesStrategy, risk, orders, portfolio, analytics, administration
  4. Risk & executionThe enforcement point and broker adapters
  5. DataMySQL system of record
Five platform layers on the left, from presentation to data. On the right, the controls that span all of them: identity, role-based access, API security, secrets management, encryption, audit trails, logging, monitoring and network controls. Encryption at rest and network controls depend on the deployment.

09 · Database architecture

Relational, by default.

MySQL is the system of record. A relational model keeps orders, fills, positions and the audit trail consistent with each other, which matters more in trading than raw write speed.

Figure 7 · Logical data domains

Identity & access

  • Users
  • Accounts
  • Permissions

Trading

  • Orders
  • Trades & fills
  • Positions

Strategy & risk

  • Strategies
  • Backtest results
  • Risk parameters

Records

  • Configurations
  • Audit events
  • Reports
MySQLRelational system of record for all four domains
A logical view, not a physical schema. Four domains: identity and access (users, accounts, permissions); trading (orders, trades and fills, positions); strategy and risk (strategies, backtest results, risk parameters); and records (configurations, audit events, reports). All four are held in MySQL as the relational system of record. Table structures are not published.

10 · Real-time communication

Pushed, not polled.

The browser keeps an open WebSocket connection, so the interface can update as events happen instead of repeatedly asking the server. Where a broker offers only request-based data, the platform polls that broker and passes updates on through the same channel.

Figure 8 · Real-time path to the browser

  1. 01Backend servicesMarket data, orders, positions, alerts
  2. 02WebSocket layerPersistent connection to each client
  3. 03React clientUpdates the interface as events arrive
Backend services publish events to a WebSocket layer, which pushes them to the React client over a persistent connection. The events are of the kind a trader watches: market prices, order status, positions, P&L and alerts. No latency figures are given, because they depend on the broker, the network and the deployment.
  • Market prices
  • Order status
  • Positions
  • P&L
  • Alerts
  • System events

11 · Observability

Visible while it runs, explainable afterwards.

Every service emits logs and metrics and reports its health. Monitoring turns these into a picture of the running platform, and alerts reach the people who need to act. Users receive their own alerts for prices, triggers and fills.

Figure 9 · Observability pipeline

  1. 01Services
  2. 02Logs
  3. 03Metrics
  4. 04Health checks
  5. 05Monitoring
  6. 06AlertsIn-app · email · Telegram
  7. 07Operations
Services produce logs, metrics and health checks, which feed monitoring. Monitoring raises alerts, which reach operations. User-facing alerts are delivered by in-app notice, email or Telegram.

Incident detection

Problems are seen as they start.

Debugging

Logs show the sequence of events.

Performance analysis

Measured, not guessed.

Operational visibility

One view of platform state.

Auditability

A record of what happened, and why.

12 · Deployment architecture

From reviewed code to a monitored service.

A high-level view of how a change reaches production. Tools, hosting and infrastructure details vary by deployment and are not published.

Figure 10 · Deployment path

  1. DeveloperChanges are made with typed interfaces and automated tests.
  2. Source repositoryEvery change is code-reviewed before it is merged.
  3. Build & testAutomated tests run on each change.
  4. Container imagesServices are packaged as container images where applicable, so every environment runs the same build.
  5. Deployment environmentSeparate from development and testing, with its own configuration and credentials.
  6. Application servicesAPI, domain services and broker adapters.
  7. Database & supporting servicesMySQL and any services the deployment requires.
  8. MonitoringHealth, logs and alerts from the moment services start.
Eight steps: the developer, the source repository with code review, build and test, container images where applicable, a separate deployment environment, the application services, the database and supporting services, and monitoring from start-up.

13 · Resilience & failure handling

When in doubt, stop and report.

Failures are designed to be safe. The platform does not guess when data or a connection is lost; it stops acting and tells the user. The kill switch halts all live orders at once. No system can promise zero downtime, and this one does not.

Failure handling in AlphaSync
FailureDetectionResponseOutcome
Market data failureMissing or stale dataStrategies stop acting on the affected data; the user is alertedSafe state: no orders placed on bad data
Broker API failureRejected, failed or unanswered requestStop and report; any recovery follows the confirmed order statusOrder and position state reconciled with the broker
Database failureFailed writes or health checkRecovery according to the deployment’s documented procedureService restored to a consistent state
Service failureHealth checkRestart or recovery where configuredService back in operation, with the event logged
Network failureLost connectionStop, report, then a controlled reconnectionTrading resumes only on confirmed state

14 · Data & event flow

From the user to the data, and back.

The full request path in one view. Each tier is designed to talk only to the tier next to it, which keeps responsibilities separate and failures contained.

Figure 11 · Data and event flow

User

Trader or operator

Client

React application

API

FastAPI API layer

Domain services

Strategy
Risk
Orders
Portfolio
Analytics
Administration

Data & integration

MySQL
Market data
Broker APIs
Supporting services

Observability

Logs
Metrics
Audit
Alerts
Six tiers, top to bottom. A user works in the React application, which calls the FastAPI API layer. The API layer calls the domain services: strategy, risk, orders, portfolio, analytics and administration. These use the data and integration tier: MySQL, market data, broker APIs and any supporting services the deployment requires. Observability (logs, metrics, audit and alerts) records activity across all tiers.

15 · Technical design principles

Ten rules the architecture follows.

Modular architecture

Components with defined interfaces, replaceable one at a time.

Separation of concerns

Strategy, risk, execution and data each live in one place.

Security by design

Controls are part of the architecture, not added later.

Least-privilege access

Every user and service gets only what its job needs.

Observable services

Every service reports its logs, metrics and health.

Controlled execution

No order reaches a broker without passing the risk engine.

Data integrity

One normalised format and one relational system of record.

Failure isolation

A fault in one broker adapter or service is contained there.

Auditability

Signals, orders and fills are recorded for review.

Extensibility

New brokers and strategies are added without changing the rest.

Architecture note. Architecture and deployment configurations may vary according to product version, customer requirements, broker integrations, infrastructure configuration and operating environment. The diagrams show the logical architecture; not every deployment uses every component shown. AlphaSync is trading technology, not investment advice. Vianmax™ is not a SEBI-registered investment adviser, research analyst or stock broker.

Explore the platform.

See AlphaSync with your own strategies, or ask the engineering team a technical question.

info@vianmax.com+91 98847 45599