← All articles
Architecture

MT5 Gray Label Architecture: Define the System Boundaries

An MT5 gray label architecture should show responsibilities as well as connections. A box marked CRM and a line to a trading platform do not explain which system starts an action, what information crosses the boundary, or who investigates a failure. Begin with those questions before discussing implementation.

MT5 gray label architecture (photo)
MT5 gray label architecture

Assign a job to each component

Describe the purpose of the website, client records, trading platform, and reporting tools in your proposed operation. A component should have a reason to exist in the workflow. If two systems appear to own the same piece of information, identify which one is authoritative for each use rather than allowing the ambiguity to reach implementation.

Describe the information crossing a boundary

For each connection, list the initiating action, required fields, expected result, and permissions. Distinguish a request from a confirmed outcome. Ask what the receiving system returns and where staff can see the current state. This description is more useful for scoping than a diagram that simply promises everything will be connected.

Confirm platform-specific access

MetaTrader 5 describes its Manager API as a way to develop administration and management utilities. That general capability does not confirm access in a particular commercial setup. Verify the permissions, provider approvals, and implementation scope for the selected offer. Optional CRM integration and API access are available at additional cost in the listings here.

Add ownership to the diagram

Place an operational owner beside every system and a coordination owner beside every cross-system workflow. Note how a failure is escalated when more than one provider is involved. The result should be an architecture your business and technical teams can discuss together, with open dependencies visible before implementation begins.

A reference architecture in five boundaries

A gray label deployment is easiest to reason about as five boundaries: the trading platform environment, the broker’s client-facing layer (website and portal), the back office (CRM and reporting), the payment layer and the liquidity or pricing layer. Each boundary has an owner, an interface and a failure mode, and most design problems come from leaving one of those three undefined.

Draw the boundaries as boxes and the interfaces as labelled arrows. For each arrow write what crosses it (identity data, balance operations, quotes, payment status), in which direction, how often and under whose credentials. The diagram will usually expose at least one arrow nobody owns.

Interface contracts

InterfaceDirectionPayloadOwnerFailure behaviour
Portal to CRMPortal to CRMRegistration, documents, statusBrokerQueue and retry
CRM to platformCRM to platformAccount creation, group assignment, balance operationsBroker and providerIdempotent retry, alert
Platform to CRMPlatform to CRMBalances, positions, trade historyProviderDelayed sync flagged
Payments to CRMPayments to CRMTransaction statusPayment providerReconcile daily
Liquidity to platformLiquidity to platformQuotes and executionsProvider or brokerFailover route

Treat each row as a contract that has to be tested, versioned and owned. An interface that exists only as a conversation will break the first time someone changes a field.

Identity and keys across boundaries

Every boundary needs an identity model. The CRM should authenticate to the platform with a dedicated service identity, not a staff account. Staff identities should be separate from service identities, and both should be separate from client identities. Credentials for each live in a secrets store and are rotated on a schedule and on staff change.

Keep a register of which identity can perform which operation on which boundary. When an operation is not on the register, it should fail. The register is also the first thing an auditor or a partner’s security review will ask for.

Capacity and limits as architecture inputs

Limits on logins, groups, symbols and API usage are architectural constraints, not commercial footnotes. Put them on the diagram. If the CRM provisions an account for every registration, including demo and test, the login limit may be reached by the registration funnel long before it is reached by real clients.

Model the flow rates: registrations per day, provisioning calls per minute at peak, report refreshes per hour. Compare them with the provider’s stated limits and note the first limit you would hit. That limit is the one to discuss with the provider before launch.

Failure domains and observability

For each boundary, decide what happens when it is unavailable and who is told. A portal outage, a CRM outage and a platform outage have different client impact and different recovery paths. Define a degraded mode for each, such as queueing registrations while provisioning is down.

Add observability to the interfaces: request counts, error rates, latency and queue depth, with alerts on thresholds. See our Manager API guide for the platform connection in more detail.

Worked example: tracing one registration

Trace a single registration through the diagram to validate it. A visitor submits the form on the portal; the portal writes a lead and registration event to the CRM with a correlation identifier. The CRM sets state to documents pending, notifies the client and queues a reviewer task. After approval, the CRM calls the provisioning workflow, which sends a create-account request with the client reference and group to the platform and waits for the login in the response.

The CRM stores the login against the client record, sends credentials through the notification service and emits an account-created event. At each hop, ask three questions: what is the contract, what happens on failure and who is alerted? Any hop where the answer is "nobody" becomes a work item. A trace like this takes an hour and usually finds two or three undefined behaviours.

Environments and promotion

Architecture includes environments. Define at least production and staging, with staging mirroring production configuration and using test credentials, test payment sandboxes and non-client data. Define how configuration moves from staging to production: exported, reviewed, applied in a change window and verified.

Keep an environment register listing endpoints, credentials owners and differences from production. Differences that are not recorded become the explanation for "it worked in staging".

Review checklist for an architecture diagram

Before the diagram is accepted, review it against a short checklist. Every box has a named owner and an on-call route. Every arrow has a labelled payload, direction, frequency and authentication method. Every stateful component has a backup and a restore test. Every external dependency has a documented failure behaviour and a degraded mode. Every limit imposed by a provider is annotated next to the component it constrains.

Periodically re-run the review. Architectures drift as quick fixes accumulate: a script that reads the platform directly, a spreadsheet that becomes a data source, a shared credential that was meant to be temporary. Each of these is an interface that was never drawn, and the review is the mechanism that brings it back onto the diagram where it can be owned and tested.

Frequently asked questions

What are the main components of a gray label architecture?

The platform environment, the client-facing layer, the back office, the payment layer and the liquidity or pricing layer, connected by defined interfaces.

Who owns the interfaces?

Each should have a named owner on the broker side and a counterpart at the vendor or provider. Record both.

Which limits matter most architecturally?

Logins, groups, symbols and API rates, because they bound provisioning, reporting and growth.

How do I test the architecture before launch?

Run end-to-end acceptance cases across every interface, including failure injection and reconciliation checks.

Sources: MetaTrader 5: broker platform and APIs

Talk through your setup

Bring your questions about MT5 setup, gray label scope and cost. Email info@mt5graylabel.net, message +91 88816 58480 on WhatsApp, or reach @xacfx on Telegram.