Skip to content
Ashwani Kumar
All work
Status: Delivered (employer)Professional experienceFlahmingo · 2021 – 2023

Event-driven trading and corporate actions

Go services for a retail investing app: order flow, execution events over Pub/Sub, and automated handling of splits, dividends and mergers.

Generalized from public profile information. The diagram shows the pattern, not Flahmingo's production topology.

Solution architecture

Scroll sideways to see the full diagram.

Order and event flow, simplifiedSynchronous APIs stay thin; execution and corporate-action events flow through Pub/Sub to independent consumers that update positions. Components: Mobile app, API layer, Order service, Brokerage partner, Redis, Pub/Sub topics, Corporate actions, Portfolio service, PostgreSQL.ordersexecutionsMobile appinvestorsAPI layerREST · GraphQL · JWTOrder serviceplacement · statusBrokerage partnerexecution · announcementsRedishot readsPub/Sub topicsorder & account eventsCorporate actionssplits · dividendsPortfolio servicepositions · cashPostgreSQLorders · positions
Synchronous APIs stay thin; execution and corporate-action events flow through Pub/Sub to independent consumers that update positions.
  • Service
  • Workflow
  • Data
  • External

The business problem

A retail brokerage app depends on a partner broker for execution. Orders, fills and account changes arrive asynchronously, and corporate actions — splits, dividends, mergers — change positions and cash outside of any user action.

What needed to be built

Event-driven services that process orders and execution events reliably, and an automated pipeline for applying corporate actions to customer accounts.

Engineering approach

Order processing needs to stay fast under market-open bursts, events must be processed reliably even when a consumer is down, and corporate actions have to be applied correctly to every affected account, every time.

  1. 01

    Publish order and execution events to Pub/Sub topics so independent consumers can process them, retry on failure and scale separately.

  2. 02

    Keep the order path lean: index and restructure the hot queries behind order placement and status, and cache frequently read data in Redis.

  3. 03

    Turn corporate-action handling into an automated service that consumes announcements and applies position and cash adjustments per account.

  4. 04

    Expose the product through JWT-secured REST and GraphQL APIs in Go.

What this means for your business

Replacing a manual, error-prone back-office task with an automated, event-driven pipeline is the core of business process automation — whether or not an LLM is involved.

Discuss a project like this