EXCOIN / DECISION GUIDE

How to design a trading platform architecture

A trading platform must connect a responsive interface with accurate order state, dependable data and the ability to explain every decision. Start the architecture with the operation lifecycle.

01 / ENGINEERINGCS · EN · ES
01 / 08

Define the product and order lifecycle

First establish whom the platform serves and which steps it actually performs. An information terminal, an order-entry product and a system routing instructions to a counterparty have different boundaries. Trace the path from price display through entry, checks, submission, acknowledgement, partial fill, amendment, cancellation and settlement or export. For each state name who can create it and who confirms its finality. Accepted does not necessarily mean executed. Users and support staff must see the distinction, and the owner of the trading process must confirm its meaning. Include the case where the connection fails while the order's outcome remains unknown.

Document rules for order types, validity, currency, quantity, rounding and correction. Specific capabilities and regulatory obligations depend on the product, market and jurisdiction; they cannot be inferred from a general technical guide. Decide whether the platform owns portfolio, available balance and internal journal or merely reads them from another system. One operation may remain active in several systems at once. It therefore needs a stable identifier and explainable state, not just the most recent message shown in a browser. Name who can resolve a disagreement between the internal view and the counterparty.

02 / 08

Separate market data from trade decisions

A price feed has its own source, licence, frequency, timestamps and rules for delayed or invalid data. Users need to know whether a displayed price is current or delayed. Define what happens during feed loss: stop order entry, show a clearly marked last known value or switch sources according to an approved rule. Do not treat what a browser happened to render as the commercial truth. The data service should detect duplicates, ordering errors, missing intervals and suspicious changes that may signal bad input. Give each quality warning an owner and a decision about whether the value can still be used.

Historical chart data and data used for a decision may come from different sources or have different accuracy needs. Where the product requires explanation, record the source and time of a relevant value at a consequential action. With several providers, define switching and disagreement rules. Supplier licences may limit storing or displaying data; check the contract before designing a cache. Test a sudden jump, interruption and late correction. A smooth chart must not conceal missing or estimated values. Expose uncertainty in a way users can understand rather than masking it through visual continuity.

03 / 08

Give pretrade checks explicit ownership

Before submission identify the required checks: customer authority, instrument availability, quantity and value limits, valid parameters and perhaps sufficient cover. The exact list depends on the product and firm's responsibility. Distinguish a check in your system from a counterparty rule; success in the first does not guarantee acceptance by the second. Rejection state and reason should be understandable and traceable. Checks must not read different stale copies of the same limit without deciding which source is authoritative. Concurrent orders need particular attention to reservation of funds or capacity. Test whether two operations can both appear valid when only one should proceed.

Risk rules should be versioned and their changes approved according to impact. When an operator changes a limit, record who, why, when and which cases the change affects. Decide what happens when the check service fails: according to the chosen safety policy, stop or defer the action rather than silently bypassing protection. Test boundary values, currencies, validity times and repeated requests. A rule change can have greater commercial impact than a screen change, so it needs its own release and return procedure. Keep enough evidence to explain which version of a rule evaluated a particular order.

04 / 08

Build an integration layer that understands ordering and retries

A counterparty protocol may bring its own identifiers, sequences, acknowledgements and connection recovery. FIX Trading Community describes a FIX session as an ordered message stream with a way to resume; actual use depends on the connected party. Separate the domain state of an order from the technical state of the connection. A dropped socket does not automatically mean a rejected trade. After recovery, check which messages the other side received and in what order. Connecting a user action directly to one response without an internal record creates dangerous uncertainty at timeout. Define what support staff see during that uncertainty.

Every modifying operation should have a stable identifier so a retry after failure does not create another order. Microsoft's idempotent consumer pattern shows why repeated delivery need not produce repeated effects. Store relationships among internal ID, counterparty ID and state-change messages. Define how to handle late acknowledgement, duplicate fill and manual correction. An adapter should translate a protocol, not silently decide business meaning without an owner. If several counterparties are connected, map their differing states into a shared model while preserving original detail. Reconcile those mappings against observed messages before the interface is considered complete.

05 / 08

Make audit and reconciliation part of the flow

Retain the sequence needed to explain an order: initial instruction, accepted parameters, check result, outbound message, acknowledgement, fills and corrections. Audit records need time, source and a link to the case. Restrict access according to role and sensitivity. There is no need to copy all personal information into every technical log. Operators need to know what happened and the next step; an auditor needs evidence of a change and its approval. These views may use the same events without exposing the same detail. Verify that clock differences between systems do not make the sequence misleading.

Reconciliation compares internal state with counterparty records and, where relevant, settlement. Set frequency and tolerance for differences in quantity, amount or state. Exceptions must not disappear into an aggregate number. Each needs a responsible person, deadline and recorded correction. Pay special attention to orders with unknown outcomes, partial fills and changes after a close. Manual intervention should create a new traceable event instead of overwriting history. Test reconciliation with deliberately inconsistent cases rather than waiting for a live defect. Report how many discrepancies remain open and how long each has waited.

06 / 08

Measure performance along the whole journey

Set separate response expectations for displaying data, acknowledging an order and providing the final outcome. Time in the browser, internal queue and counterparty adds up, but different teams own each part. OpenTelemetry describes distributed traces that can follow an operation across services. Preserve correlation IDs and safely redacted diagnostic data. Watch percentiles, queue depth and cases of unknown state, not only an average. Improving one API response is of little value when later processing takes minutes without telling the user. Make the measured boundary and observation window explicit in any latency claim.

Test expected peaks, feed failure, counterparty slowdown, reconnect and simultaneous orders against the same limit. Under load, state and audit must remain correct; speed without correctness is no gain. Separate work that can wait from checks that must stop another action. Define queue limits and a plan for processing accumulated cases after recovery. Change capacity according to measurement rather than an impression of the architecture. The support view should show whether a problem concerns data, checks, connection or result processing. An incident rehearsal can reveal which metrics are missing.

07 / 08

Make releases reversible and operations explainable

Trial a change with a restricted user group, instrument or operation type when commercial rules allow. Define stopping conditions in advance: incorrect states, unexplained differences, rising rejections or delay. Returning to a previous version must account for data and orders created since deployment. Rehearse restoration and check that internal and counterparty identifiers can still be joined. Schedule releases outside critical periods where possible, but do not let low volume substitute for testing. Rule and adapter changes need named approvers. Keep a clear record of which version processed each order during a staged rollout.

A runbook should explain how to trace one order, distinguish disconnection from commercial rejection and escalate a discrepancy. Monitor feed quality, queue age, check outcomes, connection state and open exceptions. An alert without an agreed response is noise. During an incident preserve evidence and communicate a readable status to users. After recovery review the cause and add the relevant test. Architecture is ready only when a team outside the original implementation can operate it. Test this by having that team diagnose a simulated failure using the available views and instructions.

08 / 08

A checklist for the architecture decision

Before building, confirm product boundaries, order lifecycle, data owners, risk rules, integration contracts and market-data source. For every consequential operation describe unknown outcome, retry and reconciliation. Set correctness and response measures, test scenarios and cutover conditions. Begin with one route that can be verified from entry to recorded result. If the biggest uncertainty lies with a counterparty, test its real behavior first instead of building a broad internal interface around an unverified assumption. Keep the first milestone small enough to expose a wrong model early.

EXCOIN can design a particular platform or integration layer, but cannot promise latency, regulatory compliance or trading results without knowing the market, product and connected parties. A sound design has clear boundaries and demonstrates correctness on failed as well as successful orders. The first milestone should deliver a state model, data contracts, tests and one verified transaction path. Further scope follows measured performance and discovered exceptions. This lets investment rest on actual system behavior rather than a premature technology list. Record the assumptions that would require redesign if they prove false.

Sources

Discuss a project