ConnectorRoute

ConnectorRoute allows users to route trades over different ConnectorAccounts based on order tags. The priority is defined by the rkey in Connector. Each ConnectorRoute needs to hold valid values for, and only for, the fields defined in one of the active rkeys. ConnectorRoute has the following attributes and can be accessed via pending config or real-time config:
| attributes | required | default settings | attribute type | description |
|---|---|---|---|---|
| id | Y | 0 | INT | The ID of this route within the Connector. This ID does not determine routing priority. |
| connector | Y | 0 | INT | The ID of the Connector. |
| sec | C | n/a | VARCHAR | The security of the resolved request symbol to match, when sec is included in the selected routing key. |
| sym | C | n/a | VARCHAR | The resolved request symbol to match, when sym is included in the selected routing key. |
| acc | C | n/a | VARCHAR | The incoming account text to match when acc is included in the routing key. This is separate from the destination selected by target. |
| subid1 | C | n/a | VARCHAR | The subID as specified in OrderOpen. (tag 115 - MT4 / MT5 color). Note (MT4 Bridge configuration): acc=acc1 |acc2 sets subid1=acc2;acc=<acc> sets subid1=color |
| subid2 | C | n/a | VARCHAR | The subID as specified in OrderOpen. (tag 116 – MT4 group / MT5 group when source in PrimeXM Bridge). |
| subid3 | C | n/a | VARCHAR | The subID as specified in OrderOpen. (tag 526 – MT4 login / MT5 login when source in PrimeXM Bridge). |
| subid4 | C | n/a | VARCHAR | The subID as specified in OrderOpen. (tag 527 – MT4 ticket / MT5 order). |
| target | Y | 0 | INT | The ConnectorAccount on this Connector to which the matching order is routed. The selected account must still pass its trading checks. |
| description | N | n/a | VARCHAR | Free text. Not used for matching. |
All fields in the selected key must match together. Account and subID values are case-sensitive literals; * is not a wildcard for these values. Leave unused fields empty or n/a. Each route must fill exactly the fields of one routing key configured on the Connector and no others; a route whose filled fields correspond to none of the keys is rejected, as is a second route with the same values for the same key. sec and sym cannot appear in the same key.
If no routing key matches, XCore looks up the requested ConnectorAccount name. If that name is not found, fallback is available only when the Connector has one account. A trading-check failure after a route has selected an account does not cause XCore to try a lower-priority key.
The values carried in acc and subid1–subid4 depend on the adapter that receives the order. For PrimeXM FIX 4.4 they are tags 1 (Account), 115, 116, 526 and 527; for MT4 they are the account (or the first segment before |), the second account segment or the order color, the group, the login and the ticket. Other adapters can populate them differently. Missing incoming subIDs are normalized to n/a.