Skip to content

MngAddRoute

Creates a route and atomically publishes a new snapshot. Requires SESSION_ADMIN.

HTTP: POST /routing/route

{
  "command":"MngAddRoute",
  "name":"Large EURUSD",
  "description":"Virtual Dealer and Gateway execution",
  "priority":100,
  "enabled":true,
  "conditions":{
    "operation":"OPEN",
    "group_mask":"real*",
    "symbol_mask":"EURUSD",
    "login":0,
    "cmd":-1,
    "reason":-1,
    "volume_min":10000,
    "volume_max":0
  },
  "steps":[
    {"position":0,"target":"VIRTUAL_DEALER","timeout_ms":3000,"virtual_dealer_policy_id":3},
    {"position":1,"target":"GATEWAY","timeout_ms":5000,"gateway_id":1},
    {"position":2,"target":"INTERNAL"}
  ]
}
{"route":{"id":12,"name":"Large EURUSD","priority":100,"enabled":true,"conditions":{},"steps":[]}}

The response contains the complete persisted route. Unknown operation or target names are rejected instead of being converted to defaults.

GATEWAY requires an existing configured gateway_id and a positive timeout_ms when another step follows it. The usual execution chain ends with INTERNAL, which records the operation in Core after the LP reports EXECUTED. Unsupported symbols, an unavailable Gateway, transport errors, and timeout advance to the next step; an explicit LP rejection terminates the operation.