{
  "openapi": "3.0.1",
  "info": {
    "title": "JSON-Pure WebAPI for MT4/MT5",
    "description": "It uses native MetaQuote ManagerAPI for both MT4 and MT5 connection. Plus, it keep pumping connection active, so all *Get calls will run much faster, than *Request.<br/>Here partially used the idea of JSON-Pure API, only HTTP code 200 is acceptable. Other codes signal about errors on server side, which are out of control of client, like wrong parameters, platform unavailability, etc.",
    "version": "2.0"
  },
  "paths": {
    "/api/v2/MT4/{tradePlatform}/ServerTime": {
      "get": {
        "tags": [
          "MT4 v2 :: Common"
        ],
        "summary": "Get server time",
        "description": "Server time of the connected MT4 trade server.\r\n            \r\nSmoke-test endpoint exercising the v2 envelope. Returns current MT4\r\nserver time wrapped in ApiResponse<DateTime>.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateTimeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ManagerCommon": {
      "get": {
        "tags": [
          "MT4 v2 :: Common"
        ],
        "summary": "Get manager common settings",
        "description": "Server-wide MT4 trade server settings (curated subset).\r\n            \r\nReturns MT4Common DTO — server name, broker, server version/build,\r\ntime zone. Schema is decoupled from the wrapper's ConCommon: v2\r\nclients are protected from MetaQuotes schema changes.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4CommonApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestCommon": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Get common config (live)",
        "description": "Server-wide MT4 common configuration via the wrapper's `CfgRequestCommon` Manager-live read.\r\n            \r\nManager-live read (round-trip to MT4 server) — sibling of\r\n`ManagerCommon`. Returns the same curated `MT4Common` DTO\r\n(Name/Owner/Build/Version/TimeZone), but sourced via the\r\nconfiguration-system entry point rather than the manager-context one.\r\nPump cache is NOT consulted; data reflects the live server state.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4CommonApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateCommon": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update common config",
        "description": "Update server-wide common settings — Type 1 mutator.\r\n            \r\nManager (live) call. Reads the current `ConCommon` from the\r\nMT4 server, overlays the fields in `MT4CommonUpdate` onto it\r\n(secret-preservation: fields not in the DTO keep their server\r\nvalue), and writes the merged struct back via\r\n`CfgUpdateCommon`.\r\n            \r\nPreserved fields the DTO does not touch:\r\n<list type=\"bullet\"><item>Runtime counters (LastOrder, LastLogin, LostLogin,\r\n        optimization timestamps, overnight rollover state).</item><item>Protocol identity (ServerVersion, ServerBuild).</item><item>Bind / web address arrays (variable-length nested\r\n        collections — own endpoints planned).</item><item>Demo-account subsystem, paths, rollover/statement modes\r\n        (sensitive admin areas with separate endpoints).</item></list>\r\n            \r\nWine x64 safe: wrapper uses `cpp.AllocSafe()` (single struct\r\npack, no UnpackObject loop). Idempotency-Key strongly recommended\r\n— overwriting common settings affects every connected client.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields. Omitted fields keep their server value.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4CommonUpdate"
                  }
                ],
                "description": "v2 Type 1 mutator DTO for MT4 server-wide common settings. Curated\r\nsubset of the wrapper's `ConCommon` struct — exposes the fields\r\nmost likely to need adjustment from a SaaS surface while leaving\r\nruntime counters, derived state, and the wrapper's internal arrays\r\nto the secret-preservation overlay on the controller side."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4CommonUpdate"
                  }
                ],
                "description": "v2 Type 1 mutator DTO for MT4 server-wide common settings. Curated\r\nsubset of the wrapper's `ConCommon` struct — exposes the fields\r\nmost likely to need adjustment from a SaaS surface while leaving\r\nruntime counters, derived state, and the wrapper's internal arrays\r\nto the secret-preservation overlay on the controller side."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4CommonUpdate"
                  }
                ],
                "description": "v2 Type 1 mutator DTO for MT4 server-wide common settings. Curated\r\nsubset of the wrapper's `ConCommon` struct — exposes the fields\r\nmost likely to need adjustment from a SaaS surface while leaving\r\nruntime counters, derived state, and the wrapper's internal arrays\r\nto the secret-preservation overlay on the controller side."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4CommonUpdate"
                  }
                ],
                "description": "v2 Type 1 mutator DTO for MT4 server-wide common settings. Curated\r\nsubset of the wrapper's `ConCommon` struct — exposes the fields\r\nmost likely to need adjustment from a SaaS surface while leaving\r\nruntime counters, derived state, and the wrapper's internal arrays\r\nto the secret-preservation overlay on the controller side."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4CommonApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestHoliday": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List holiday config",
        "description": "All holiday-calendar entries configured on the MT4 server, paginated.\r\n            \r\nManager-live read (round-trip). Holidays describe trading-suspension\r\ndates per symbol or symbol-group. Each entry carries date components\r\n(Year/Month/Day), a work-time window (From/To, minutes from midnight,\r\nboth 0 for full closure), the affected Symbol (or \"All\"), a free-form\r\nDescription, and an Enable flag. Ordering: by (Year, Month, Day, From,\r\nSymbol) ascending so cursors are stable and unique. The cursor is an\r\nopaque base64 string produced by CursorCodec from the composite\r\n\"{YYYYMMDD * 10000 + From:D14}|{Symbol}\" key — the Symbol tiebreaker\r\ncovers the case where multiple holidays share date and From minute\r\n(per-symbol partial-day closures), guaranteeing pagination never drops\r\nrows even inside same-(date,From) clusters.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4HolidayListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestManager": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List manager configs",
        "description": "All MT4 manager-account configurations on the connected server, paginated by Login.\r\n            \r\nManager-live read (round-trip). Each entry surfaces the manager's\r\nLogin/Name/Groups/MailBox, the 19 boolean permission rights (Manager,\r\nMoney, Broker, Admin, Reports, Trades, MarketWatch, etc.), IP-filter\r\nrange, and InfoDepth. Internal wrapper fields (SecGroups, Unused,\r\nExpTime, Reserved) are dropped from the v2 contract.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ManagerRightsListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestTime": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Get access-hour matrix",
        "description": "Server access-hour matrix (per-hour 7×24 allow/deny grid) from the MT4 server's `ConTime` configuration.\r\n            \r\nManager-live read (round-trip). Returns `MT4ServerTime` with\r\na flat 168-element `AccessHours` array; each element is 0\r\n(denied) or 1 (allowed) for one hour of the week. Layout:\r\n`index = day*24 + hour`, day 0 = Sunday (MT4 convention).\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not surfaced.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ServerTimeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateTime": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update access-hour matrix",
        "description": "Update the 7×24 access-hour matrix — Type 1 mutator.\r\n            \r\nManager (live) call. Reads the current `ConTime`, replaces the\r\n168-hour access matrix with the supplied `AccessHours`, and\r\nwrites back. The wrapper's internal `DaysControl` (server\r\nhousekeeping) and `Reserved` (forward-compat padding) fields\r\nare preserved across the round-trip.\r\n            \r\n`AccessHours` must be exactly 168 entries long; index =\r\n`day * 24 + hour` with day 0 = Sunday. Each value is\r\n`0` (denied) or `1` (allowed) — any other value is\r\npassed through verbatim (the wrapper does not validate, and\r\nMT4 may treat anything non-zero as allowed depending on build).\r\n            \r\nEchoes the merged `MT4ServerTime` in the response.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement access matrix. `AccessHours.Length` must be 168.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ServerTime"
                  }
                ],
                "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ServerTime"
                  }
                ],
                "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ServerTime"
                  }
                ],
                "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ServerTime"
                  }
                ],
                "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ServerTimeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestAccess": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List IP firewall rules",
        "description": "All firewall (IP access) rules configured on the MT4 server, paginated.\r\n            \r\nManager-live read (round-trip). Each entry describes an IP range\r\n(IpFrom..IpTo, widened uint→long for JSON safety) with an Action\r\nflag and a free-form Comment. Ordering: by (IpFrom, IpTo) ascending.\r\nCursor is an opaque base64 string holding the composite key\r\n\"{IpFrom:D10}|{IpTo:D10}\" — D10 width matches uint range (max\r\n4_294_967_295 = 10 digits) so lexicographic compare matches\r\nnumeric compare, and the '|' delimiter cannot appear in IP values.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4AccessListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestBackup": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Get backup config",
        "description": "MT4 server backup configuration (full + archive + export schedules, watchdog HA pair settings).\r\n            \r\nManager-live read (round-trip). Returns the wrapper's ConBackup as\r\nMT4Backup DTO — full/archive/export schedule enums and paths, last\r\ncompletion timestamps, and HA-watchdog fields. The wrapper's\r\n`WatchPassword` (slave-server credential) is intentionally\r\ndropped from the v2 contract for security and is NOT present in\r\nthe response payload.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BackupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateBackup": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update backup config",
        "description": "Update server backup configuration — Type 1 mutator.\r\n            \r\nManager (live) call. Reads the current `ConBackup`, overlays\r\nthe fields in `MT4Backup` onto it, and writes back via\r\n`CfgUpdateBackup`. Two classes of preserved fields:\r\n<list type=\"bullet\"><item><b>Slave-server credential</b> — `WatchPassword` stays\r\n        whatever the wrapper read live. It is unreachable from the\r\n        v2 request body (DTO does not expose it).</item><item><b>Last-completion timestamps</b> — `FullBackupLastTime`,\r\n        `ArchiveLastTime`, `ExportLastTime`, `WatchTimestamp`.\r\n        Server-derived runtime state that clients must not overwrite.</item></list>\r\nEchoes the merged `MT4Backup` in the response.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement backup configuration. Server-derived timestamps and the watch password are preserved.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Backup"
                  }
                ],
                "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Backup"
                  }
                ],
                "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Backup"
                  }
                ],
                "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Backup"
                  }
                ],
                "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BackupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateSync": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update sync rule",
        "description": "Update a chart-history synchronization rule — Type 1 mutator.\r\n            \r\nManager (live) call. Sync configurations are paged on the read\r\nside (see `CfgRequestSync`); the v2 contract identifies a\r\nrule by the composite key `(Server, Login)`. Flow:\r\n<list type=\"number\"><item>Read the current list via `CfgRequestSync`.</item><item>Find the entry whose `(Server, Login)` matches the\r\n        body. Missing entry → NotFound envelope.</item><item>Apply DTO overlay onto the matched entry — the\r\n        replication credential (`Password`) carried by the\r\n        live struct is preserved.</item><item>Write the merged struct back.</item></list>\r\nEchoes the merged `MT4Sync` in the response.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Server`+`Login` identify the row.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Sync"
                  }
                ],
                "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Sync"
                  }
                ],
                "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Sync"
                  }
                ],
                "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Sync"
                  }
                ],
                "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SyncApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateFeeder": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update feeder config",
        "description": "Update a quote/news feeder configuration — Type 1 mutator.\r\n            \r\nManager (live) call. Feeder configurations are paged on the read\r\nside (see `CfgRequestFeeder`); the v2 contract identifies a\r\nfeeder by its `Name`. Same read-modify-write flow as\r\n`CfgUpdateSync`; the datafeed credential (`Password`)\r\nis preserved server-side.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Name` identifies the feeder.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Feeder"
                  }
                ],
                "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Feeder"
                  }
                ],
                "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Feeder"
                  }
                ],
                "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Feeder"
                  }
                ],
                "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4FeederApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateGatewayAccount": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update gateway account",
        "description": "Update an STP gateway-account entry — Type 1 mutator.\r\n            \r\nManager (live) call. Gateway-account entries are paged on the read\r\nside (see `CfgRequestGatewayAccount`); the v2 contract\r\nidentifies an entry by its stable internal `Id`. Flow:\r\n<list type=\"number\"><item>Read the current list via `CfgRequestGatewayAccount`.</item><item>Find the entry whose `Id` matches the body. Missing\r\n        entry → NotFound envelope.</item><item>Apply DTO overlay onto the matched entry — the STP MT4\r\n        credential (`Password`) carried by the live struct is\r\n        preserved.</item><item>Write the merged struct back.</item></list>\r\nEchoes the merged `MT4GatewayAccount` in the response.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Id` identifies the row.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayAccount"
                  }
                ],
                "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayAccount"
                  }
                ],
                "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayAccount"
                  }
                ],
                "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayAccount"
                  }
                ],
                "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayAccountApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateGatewayMarkup": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update gateway markup",
        "description": "Update a gateway markup rule — Type 1 mutator.\r\n            \r\nManager (live) call. Markup rules are paged on the read side (see\r\n`CfgRequestGatewayMarkup`); the v2 contract identifies a rule\r\nby the composite key `(Source, Symbol)` (same cursor key the\r\nread endpoint uses). Same read-modify-write flow as\r\n`CfgUpdateGatewayAccount`; the wrapper's 16-int reserved\r\npadding is preserved.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Source`+`Symbol` identify the row.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayMarkup"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayMarkup"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayMarkup"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayMarkup"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayMarkupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateGatewayRule": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update gateway rule",
        "description": "Update an STP gateway-rule entry — Type 1 mutator.\r\n            \r\nManager (live) call. Gateway rules are paged on the read side (see\r\n`CfgRequestGatewayRule`); the v2 contract identifies a rule\r\nby its public `Name`. Same read-modify-write flow; the two\r\nwrapper reserved padding blocks (`RequestRreserved` 32-int,\r\n`ExeReserved` 25-int) are preserved server-side.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Name` identifies the rule.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayRule"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayRule"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayRule"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GatewayRule"
                  }
                ],
                "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayRuleApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateLiveUpdate": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update LiveUpdate config",
        "description": "Update a LiveUpdate service configuration — Type 1 mutator.\r\n            \r\nManager (live) call. LiveUpdate entries are paged on the read side\r\n(see `CfgRequestLiveUpdate`); the v2 contract identifies an\r\nentry by its `Company` field (same cursor key the read\r\nendpoint uses). Flow: read live list → match by `Company` →\r\noverlay → write back. The 128-element `Files` descriptor\r\ntable and the runtime `Connections` counter are preserved\r\nserver-side.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Company` identifies the entry.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4LiveUpdate"
                  }
                ],
                "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4LiveUpdate"
                  }
                ],
                "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4LiveUpdate"
                  }
                ],
                "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4LiveUpdate"
                  }
                ],
                "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4LiveUpdateApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateManager": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update manager config",
        "description": "Update a manager-account configuration — Type 1 mutator.\r\n            \r\nManager (live) call. Manager-account entries are paged on the read\r\nside (see `CfgRequestManager`); the v2 contract identifies an\r\nentry by `Login`. Flow: read live list → match by Login →\r\noverlay (19 permission flags + IP filter + MailBox/Groups/InfoDepth)\r\n→ write back. The wrapper's `Name` (read-only — server sets\r\nit), `SecGroups` (32-entry permission table), `ExpTime`,\r\n`Unused`, and `Reserved` are preserved.\r\n<br>`IpFrom`/`IpTo` in the body are `long` (DTO widens\r\nthe wrapper's `uint` for safe JSON numerics) — values outside\r\n`[0, uint.MaxValue]` are rejected with\r\n`errorCode=Validation` before `ApplyTo`, to avoid a\r\nruntime `OverflowException` from Mapperly's checked cast.\r\n\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields; `Login` identifies the manager.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ManagerRights"
                  }
                ],
                "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ManagerRights"
                  }
                ],
                "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ManagerRights"
                  }
                ],
                "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ManagerRights"
                  }
                ],
                "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ManagerRightsApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateAccess/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update IP firewall rule",
        "description": "Update an IP firewall rule at a given list position — Type 1 mutator.\r\n            \r\nManager (live) call. The wrapper's `CfgUpdateAccess(cfg, pos)`\r\nsignature requires a position rather than a unique-key lookup (the\r\nrule table has no stable identifiers — multiple rules can carry the\r\nsame range/action/comment). The v2 endpoint exposes the position as\r\na route parameter; callers must read the current list via\r\n`CfgRequestAccess` first and pass the index of the row to\r\nupdate. Flow:\r\n<list type=\"number\"><item>Read the live list via `CfgRequestAccess`.</item><item>Bounds-check `pos` against the list length — out of\r\n        range yields a NotFound envelope.</item><item>Apply DTO overlay onto `list[pos]`.</item><item>Write back with `CfgUpdateAccess(merged, pos)`.</item></list>`IpFrom`/`IpTo` in the body must fit in `[0, uint.MaxValue]`\r\n— out-of-range values are rejected with `errorCode=Validation`\r\nbefore the Mapperly checked-narrowing cast can throw.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the firewall list",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement contents for the row at pos",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Access"
                  }
                ],
                "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Access"
                  }
                ],
                "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Access"
                  }
                ],
                "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Access"
                  }
                ],
                "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4AccessApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateDataServer/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update data-server entry",
        "description": "Update a DataServer (access-server) entry at a given list position — Type 1 mutator.\r\n            \r\nSame position-based read-modify-write pattern as\r\n`CfgUpdateAccess`. Preserves internal padding\r\n(`Reserved1`, `Reserved2`) and the `Next` pointer.\r\n`Loading`/`IpInternal` in the body must fit in\r\n`[0, uint.MaxValue]`.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the DataServer list",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement contents for the row at pos",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4DataServer"
                  }
                ],
                "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4DataServer"
                  }
                ],
                "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4DataServer"
                  }
                ],
                "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4DataServer"
                  }
                ],
                "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4DataServerApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateHoliday/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update holiday entry",
        "description": "Update a holiday-calendar entry at a given list position — Type 1 mutator.\r\n            \r\nPosition-based read-modify-write. The wrapper stores `Enable`\r\nas `int` (0/1) — the DTO surfaces it as `bool`; the\r\nmapper bridges with a `BoolToInt` helper. The 13-int\r\n`Reserved` padding and `Next` pointer are preserved.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the holiday list",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement contents for the row at pos",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Holiday"
                  }
                ],
                "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries)."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Holiday"
                  }
                ],
                "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries)."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Holiday"
                  }
                ],
                "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries)."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4Holiday"
                  }
                ],
                "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4HolidayApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateSymbolGroup/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Update symbol group",
        "description": "Update a symbol group at a given list position — Type 1 mutator.\r\n            \r\nPosition-based read-modify-write. `ConSymbolGroup` has no\r\nreserved padding or internal pointers, so the overlay is trivial.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the symbol-group list",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement contents for the row at pos",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolGroup"
                  }
                ],
                "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolGroup"
                  }
                ],
                "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolGroup"
                  }
                ],
                "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolGroup"
                  }
                ],
                "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolGroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestGatewayAccount": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List gateway accounts",
        "description": "All STP gateway-account configuration entries on the MT4 server, paginated by stable internal Id.\r\n            \r\nManager-live read (round-trip). Each entry describes an external\r\nMT4 server connection used for STP order routing: public Name, an\r\ninternal Id (stable identifier — used as the cursor key), the\r\nexternal server Login + Address, a NotifyLogins fixed-size array\r\nof 8 broker-side recipients, and a Flags bitmap. The wrapper's\r\n`Password` field (STP MT4 credential) is intentionally\r\nexcluded from the v2 contract.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayAccountListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestGatewayMarkup": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List gateway markups",
        "description": "All MT4 gateway-markup rules (per-symbol bid/ask spread adjustments applied to STP-routed quotes), paginated.\r\n            \r\nManager-live read (round-trip). Each entry maps an external Source\r\n(symbol/mask/group) onto a local Symbol with per-side pip markups\r\n(BidMarkup/AskMarkup). Ordering: by (Source, Symbol) ascending.\r\nCursor is an opaque base64 string holding the composite key\r\n\"{Source}|{Symbol}\" — MT4 symbol wildcards use `*` and `?`\r\n(not `|`), so the delimiter is safe.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayMarkupListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestGatewayRule": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List gateway rules",
        "description": "All MT4 gateway-rule entries (STP execution routing policies), paginated by Name.\r\n            \r\nManager-live read (round-trip). Each rule matches incoming orders\r\nby RequestSymbol + RequestGroup and routes them to a configured\r\nexecution gateway-account (ExeAccountName/ExeAccountId) with\r\nper-rule slippage and volume limits. Name is assumed unique\r\nwithin the rules table and serves as the cursor key.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GatewayRuleListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestDataServer": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List data servers",
        "description": "All MT4 access-server (data-server) entries advertised to clients for connection, paginated by Server name.\r\n            \r\nManager-live read (round-trip). Returns the broker-side advertised\r\nlist of connection endpoints — each entry: Server (host:port),\r\nIp, Description, IsProxy flag, Priority (0-7 base, 255 = idle),\r\nLoading (UINT_MAX = no reporting), IpInternal, IsWitness flag.\r\nInternal Reserved padding and the Next pointer chain are dropped.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4DataServerListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestFeeder": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List feeder configs",
        "description": "All quote/news feeder configurations on the MT4 server, paginated by Name.\r\n            \r\nManager-live read (round-trip). Each entry: Name, File (loader\r\npath), Server (upstream), Login, Keywords (news filter),\r\nEnable flag, DataFeedMode (quotes/news/both), connection timeouts\r\n(Timeout, TimeoutReconnect, TimeoutSleep, AttempsSleep),\r\nNewsLangId. The wrapper's `Password` (datafeed credentials)\r\nis intentionally excluded from the v2 contract.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4FeederListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestLiveUpdate": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List LiveUpdate configs",
        "description": "All MT4 LiveUpdate service configurations on the server, paginated by Company name.\r\n            \r\nManager-live read (round-trip). Each entry: Company (cursor key),\r\nPath, Version/Build, MaxConnect, current Connections (read-only),\r\nType, Enable flag, TotalFiles. The wrapper's 128-element\r\nper-file Files descriptor table is dropped from this payload\r\nfor tractability; a dedicated per-file endpoint will follow.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4LiveUpdateListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestSync": {
      "get": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "List sync rules",
        "description": "All chart-history synchronization rules configured on the MT4 server, paginated by Server name.\r\n            \r\nManager-live read (round-trip). Each rule pulls historical bars\r\nfrom an upstream source — Server (cursor key) + Login identify\r\nthe source, Mode/From/To/Securities define the sync scope, and\r\nTimeCorrection (minutes) adjusts incoming bar timestamps. The\r\nwrapper's `Password` (replication credentials) is\r\nintentionally excluded from the v2 contract.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SyncListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteAccess/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete IP firewall rule",
        "description": "Deletes an entry from the server's IP firewall (Access) configuration table by zero-based row position.\r\n            \r\nManager-live POST. Maps to the wrapper's `CfgDeleteAccess(int pos)`.\r\nRead the current table via `CfgRequestAccess`, find the target\r\nrow's index, then delete. Destructive — pair with `Idempotency-Key`\r\non retry.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the access-rules table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteDataServer/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete data-server entry",
        "description": "Deletes an entry from the server's access-server (DataServer) configuration table by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the data-server table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteFeeder/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete feeder config",
        "description": "Deletes an entry from the quote/news feeder configuration table by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the feeders table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteGatewayAccount/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete gateway account",
        "description": "Deletes an STP gateway-account configuration entry by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the gateway-accounts table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteGatewayMarkup/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete gateway markup",
        "description": "Deletes a per-symbol gateway markup rule by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the gateway-markup table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteGatewayRule/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete gateway rule",
        "description": "Deletes an STP execution-routing (gateway) rule by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the gateway-rules table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteHoliday/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete holiday entry",
        "description": "Deletes a holiday-calendar entry by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the holiday table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteLiveUpdate/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete LiveUpdate config",
        "description": "Deletes a LiveUpdate service configuration by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the live-update table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteManager/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete manager config",
        "description": "Deletes a manager-account configuration entry by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the managers table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteSymbol/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete symbol config",
        "description": "Deletes a symbol configuration entry by zero-based row position. This permanently removes the symbol from the server — pair with `Idempotency-Key` and prefer `SymbolHide` when you only want to suspend visibility.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the symbols table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgDeleteSync/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Delete sync rule",
        "description": "Deletes a chart-history synchronization rule by zero-based row position.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based row index in the sync-rules table",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftAccess/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder IP firewall rule",
        "description": "Reorders an entry in the access-rules table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement (positive = down, negative = up)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftDataServer/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder data-server entry",
        "description": "Reorders an entry in the data-servers table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement (positive = down, negative = up)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftFeeder/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder feeder config",
        "description": "Reorders an entry in the feeders table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement (positive = down, negative = up)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftGatewayAccount/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder gateway account",
        "description": "Reorders an entry in the gateway-accounts table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftGatewayMarkup/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder gateway markup",
        "description": "Reorders an entry in the gateway-markup table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftGatewayRule/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder gateway rule",
        "description": "Reorders an entry in the gateway-rules table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftGroup/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder trading group",
        "description": "Reorders an entry in the trading-groups table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftHoliday/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder holiday entry",
        "description": "Reorders an entry in the holiday-calendar table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftLiveUpdate/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder LiveUpdate config",
        "description": "Reorders an entry in the live-update table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftManager/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder manager config",
        "description": "Reorders an entry in the managers table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftPlugin/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder plugin entry",
        "description": "Reorders an entry in the plugins table by relative displacement.\r\n            \r\nUnlike the deferred `CfgRequestPlugin` read endpoint, the shift\r\ncall does not dereference `ConPluginParam.Params` — it only\r\nreorders existing rows by index. Safe under wine x64.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftSymbol/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder symbol entry",
        "description": "Reorders an entry in the symbols table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgShiftSync/{pos}": {
      "post": {
        "tags": [
          "MT4 v2 :: Config"
        ],
        "summary": "Reorder sync rule",
        "description": "Reorders an entry in the sync-rules table by relative displacement.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based source row index",
            "required": true,
            "schema": {
              "minimum": 0,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "shift",
            "in": "query",
            "description": "Relative displacement",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/PerformanceRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Get server performance series",
        "description": "Time series of MT4 server resource snapshots — CPU, memory, network, sockets, connected-users — captured at server-defined cadence.\r\n            \r\nManager-live read (round-trip to MT4 server). The MT4 server records\r\nthese snapshots periodically (typically every five minutes, broker-\r\nconfigurable). Pass from as the earliest timestamp\r\nto include; the server returns every snapshot at or after that point\r\nup to the present, in ascending `Ctm` order. Useful for capacity\r\ndashboards, oncall incident timelines, and load investigations. Pump\r\ncache is NOT consulted — data reflects the authoritative server log.\r\nReturns an empty list (Ok envelope, not an error) when the window\r\ncontains no snapshots.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start timestamp (UTC, ISO 8601). Snapshots with\r\n             `Ctm >= from` are returned. Marshalled to the wrapper as\r\n             `__time32_t` — values before 1970 or after 2038 are out of range.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4PerformanceListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ReportsRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Get closed-trade reports",
        "description": "Closed-trade reports for a batch of account logins within a time window — the data set that drives broker financial reporting (PnL, commissions, taxes) and customer trade-history exports.\r\n            \r\nManager-live read (round-trip to MT4 server). Pass logins as repeated\r\nquery parameters: `?logins=1001&logins=1002&logins=1003`.\r\nServer-side billing counts this as one Manager request regardless of\r\nbatch size — prefer one batched call over a per-login loop.\r\n            \r\nThe wrapper returns a dictionary keyed by order ticket; the v2 envelope\r\nflattens it to a list. Missing logins are silently omitted (no error\r\nenvelope). The optional name parameter selects a\r\nserver-defined report template — leave it null/empty to use the\r\ndefault `\"RTL_report\"` template (closed trades within the window).\r\n            \r\nPump cache is NOT consulted — data reflects authoritative server\r\nhistory. Note: the wrapper comment warns that asking for a window\r\nwhere the manager account lacks the `Reports` permission may\r\ncause MT4 to drop the manager connection; this endpoint guards that\r\nindirectly via the API-side `ResourceAccess` check, but a broker\r\nthat mis-configured the underlying manager rights can still observe\r\ntransient connection bounces.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins to include (repeat the query\r\n             parameter for batch — must be non-empty)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Report template name (max 32 chars). Defaults to\r\n             `\"RTL_report\"` when null or empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/DailyReportsRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Get daily reports",
        "description": "End-of-day balance/equity/PnL snapshots for a batch of account logins within a date window — the broker daily-report data set, flat shape (one row per (login, day) pair).\r\n            \r\nManager-live read (round-trip to MT4 server). Pass logins as repeated\r\nquery parameters: `?logins=1001&logins=1002&logins=1003`.\r\nServer-side billing counts this as one Manager request regardless of\r\nbatch size — prefer one batched call over a per-login loop.\r\n            \r\nEach row carries its own `Login` field, so the flat shape is\r\njoinable on the client side. The MT4 server returns dates in its\r\nlocal time zone, **not** UTC — clients should treat `Ctm` as\r\n\"broker day boundary\" and convert as appropriate.\r\n            \r\nNote: the wrapper warns that asking for a window where the manager\r\naccount lacks the `Automatic server reports` permission may\r\ncause MT4 to drop the manager connection. The API-side\r\n`ResourceAccess` check is an indirect guard; a broker that\r\nmis-configured the underlying manager rights can still observe\r\ntransient connection bounces.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins to include (repeat the query\r\n             parameter — must be non-empty)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Report template name (max 31 chars). Defaults to\r\n             `\"RTL_dailyreport\"` when null or empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4DailyReportListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/DailyReportsRequestEx": {
      "get": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Get daily reports (grouped)",
        "description": "Same data set as `DailyReportsRequest`, but server-side grouped by login. Convenience shape for clients that pivot the data per-account (per-day rollups, account dashboards).\r\n            \r\nManager-live read — single round-trip to MT4 server, identical billing\r\ncost to `DailyReportsRequest`. The wrapper returns a sorted-list\r\nof sorted-lists (by login, then by date); the v2 envelope flattens\r\nthe inner list to a chronologically-ordered `MT4DailyReport`\r\narray, leaving the outer keying by login.\r\n            \r\nJSON shape: `{ \"817542\": [ ... ], \"1001\": [ ... ] }` — JSON\r\nobject keys are strings, so int logins are stringified. Clients\r\nshould parse keys back to int if needed.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins to include (repeat the query\r\n             parameter — must be non-empty)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "Report template name (max 31 chars). Defaults to\r\n             `\"RTL_dailyreport\"` when null or empty.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Int32MT4DailyReportListDictionaryApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/DailySyncStart": {
      "post": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Start daily-report sync",
        "description": "Opens a server-side incremental sync session for daily reports modified at or after timestamp. Follow up with `DailySyncRead` to retrieve the snapshot.\r\n            \r\nManager-live POST (modifies server-side session state). The two-call\r\ncycle `DailySyncStart → DailySyncRead` is the broker pattern for\r\npulling only-changed-since-last-poll daily reports; pass\r\n`timestamp=0` to request all records.\r\n            \r\n`timestamp` is a Unix epoch second (int32) in MT4 server-local\r\ntime, not UTC. Wrapper marshals it directly to `__time32_t` —\r\npre-1970 / post-2038 values are out of range.\r\n            \r\nReturns a bare success envelope (no payload); the actual data comes\r\nfrom a subsequent `DailySyncRead` call.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Unix-epoch-second cutoff (server-local time;\r\n             0 = pull all)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/DailySyncRead": {
      "post": {
        "tags": [
          "MT4 v2 :: Reports"
        ],
        "summary": "Read daily-report sync",
        "description": "Drains the daily-report snapshot opened by the most recent `DailySyncStart` call. Returns every record reserved by the server in that sync session.\r\n            \r\nManager-live POST (consumes server-side session state — the snapshot\r\nis dropped after a successful read). Empty payload (`[]`) is a\r\nvalid response when the snapshot held no records; this is NOT an\r\nerror.\r\n            \r\nCall `DailySyncStart` first; calling `DailySyncRead` without\r\na prior `DailySyncStart` may return an empty list or a non-Ok\r\n`managerAPICode` depending on server build.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4DailyReportListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NewsTotal": {
      "get": {
        "tags": [
          "MT4 v2 :: News"
        ],
        "summary": "Get news count",
        "description": "Total number of news items currently held in the pumping cache.\r\n            \r\nPump-cached read — instant local lookup, no round-trip to MT4 server.\r\nUseful as a cheap polling probe before fetching news bodies.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Int32ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NewsBodyGet/{key}": {
      "get": {
        "tags": [
          "MT4 v2 :: News"
        ],
        "summary": "Get news body (cached)",
        "description": "Body text of a cached news item by its key.\r\n            \r\nPump-cached read — pair with `NewsTotal` and `NewsGet` (later)\r\nto enumerate cached news. The key is the news item id known to MT4.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "News item id",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NewsGet": {
      "get": {
        "tags": [
          "MT4 v2 :: News"
        ],
        "summary": "List news headers",
        "description": "All cached news topic headers (no body — fetch separately).\r\n            \r\nPump-cached read — returns the full news topic table held by the\r\npumping connection. Each entry is a header (Key, Time, Topic,\r\nCategory, Keywords, Priority, LangId). Body text is fetched via\r\n`NewsBodyGet(key)` after asking the pump to populate it via\r\n`NewsBodyRequest(key)`.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4NewsTopicListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NewsTopicGet/{pos}": {
      "get": {
        "tags": [
          "MT4 v2 :: News"
        ],
        "summary": "Get news header by index",
        "description": "Single cached news topic header by zero-based index.\r\n            \r\nPump-cached read — useful for paginating news without re-marshalling\r\nthe whole array. Pair with `NewsTotal` to bound the index.\r\nReturns a wrapper-failure envelope when pos is\r\nout of range.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "pos",
            "in": "path",
            "description": "Zero-based index into the cached news array",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4NewsTopicApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NewsBodyRequest/{key}": {
      "post": {
        "tags": [
          "MT4 v2 :: News"
        ],
        "summary": "Request news body fetch",
        "description": "Ask the pump to fetch the body for the given news key (fire-and-forget).\r\n            \r\nPOST because this is a side-effect on the pump (it queues a fetch).\r\nThe wrapper method returns `void` — there is no synchronous\r\nsuccess/failure to surface. A subsequent `NewsBodyGet(key)` will\r\nsee the body once the pump has retrieved it. The payload is a sentinel\r\n`true` meaning \"request dispatched\".\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key",
            "in": "path",
            "description": "News item key (from NewsGet/NewsTopicGet)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/MarginsGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Margins"
        ],
        "summary": "List account margins (cached)",
        "description": "Margin levels for all accounts from the pump cache.\r\n            \r\nPump-cached snapshot of margin/equity/free margin per login. Use this\r\nfor bulk monitoring of account health (margin calls / stop-out\r\nproximity). For a single account, prefer the existing\r\nMarginLevelGet/MarginLevelRequest endpoints.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4MarginLevelListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/MarginLevelGet/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: Margins"
        ],
        "summary": "Get account margin (cached)",
        "description": "Margin level for a single account from the pump cache.\r\n            \r\nPump variant — two-step lookup: `UserRecordGet` to resolve the\r\naccount's group, then `MarginLevelGet(login, group)`. Returns\r\nNotFound envelope if the account is unknown or has no open trades.\r\nFor a live round-trip use MarginLevelRequest.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4MarginLevelApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/MarginLevelRequest/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: Margins"
        ],
        "summary": "Get account margin (live)",
        "description": "Margin level for a single account — live round-trip to MT4 server.\r\n            \r\nManager variant — bypasses the pump cache and asks the MT4 server\r\ndirectly. Slower than `MarginLevelGet` but always fresh. Cost-\r\nequivalent to other live Manager calls (billed per request, unlike\r\npump reads).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4MarginLevelApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "List open trades (cached)",
        "description": "Pump-cached snapshot of all open trades on the platform, returned paginated. Sort key is the order ticket ascending. `?limit=` caps page size; without it all open trades come back in one page.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesGet/{ticket}": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Get trade by ticket (cached)",
        "description": "Open trade by ticket from the pump cache (dictionary lookup variant).\r\n            \r\nCounterpart to `TradeRecordGet/{order}` — both are pump reads,\r\nbut the wrapper exposes two distinct call paths: `TradeRecordGet`\r\nuses a dedicated single-record method, while this endpoint looks the\r\ntrade up in the open-trades dictionary. Behaviourally equivalent for\r\nopen trades; `TradeRecordGet` can also resolve recently closed\r\ntrades that linger in cache.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ticket",
            "in": "path",
            "description": "Order ticket",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesGetByLogin/{login}/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "List trades by account (cached)",
        "description": "Open trades for a single account from the pump cache.\r\n            \r\nPump-cached lookup, keyed by login + group. The group parameter is\r\nrequired because the wrapper organises trades by group internally —\r\ncallers can fetch the group via `UserRecordGet/{login}` first.\r\nEmpty list when the account has no open trades.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Account group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesGetBySymbol": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "List trades by symbol (cached)",
        "description": "Open and pending orders for a specific symbol from the pump cache.\r\n            \r\nPump-cached snapshot — instant local lookup, no MT4 round-trip. Useful\r\nfor per-instrument risk monitoring. Empty array is a legitimate result\r\n(no live trades on that symbol).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "description": "Symbol to filter by (e.g. EURUSD)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesGetByMarket": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "List market trades (cached)",
        "description": "All market-condition (non-pending) open trades from the pump cache.\r\n            \r\nPump-cached snapshot of every open market order across all accounts.\r\nPending orders (limits/stops) are excluded — for those query per-symbol\r\nor per-account. Empty array is a legitimate result on idle servers.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeRecordGet/{order}": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Get trade record (cached)",
        "description": "Single trade record by order ticket from the pump cache.\r\n            \r\nPump-cached lookup of one order. Wrapper-level failures (unknown\r\nticket, cache miss) surface in the envelope's ManagerAPICode /\r\nErrorCode pair — clients must branch on isError before dereferencing\r\npayload.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "order",
            "in": "path",
            "description": "Order ticket number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeCheckStops": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Validate order stops",
        "description": "Validate an order's SL/TP/pending-open levels against the symbol's administrator-set `stops_level`.\r\n            \r\nPump-cached call. The MT4 server verifies that the supplied SL/TP\r\n(and, for pending orders, the open price) sit at least\r\n`stops_level` away from the current market and that pending\r\nexpiration is at least ten minutes in the future. Returns a bare\r\nboolean envelope: `true` when the wrapper's `ResultCode`\r\nis `Ok`.\r\n            \r\nUseful for client-side pre-flight before submitting a real\r\n`TradeTransaction` — saves a server round-trip for invalid\r\norders.\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "price",
            "in": "query",
            "description": "Reference price for the validation (typically current bid/ask).",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "requestBody": {
          "description": "Trade transaction shape — same DTO as `TradeTransaction`.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeClearRollback/{order}": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Roll back trade transaction",
        "description": "Roll back an in-flight trade transaction by ticket.\r\n            \r\nPump-cached call. Cancels a pending trade transaction that the\r\nMT4 server is still holding in the rollback buffer (e.g. an\r\ninstant-execution requote that has not yet been confirmed). Has\r\nno effect once the transaction has been committed; returns the\r\nwrapper's `ResultCode` as part of the envelope on failure.\r\n            \r\nIdempotent on already-committed/already-rolled-back tickets.\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "order",
            "in": "path",
            "description": "Order ticket (positive int) to roll back.",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeRecordRequest/{order}": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Get trade record (live)",
        "description": "Fresh-from-server fetch of a single trade record by ticket.\r\n            \r\nManager (live) counterpart to `TradeRecordGet`. Where the pump\r\nvariant reads from local cache (may lag by milliseconds), this round-\r\ntrips to the MT4 server every call — slower but authoritative.\r\nUseful for reconciliation, post-close ticket lookups (pump may have\r\nflushed), or any flow where the caller can tolerate the latency cost\r\nin exchange for guaranteed freshness. Returns NotFound envelope when\r\nthe ticket does not exist on the server.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "order",
            "in": "path",
            "description": "Order ticket number",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Query trades (live)",
        "description": "Broad Manager-live trade query. Returns every trade visible to the authenticated manager, paged by ticket ascending.\r\n            \r\nManager (live) — each call hits the MT4 server. Designed as the\r\n\"scan from scratch\" counterpart to the pump variants\r\n(`TradesGetByMarket`, `TradesGetBySymbol`): pump reads are\r\ninstant but limited to currently-open trades visible to the pump;\r\nthis endpoint returns the full server-side set the manager can see.\r\nHeavy — paginate aggressively, prefer pump variants when freshness\r\nis not critical.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "group",
            "in": "query",
            "description": "Optional case-sensitive exact-match filter on account group.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolInfoGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Get symbol market data (cached)",
        "description": "Current cached market data for a single symbol.\r\n            \r\nPump-cached read — Bid/Ask/High/Low/Spread/Digits and last-tick time\r\nfor the requested instrument. Returns NotFound-shaped envelope (the\r\nwrapper-level result code surfaces in ManagerAPICode / ErrorCode)\r\nwhen the symbol is not loaded on the connected server.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "description": "Symbol name (e.g. EURUSD)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolInfoApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolInfoUpdated": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "List updated symbols (cached)",
        "description": "Snapshot of all symbols that have been updated since the last pump flush, keyed by symbol name (values-only on the wire).\r\n            \r\nPump-cached read — instant local lookup, no MT4 round-trip. Useful for\r\nbulk refresh of a quote panel or watchlist. Sort key is the symbol\r\nname; cursors are opaque base64 strings.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolInfoListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolsGroupsGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "List symbol groups (cached)",
        "description": "All configured symbol groups (security categories) from the pump cache.\r\n            \r\nPump-cached read — returns the broker-configured security groups\r\n(e.g. \"Forex\", \"CFD\", \"Metals\"). Each entry only carries Name and\r\nDescription; ConSymbolGroup has no additional fields on the\r\nMT4-side struct.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolGroupListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/OnlineGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Online"
        ],
        "summary": "List online users (cached)",
        "description": "Pump-cached snapshot of currently online users, paginated by login.\r\n            \r\nPump-cached read — instant local lookup, no MT4 round-trip. Sort\r\norder is the login ascending. `?limit=` caps the page size;\r\nwithout it the full set returns in one page. When the pump cache\r\nis not yet warmed (fresh connection) the response is a NoConnect\r\nerror with a retry hint, not an empty list — empty list means\r\n\"warmed but currently no online sessions\".\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4OnlineListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/OnlineRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Online"
        ],
        "summary": "List online sessions (live)",
        "description": "Live snapshot of every currently-online session, fetched from the MT4 server (Manager round-trip — not pump cache).\r\n            \r\nManager (live) counterpart to `OnlineGet`. Useful when the pump\r\ncache hasn't warmed yet, when staleness is unacceptable, or as a\r\nreconciliation pass against the pump snapshot. Heavier than\r\n`OnlineGet`: every call hits the MT4 server. Paged the same way\r\nfor caller symmetry — cursor is the trailing login (ascending).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4OnlineListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/MailLast": {
      "get": {
        "tags": [
          "MT4 v2 :: Mail"
        ],
        "summary": "Get last mail path",
        "description": "Path of the most recent mail received in the pump cache.\r\n            \r\nPump-cached read — returns the path/identifier of the last mail.\r\nEmpty string when no mail has been received yet on the connection.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecordGet/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Get account (cached)",
        "description": "Account record for a single login from the pump cache.\r\n            \r\nPump-cached read of the wrapper's `UserRecord`, mapped to the v2\r\n`MT4User` DTO. Secrets (passwords, OTP secret, API blob) are\r\nstripped at the mapper level — they cannot be exposed via this endpoint\r\nregardless of caller permissions. Returns NotFound envelope when the\r\npump cache does not contain the requested login.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecordRequest/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Get account (live)",
        "description": "Account record for a single login — live round-trip to MT4 server.\r\n            \r\nManager variant — bypasses the pump cache and asks the MT4 server\r\ndirectly via `UserRecordsRequest` with a single-login array.\r\nSlower than `UserRecordGet` but guarantees fresh data (just\r\nchanged group, balance fix, etc). Same curated DTO, same security\r\nguarantees — passwords/OTP/API blob never cross the boundary.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecordsRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Get accounts batch (live)",
        "description": "Account records for a list of logins — live round-trip to MT4 server.\r\n            \r\nManager batch variant. Pass logins as repeated query parameters:\r\n`?logins=1001&logins=1002&logins=1003`. Server-side billing\r\ncounts this as one Manager request regardless of the array length —\r\nprefer batch over a loop of single-login calls.\r\n            \r\nOrder in the response is **not** guaranteed to match the request — the\r\nwrapper returns a dictionary. Missing logins are silently omitted; the\r\nenvelope is not an error envelope in that case.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins to request (repeat the query param)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupsGet": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "List trading groups (cached)",
        "description": "All trading groups configured on the MT4 server from the pump cache.\r\n            \r\nPump-cached read. Curated DTO drops SMTP credentials, template paths,\r\nand nested SecGroups/SecMargins arrays (those get dedicated v2\r\nendpoints in a later wave). Typical group counts are small (dozens),\r\nso no pagination is needed.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupRecordGet/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Get trading group (cached)",
        "description": "Single trading group configuration by name (pump-cached).\r\n            \r\nPump-cached lookup. Returns NotFound envelope if no group with the\r\ngiven name exists. Group names are case-sensitive — the wrapper does\r\nan exact dictionary lookup.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupsRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "List trading groups (live)",
        "description": "Manager (live) call returning a paged list of all configured groups on the platform. Sort key is the group name (string, ordinal compare) ascending. Cursor is the last returned group name encoded as opaque base64.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupSecGroupsGet/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Get group security entries",
        "description": "Security-group entries (`SecGroups[32]`) for one trading group.\r\n            \r\nPump-cached read. Returns the full 32-element array; entries whose\r\n`Trade` and `Show` are both 0 are placeholders (the wrapper\r\nreserves the slot for the symbol-group regardless of whether the\r\ngroup is configured to trade it). Filter on the client side.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupSecListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupSecMarginsGet/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Get group margin overrides",
        "description": "Special-securities margin overrides (`SecMargins`) for one group.\r\n            \r\nPump-cached read. Returns the first `SecMarginsTotal` entries of\r\nthe wrapper's 128-element `SecMargins` array — the trailing\r\nslots are always uninitialised padding. `SecMarginsTotal` itself\r\nis part of the parent `MT4Group` DTO.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupMarginListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupRecordUpdate/{group}": {
      "post": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Update trading group",
        "description": "Update a group configuration — Type 1 mutator with secret-preservation read.\r\n            \r\n<br>\r\nSame flow as `UserRecordUpdate`: read the existing\r\n`ConGroup` from the MT4 server, overlay the\r\n`MT4GroupUpdate` DTO over the in-memory record, write the\r\nmerged structure back. Preserves SMTP credentials, template paths,\r\nSecuritiesHash, reserved arrays, the nested SecGroups/SecMargins\r\narrays, and NewsLanguages — none of those are on the input DTO so\r\nthey survive untouched.\r\n<br>\r\nWraps the wrapper's `CfgUpdateGroup` — v2 renames to\r\n`GroupRecordUpdate` for consistency with\r\n`UserRecordUpdate`; the underlying wrapper call is the same as\r\nv1's `POST CfgUpdateGroup` endpoint.\r\n<br>\r\nIdempotency-Key strongly recommended for safe retries.\r\n\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name (path parameter, max 16 chars, immutable identity)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields. Omitted-from-DTO fields are preserved server-side.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GroupUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `GroupRecordUpdate`.\r\nSame field set as the read DTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Group minus the immutable\r\ngroup name (path parameter) and the derived `SecMarginsTotal`\r\n(computed from SecMargins length).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Group` — path param, immutable identity.\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP creds,\r\n    never client-controlled.\r\n  * `Templates` — server-side filesystem path.\r\n  * `SecuritiesHash` — opaque wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights` — reserved arrays.\r\n  * `SecGroups[32]`, `SecMargins[128]` — nested arrays, planned\r\n    as dedicated v2 endpoints.\r\n  * `NewsLanguages`, `NewsLanguagesTotal` — separate management.\r\n  * `SecMarginsTotal` — derived from SecMargins length."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GroupUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `GroupRecordUpdate`.\r\nSame field set as the read DTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Group minus the immutable\r\ngroup name (path parameter) and the derived `SecMarginsTotal`\r\n(computed from SecMargins length).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Group` — path param, immutable identity.\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP creds,\r\n    never client-controlled.\r\n  * `Templates` — server-side filesystem path.\r\n  * `SecuritiesHash` — opaque wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights` — reserved arrays.\r\n  * `SecGroups[32]`, `SecMargins[128]` — nested arrays, planned\r\n    as dedicated v2 endpoints.\r\n  * `NewsLanguages`, `NewsLanguagesTotal` — separate management.\r\n  * `SecMarginsTotal` — derived from SecMargins length."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GroupUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `GroupRecordUpdate`.\r\nSame field set as the read DTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Group minus the immutable\r\ngroup name (path parameter) and the derived `SecMarginsTotal`\r\n(computed from SecMargins length).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Group` — path param, immutable identity.\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP creds,\r\n    never client-controlled.\r\n  * `Templates` — server-side filesystem path.\r\n  * `SecuritiesHash` — opaque wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights` — reserved arrays.\r\n  * `SecGroups[32]`, `SecMargins[128]` — nested arrays, planned\r\n    as dedicated v2 endpoints.\r\n  * `NewsLanguages`, `NewsLanguagesTotal` — separate management.\r\n  * `SecMarginsTotal` — derived from SecMargins length."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4GroupUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `GroupRecordUpdate`.\r\nSame field set as the read DTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Group minus the immutable\r\ngroup name (path parameter) and the derived `SecMarginsTotal`\r\n(computed from SecMargins length).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Group` — path param, immutable identity.\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP creds,\r\n    never client-controlled.\r\n  * `Templates` — server-side filesystem path.\r\n  * `SecuritiesHash` — opaque wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights` — reserved arrays.\r\n  * `SecGroups[32]`, `SecMargins[128]` — nested arrays, planned\r\n    as dedicated v2 endpoints.\r\n  * `NewsLanguages`, `NewsLanguagesTotal` — separate management.\r\n  * `SecMarginsTotal` — derived from SecMargins length."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/GroupRecord/{group}": {
      "patch": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Patch trading group",
        "description": "Type 2 mutator — partial update of a trading group. Same semantics as `UserRecordPatch`; see that endpoint for the read-merge- write flow and forwards-compat behavior.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name (immutable identity)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4GroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmBalanceCheck/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Check account balance",
        "description": "Admin balance integrity check for a single account.\r\n            \r\nManager (live) call. Returns the difference between the recorded\r\naccount balance and what the MT4 server recomputes from closed\r\norders + balance operations. `diff = 0` → balance is intact;\r\nnon-zero → admin tooling can run `AdmBalanceFix` to recompute\r\n(forthcoming Wave 3 endpoint).\r\n            \r\nRead-only operation despite the wrapper's \"Adm\" prefix (the prefix\r\nsignals the elevated authorization requirement, not a write side\r\neffect).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BalanceDiffApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmBalanceCheck": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Check account balances (batch)",
        "description": "Admin balance integrity check for a batch of accounts.\r\n            \r\nSame semantics as the single-login variant but takes a list of logins\r\nvia repeated query parameters: `?logins=1001&logins=1002`.\r\nOne billed Manager request regardless of the array length. The response\r\nlist contains entries only for accounts the server flagged with a\r\nnon-zero diff — clean accounts are silently omitted. Clients should\r\ntreat \"missing from response\" as \"diff = 0\".\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins (repeat query parameter)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BalanceDiffListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestSymbol": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "List symbol configs",
        "description": "Full server-side configuration for every symbol on the platform.\r\n            \r\nManager (live) call. Heavy response — typical platforms have dozens\r\nto hundreds of symbols, each with a 50+ field `ConSymbol`\r\nstructure. Pair with `Idempotency-Key` on retry.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolConfigListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgRequestSymbol/{symbol}": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Get symbol config",
        "description": "Full server-side configuration for a single symbol by name.\r\n            \r\nManager (live) call. Returns NotFound envelope when the symbol is\r\nnot configured on the server. Same DTO shape as `CfgRequestSymbol`'s\r\nlist element.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolConfigApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmBalanceFix": {
      "post": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Fix account balances",
        "description": "Admin balance fix — recompute balances for the given logins.\r\n            \r\nPOST mutator. Asks MT4 server to take the diffs reported by\r\n`AdmBalanceCheck` and write them onto the accounts. Empty body —\r\nthe logins are submitted as repeated query parameters\r\n(`?logins=1001&logins=1002`) to keep the URL shape parallel\r\nwith the read variant and avoid the awkward \"POST with int[] body\"\r\npattern.\r\n            \r\nThis DOES modify account balances. Pair every retry with an\r\n`Idempotency-Key` header; otherwise a retried fix can double-\r\napply on an account whose original fix happened to land but whose\r\nresponse was lost on the wire.\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "logins",
            "in": "query",
            "description": "Account logins to fix (repeat query parameter)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolSessionsGet/{symbol}": {
      "get": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Get symbol sessions",
        "description": "Trading session windows for a symbol, per weekday.\r\n            \r\nReturns the wrapper's `ConSymbol.Sessions[7]` array (one entry\r\nper weekday, 0=Sunday). Each weekday entry carries up to three Quote\r\n(price) windows and up to three Trade (order acceptance) windows\r\nplus overnight flags. Closes the TODO documented in\r\n`MT4SymbolConfig`: the parent `CfgRequestSymbol` endpoint\r\ndrops the nested Sessions array to keep the DTO manageable; this\r\ndedicated endpoint exposes it.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolDaySessionsListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/CfgUpdateSymbol/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Update symbol config",
        "description": "Update a symbol's full configuration — Type 1 mutator with secret-preservation read.\r\n            \r\nCompletes the User/Group/Symbol Type 1 mutator triad. Same flow as\r\n`UserRecordUpdate` and `GroupRecordUpdate`: read the existing\r\n`ConSymbol` from MT4 server, overlay the\r\n`MT4SymbolConfigUpdate` DTO over it, write the merged structure\r\nback. Preserves the `Sessions` nested array, reserved/unused\r\npadding, and server-derived fields (`Count`, `CountOriginal`,\r\n`FilterCounter`, `Point`, `Multiply`, tick-value pair)\r\n— those are `[MapperIgnoreTarget]`'d on the mapper.\r\n            \r\nIdempotency-Key strongly recommended.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (path parameter, max 12 chars, immutable identity)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields. Omitted-from-DTO fields are preserved server-side.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolConfigUpdate"
                  }
                ],
                "description": "Type 1 mutator input for `CfgUpdateSymbol`. Same field set as the read\r\nDTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolConfig minus:\r\n  * `Symbol` (path parameter, immutable identity);\r\n  * `Count`, `CountOriginal`, `FilterCounter` — server-side\r\n    counters, derived;\r\n  * Stringified enum fields are submitted as their original wrapper enum\r\n    types here (one-way deserialisation accepts JsonStringEnumConverter\r\n    via the existing global STJ options).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Symbol` identity.\r\n  * `Sessions` nested array (own endpoint planned).\r\n  * `Unused`, `ExternalUnused`, `ProfitReserved`,\r\n    `FilterReserved` reserved arrays.\r\n  * `Count`, `CountOriginal`, `FilterCounter`,\r\n    `BidTickValue`, `AskTickValue`, `Point`, `Multiply`\r\n    — server-derived from other fields, writing them is a no-op or\r\n    overwrite-with-stale."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolConfigUpdate"
                  }
                ],
                "description": "Type 1 mutator input for `CfgUpdateSymbol`. Same field set as the read\r\nDTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolConfig minus:\r\n  * `Symbol` (path parameter, immutable identity);\r\n  * `Count`, `CountOriginal`, `FilterCounter` — server-side\r\n    counters, derived;\r\n  * Stringified enum fields are submitted as their original wrapper enum\r\n    types here (one-way deserialisation accepts JsonStringEnumConverter\r\n    via the existing global STJ options).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Symbol` identity.\r\n  * `Sessions` nested array (own endpoint planned).\r\n  * `Unused`, `ExternalUnused`, `ProfitReserved`,\r\n    `FilterReserved` reserved arrays.\r\n  * `Count`, `CountOriginal`, `FilterCounter`,\r\n    `BidTickValue`, `AskTickValue`, `Point`, `Multiply`\r\n    — server-derived from other fields, writing them is a no-op or\r\n    overwrite-with-stale."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolConfigUpdate"
                  }
                ],
                "description": "Type 1 mutator input for `CfgUpdateSymbol`. Same field set as the read\r\nDTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolConfig minus:\r\n  * `Symbol` (path parameter, immutable identity);\r\n  * `Count`, `CountOriginal`, `FilterCounter` — server-side\r\n    counters, derived;\r\n  * Stringified enum fields are submitted as their original wrapper enum\r\n    types here (one-way deserialisation accepts JsonStringEnumConverter\r\n    via the existing global STJ options).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Symbol` identity.\r\n  * `Sessions` nested array (own endpoint planned).\r\n  * `Unused`, `ExternalUnused`, `ProfitReserved`,\r\n    `FilterReserved` reserved arrays.\r\n  * `Count`, `CountOriginal`, `FilterCounter`,\r\n    `BidTickValue`, `AskTickValue`, `Point`, `Multiply`\r\n    — server-derived from other fields, writing them is a no-op or\r\n    overwrite-with-stale."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolConfigUpdate"
                  }
                ],
                "description": "Type 1 mutator input for `CfgUpdateSymbol`. Same field set as the read\r\nDTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolConfig minus:\r\n  * `Symbol` (path parameter, immutable identity);\r\n  * `Count`, `CountOriginal`, `FilterCounter` — server-side\r\n    counters, derived;\r\n  * Stringified enum fields are submitted as their original wrapper enum\r\n    types here (one-way deserialisation accepts JsonStringEnumConverter\r\n    via the existing global STJ options).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Symbol` identity.\r\n  * `Sessions` nested array (own endpoint planned).\r\n  * `Unused`, `ExternalUnused`, `ProfitReserved`,\r\n    `FilterReserved` reserved arrays.\r\n  * `Count`, `CountOriginal`, `FilterCounter`,\r\n    `BidTickValue`, `AskTickValue`, `Point`, `Multiply`\r\n    — server-derived from other fields, writing them is a no-op or\r\n    overwrite-with-stale."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolConfigApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolConfig/{symbol}": {
      "patch": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Patch symbol config",
        "description": "Type 2 mutator — partial update of a symbol configuration. Same flow as `UserRecordPatch`; reads existing config live, overlays the patch, writes back.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (immutable identity)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4SymbolConfigApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolAdd/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Add symbol",
        "description": "Add a symbol to the platform's active set — Type 1 mutator.\r\n            \r\nPromotes a configured symbol into the platform's currently-pumping\r\nset so it starts receiving ticks and accepting orders. Reversible via\r\n`SymbolHide`.\r\n            \r\nv1 exposes this as `GET /api/MT4/{tp}/SymbolAdd/{symbol}` — that\r\nis a historical REST violation (GET should be safe/idempotent). v2\r\ncorrects the verb to POST without changing the wrapper behaviour. The\r\npath stays the same to keep traceability with the underlying wrapper\r\nmethod name; only the HTTP verb changes.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolHide/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Hide symbol",
        "description": "Hide a symbol from the platform's active set — Type 1 mutator.\r\n            \r\nRemoves the symbol from the active subscription set; ticks stop flowing\r\nand orders are no longer accepted for that symbol. Reversible via\r\n`SymbolAdd`. v1 exposes this as a GET — v2 fixes to POST.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolsRefresh": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Refresh symbol catalog",
        "description": "Refresh the symbol catalog from MT4 server — Type 1 mutator (no body).\r\n            \r\nForces the wrapper to reload its symbol catalog. Useful after admin\r\ntooling has added/edited symbols on the MT4 server side. v1 exposes\r\nthis as GET — v2 fixes to POST (mutation of the wrapper's local state).\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolChange": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Change symbol attributes",
        "description": "Adjusts the per-symbol trading attributes that dealers manage from the MT4 Manager UI — spread, stops-level, smoothing, quote color, execution mode.\r\n            \r\nManager-live POST. Maps 1:1 to the wrapper's `SymbolChange`\r\ncall which marshals an entire `SymbolProperties` struct down\r\nto the native server. Only the seven editable fields are exposed\r\non the v2 contract — the wrapper's 8-int reserved padding is\r\nfilled with zeros by Mapperly automatically.\r\n            \r\nThis is intentionally separate from the heavier `CfgUpdateSymbol`\r\nType 1 mutator: `SymbolChange` is the dealer-tier adjustment\r\npath; `CfgUpdateSymbol` changes structural symbol configuration\r\n(currency, calc mode, margin, swap) that requires admin privileges\r\nand broker-side coordination.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Symbol attribute payload",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolChangeRequest"
                  }
                ],
                "description": "POST body for the Manager-live `SymbolChange` endpoint. Maps 1:1 to the\r\nwrapper's `SymbolProperties` struct (the public properties, not the\r\nunderscore-prefixed backing fields). The struct's 8-int `Reserved`\r\npadding is dropped from the v2 contract.\r\n            \r\n<br>Use cases: dealers and exchange operators adjusting per-symbol spread,\r\nstops level, smoothing, or quote-color metadata without touching the broader\r\nsymbol configuration. Heavier write operations (currency, calc mode,\r\nmargin, swap) live on the separate `CfgUpdateSymbol` Type 1 mutator."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolChangeRequest"
                  }
                ],
                "description": "POST body for the Manager-live `SymbolChange` endpoint. Maps 1:1 to the\r\nwrapper's `SymbolProperties` struct (the public properties, not the\r\nunderscore-prefixed backing fields). The struct's 8-int `Reserved`\r\npadding is dropped from the v2 contract.\r\n            \r\n<br>Use cases: dealers and exchange operators adjusting per-symbol spread,\r\nstops level, smoothing, or quote-color metadata without touching the broader\r\nsymbol configuration. Heavier write operations (currency, calc mode,\r\nmargin, swap) live on the separate `CfgUpdateSymbol` Type 1 mutator."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolChangeRequest"
                  }
                ],
                "description": "POST body for the Manager-live `SymbolChange` endpoint. Maps 1:1 to the\r\nwrapper's `SymbolProperties` struct (the public properties, not the\r\nunderscore-prefixed backing fields). The struct's 8-int `Reserved`\r\npadding is dropped from the v2 contract.\r\n            \r\n<br>Use cases: dealers and exchange operators adjusting per-symbol spread,\r\nstops level, smoothing, or quote-color metadata without touching the broader\r\nsymbol configuration. Heavier write operations (currency, calc mode,\r\nmargin, swap) live on the separate `CfgUpdateSymbol` Type 1 mutator."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4SymbolChangeRequest"
                  }
                ],
                "description": "POST body for the Manager-live `SymbolChange` endpoint. Maps 1:1 to the\r\nwrapper's `SymbolProperties` struct (the public properties, not the\r\nunderscore-prefixed backing fields). The struct's 8-int `Reserved`\r\npadding is dropped from the v2 contract.\r\n            \r\n<br>Use cases: dealers and exchange operators adjusting per-symbol spread,\r\nstops level, smoothing, or quote-color metadata without touching the broader\r\nsymbol configuration. Heavier write operations (currency, calc mode,\r\nmargin, swap) live on the separate `CfgUpdateSymbol` Type 1 mutator."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SymbolSendTick": {
      "post": {
        "tags": [
          "MT4 v2 :: Symbols"
        ],
        "summary": "Send synthetic tick",
        "description": "Injects a synthetic tick into the MT4 server for the given symbol — used to keep the feed alive on instruments where the upstream datafeed is paused, or to drive simulator tooling.\r\n            \r\nManager-live POST. The wrapper requires the manager account to hold\r\nthe `Market Watch` permission; without it the server typically\r\ndrops the connection rather than returning an error. The API-side\r\n`ResourceAccessAuthorize` on this endpoint guards against API\r\ncallers without the appropriate platform-level permission, but\r\nbroker-side mis-configuration of the underlying manager rights\r\nremains the consumer's responsibility.\r\n            \r\n`bid` and `ask` are absolute prices, not deltas. Pass\r\nthe symbol's last-known bid/ask if you only need to refresh the\r\ntimestamp; pass adjusted prices to actually move the quote.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "description": "Symbol name (max 11 chars)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bid",
            "in": "query",
            "description": "Bid price",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "ask",
            "in": "query",
            "description": "Ask price",
            "schema": {
              "type": "number",
              "format": "double"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmTradeRecordModify/{ticket}": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Modify trade record (admin)",
        "description": "Admin direct edit of a single trade record — Type 1 with read-first.\r\n            \r\n<br>\r\nLow-level back-office override that writes directly to the trade\r\nrecord. For SL/TP edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that route goes through the wrapper's audited path. Use this\r\nendpoint for manual accounting corrections (commission/storage/taxes/\r\nprofit, comment, magic) that the standard TradeTransaction path\r\ndoes not cover.\r\n<br>\r\nFlow: read existing trade via `TradeRecordsRequest`, patch the\r\nallow-listed fields in place, submit via `AdmTradeRecordModify`.\r\nOrder/Login/Symbol/Volume/OpenPrice/OpenTime/CloseTime and gateway\r\ninternals are preserved by virtue of not being on the input DTO.\r\n<br>\r\nIdempotency-Key strongly recommended. A retried edit without it can\r\nland twice — usually harmless, but generates audit log noise.\r\n\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "ticket",
            "in": "path",
            "description": "Order ticket (path)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "requestBody": {
          "description": "Patch fields. The DTO's `order` field is ignored — the path parameter is the source of truth.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeUpdate"
                  }
                ],
                "description": "Type 1 mutator input for the admin direct-edit endpoint\r\n`AdmTradeRecordModify`. Only the fields a back-office tool would\r\nlegitimately need to adjust are exposed; everything else (order id,\r\nlogin, symbol, volume, open/close times, gateway internals, conversion\r\nrates, API data blobs) is preserved from the server-side read.\r\n            \r\n<br>\r\nFor typical stop-loss / take-profit edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that goes through the wrapper's audited path. This endpoint is the\r\nlow-level admin override for back-office corrections.\r\n"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeUpdate"
                  }
                ],
                "description": "Type 1 mutator input for the admin direct-edit endpoint\r\n`AdmTradeRecordModify`. Only the fields a back-office tool would\r\nlegitimately need to adjust are exposed; everything else (order id,\r\nlogin, symbol, volume, open/close times, gateway internals, conversion\r\nrates, API data blobs) is preserved from the server-side read.\r\n            \r\n<br>\r\nFor typical stop-loss / take-profit edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that goes through the wrapper's audited path. This endpoint is the\r\nlow-level admin override for back-office corrections.\r\n"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeUpdate"
                  }
                ],
                "description": "Type 1 mutator input for the admin direct-edit endpoint\r\n`AdmTradeRecordModify`. Only the fields a back-office tool would\r\nlegitimately need to adjust are exposed; everything else (order id,\r\nlogin, symbol, volume, open/close times, gateway internals, conversion\r\nrates, API data blobs) is preserved from the server-side read.\r\n            \r\n<br>\r\nFor typical stop-loss / take-profit edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that goes through the wrapper's audited path. This endpoint is the\r\nlow-level admin override for back-office corrections.\r\n"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeUpdate"
                  }
                ],
                "description": "Type 1 mutator input for the admin direct-edit endpoint\r\n`AdmTradeRecordModify`. Only the fields a back-office tool would\r\nlegitimately need to adjust are exposed; everything else (order id,\r\nlogin, symbol, volume, open/close times, gateway internals, conversion\r\nrates, API data blobs) is preserved from the server-side read.\r\n            \r\n<br>\r\nFor typical stop-loss / take-profit edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that goes through the wrapper's audited path. This endpoint is the\r\nlow-level admin override for back-office corrections.\r\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeTransaction": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Submit trade transaction",
        "description": "Submit a trade transaction — open / modify / close / balance op.\r\n            \r\n<br>\r\nPOST mutator covering every wrapper trade operation through the single\r\n`TradeTransaction` entry point. The request body's\r\n`tradeTransactionType` + `tradeCommand` combination selects\r\nthe actual operation (OpenPending+Buy, ModifyTrade, CloseMarket+Sell,\r\nBalanceAdd+Balance, etc).\r\n<br>\r\nOn success the response echoes the wrapper's mutated structure — most\r\nimportantly the `Order` field, which the server assigns on Open\r\noperations and clients use to track the ticket afterwards.\r\n<br><b>Idempotency-Key is essentially mandatory.</b> A retried trade\r\ntransaction without the header can open a second position, double-\r\nclose, or apply a balance op twice. With the header the second call\r\nreturns the cached envelope from the first.\r\n\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "requestBody": {
          "description": "Transaction request body",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4TradeTransaction"
                  }
                ],
                "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeTransactionApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserPasswordCheck/{login}": {
      "post": {
        "tags": [
          "MT4 v2 :: Authentication"
        ],
        "summary": "Verify account password",
        "description": "Verify an account password against the MT4 server.\r\n            \r\nPOST body: the candidate password as a JSON string (e.g. `\"secret123\"`).\r\nReturns envelope with bool payload — `true` if MT4 server accepts\r\nthe password, `false` when wrapper returns InvalidLoginOrPassword\r\n(envelope marked as MT4Error with the underlying ResultCode in\r\nmanagerAPICode).\r\n            \r\nRead-only operation: no state changes. Idempotency-Key on this endpoint\r\nis supported but rarely useful — pin if your retry policy expects the\r\nsame answer across attempts.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Candidate password (JSON-encoded string body)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserPasswordSet/{login}": {
      "post": {
        "tags": [
          "MT4 v2 :: Authentication"
        ],
        "summary": "Set account password",
        "description": "Set the account password — Type 1 mutator (direct overwrite).\r\n            \r\nPOST body: the new password as a JSON string. Optional query params:\r\n`changeInvestor=true` sets the read-only investor password instead\r\nof the primary one; `cleanPubkey=true` resets the public key alongside\r\nthe password (caller's RSA-protected secondary auth).\r\n            \r\n<br>\r\nThis is a Type 1 mutator — full-replace semantics. The wrapper accepts\r\nthe new password directly without a read-modify-write loop. There is no\r\nType 2 (\"set only this field, leave the rest alone\") variant of password\r\nchange because the password is itself a single field — the read step\r\nwould be tautological.\r\n<br>\r\nIdempotency-Key is strongly recommended. A retried password change without\r\nthe header risks setting it twice (the second call returns success even\r\nthough the password is the same), which is harmless but generates audit\r\nnoise. With the header, the second call short-circuits to the cached\r\nresponse.\r\n\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "changeInvestor",
            "in": "query",
            "description": "If true, sets the investor (read-only) password instead",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "cleanPubkey",
            "in": "query",
            "description": "If true, also resets the account's public key",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "New password (JSON-encoded string body)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "string"
              }
            },
            "application/json": {
              "schema": {
                "type": "string"
              }
            },
            "text/json": {
              "schema": {
                "type": "string"
              }
            },
            "application/*+json": {
              "schema": {
                "type": "string"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UsersRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "List accounts (live)",
        "description": "Manager (live) call returning a paged list of every account on the platform. When `?limit=` is omitted the response contains all users in one page (back-compat). Set `?limit=N` to bound page size; the response's `paging.nextCursor` drives the next call.\r\n            \r\nWrapper-side this still fetches the full users dictionary — paging\r\nreduces only the wire payload, not MT4 server load. Items are sorted\r\nby login ascending; pages are stable across concurrent inserts as\r\nlong as the new login is greater than the previous page's last login.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecordNew": {
      "post": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Create account",
        "description": "Create a new account — Type 1 mutator.\r\n            \r\nPOST mutator. Pass the full `MT4UserCreate` DTO. Set\r\n`Login = 0` to let MT4 server assign the next free id, or\r\nrequest a specific id by setting `Login > 0` (the server\r\nrejects collisions with an MT4 error envelope).\r\n            \r\nThe wrapper accepts the account with empty password bytes; clients\r\nMUST follow up with `POST UserPasswordSet/{login}` before the\r\naccount is usable.\r\n            \r\nIdempotency-Key strongly recommended — a retried create without it\r\ncan land twice when the original response was lost on the wire,\r\nburning a second login id from the broker's sequence.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "New account fields. Login=0 for server-assigned id.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserCreate"
                  }
                ],
                "description": "Type 1 mutator input — full create shape for `UserRecordNew`.\r\nSame writable fields as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4UserUpdate minus the explicit\r\n`Balance`/`Credit` (those should come through dedicated balance\r\noperations after the account exists). The wrapper allocates the next free\r\nlogin id when `Login = 0`; clients may also request a specific id by\r\nsetting `Login > 0` (the server rejects collisions).\r\n            \r\nPassword / OTP / API-data fields are NOT on this DTO. After successful\r\ncreation, set the initial password via a separate\r\n`POST UserPasswordSet/{login}` call. The wrapper accepts the new\r\naccount with empty password bytes; the password endpoint lifts it to\r\nusable credentials."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserCreate"
                  }
                ],
                "description": "Type 1 mutator input — full create shape for `UserRecordNew`.\r\nSame writable fields as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4UserUpdate minus the explicit\r\n`Balance`/`Credit` (those should come through dedicated balance\r\noperations after the account exists). The wrapper allocates the next free\r\nlogin id when `Login = 0`; clients may also request a specific id by\r\nsetting `Login > 0` (the server rejects collisions).\r\n            \r\nPassword / OTP / API-data fields are NOT on this DTO. After successful\r\ncreation, set the initial password via a separate\r\n`POST UserPasswordSet/{login}` call. The wrapper accepts the new\r\naccount with empty password bytes; the password endpoint lifts it to\r\nusable credentials."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserCreate"
                  }
                ],
                "description": "Type 1 mutator input — full create shape for `UserRecordNew`.\r\nSame writable fields as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4UserUpdate minus the explicit\r\n`Balance`/`Credit` (those should come through dedicated balance\r\noperations after the account exists). The wrapper allocates the next free\r\nlogin id when `Login = 0`; clients may also request a specific id by\r\nsetting `Login > 0` (the server rejects collisions).\r\n            \r\nPassword / OTP / API-data fields are NOT on this DTO. After successful\r\ncreation, set the initial password via a separate\r\n`POST UserPasswordSet/{login}` call. The wrapper accepts the new\r\naccount with empty password bytes; the password endpoint lifts it to\r\nusable credentials."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserCreate"
                  }
                ],
                "description": "Type 1 mutator input — full create shape for `UserRecordNew`.\r\nSame writable fields as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4UserUpdate minus the explicit\r\n`Balance`/`Credit` (those should come through dedicated balance\r\noperations after the account exists). The wrapper allocates the next free\r\nlogin id when `Login = 0`; clients may also request a specific id by\r\nsetting `Login > 0` (the server rejects collisions).\r\n            \r\nPassword / OTP / API-data fields are NOT on this DTO. After successful\r\ncreation, set the initial password via a separate\r\n`POST UserPasswordSet/{login}` call. The wrapper accepts the new\r\naccount with empty password bytes; the password endpoint lifts it to\r\nusable credentials."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecordUpdate/{login}": {
      "post": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Update account",
        "description": "Update an account record — Type 1 mutator with secret-preservation read.\r\n            \r\n<br>\r\nSurface-level Type 1 semantics: client submits the full `MT4UserUpdate`\r\nDTO and the server writes it back. Implementation requires an extra\r\nread step because the wrapper `UserRecord` struct contains\r\nsecret/computed/read-only fields the v2 input DTO deliberately omits\r\n(Password, OTPSecret, LastDate, etc.). Without the read step those\r\nwould be zeroed out by the write.\r\n<br>\r\nFlow:\r\n<list type=\"number\"><item>Fetch the existing record via `UserRecordsRequest` (live, not pump cache).</item><item>Apply the DTO over the in-memory record using `ApplyTo`. Secrets and read-only fields are `[MapperIgnoreTarget]`'d so they survive.</item><item>Write the modified record back via `UserRecordUpdate`.</item></list><br><b>This is NOT Type 2.</b> Type 2 mutators (single-field) are deferred\r\nto a later release and will accept just the field name + value, doing\r\nthe read-modify-write entirely server-side. Both flows happen to use\r\nthe same read-modify-write structure on the implementation side — the\r\ndifference is what the client submits.\r\n<br>\r\nIdempotency-Key is strongly recommended; without it a retried update\r\nrisks silently overwriting concurrent edits that happened between\r\nthe original send and the retry.\r\n\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Replacement fields. Omitted-from-DTO fields are preserved server-side.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `UserRecordUpdate`.\r\nClient submits every non-secret, non-read-only, non-computed field; the\r\nhandler reads the current record from MT4 server, copies the secrets and\r\nread-only fields off it, applies this DTO over the rest, and writes the\r\nmodified structure back.\r\n            \r\nRead-only fields that do NOT appear here (preserved by the server-side\r\nread step):\r\n  * `Login` — passed as a path parameter, immutable identity.\r\n  * `RegistrationDate` — set once on creation, never updated.\r\n  * `LastDate`, `LastIP` — assigned by MT4 server during login.\r\n  * `PrevMonthBalance`, `PrevBalance`, `PrevMonthEquity`,\r\n    `PrevEquity` — derived server-side at reporting close.\r\n            \r\nSecret fields that do NOT appear here (preserved by the server-side\r\nread step; use dedicated endpoints to change them):\r\n  * `Password`, `PasswordInvestor`, `PasswordPhone` —\r\n    change via `POST UserPasswordSet`.\r\n  * `OTPSecret` — provisioned via separate admin flow.\r\n  * `APIData` — wrapper-internal blob, never client-controlled.\r\n            \r\n<br><b>Note on Balance/Credit:</b> these fields ARE accepted here because the\r\nwrapper `UserRecordUpdate` writes them directly. However, the audit-\r\ntrail-preserving way to move money is the dedicated balance operation\r\nendpoints (forthcoming) — submitting Balance via this DTO bypasses the\r\naudit log on MT4 server side.\r\n"
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `UserRecordUpdate`.\r\nClient submits every non-secret, non-read-only, non-computed field; the\r\nhandler reads the current record from MT4 server, copies the secrets and\r\nread-only fields off it, applies this DTO over the rest, and writes the\r\nmodified structure back.\r\n            \r\nRead-only fields that do NOT appear here (preserved by the server-side\r\nread step):\r\n  * `Login` — passed as a path parameter, immutable identity.\r\n  * `RegistrationDate` — set once on creation, never updated.\r\n  * `LastDate`, `LastIP` — assigned by MT4 server during login.\r\n  * `PrevMonthBalance`, `PrevBalance`, `PrevMonthEquity`,\r\n    `PrevEquity` — derived server-side at reporting close.\r\n            \r\nSecret fields that do NOT appear here (preserved by the server-side\r\nread step; use dedicated endpoints to change them):\r\n  * `Password`, `PasswordInvestor`, `PasswordPhone` —\r\n    change via `POST UserPasswordSet`.\r\n  * `OTPSecret` — provisioned via separate admin flow.\r\n  * `APIData` — wrapper-internal blob, never client-controlled.\r\n            \r\n<br><b>Note on Balance/Credit:</b> these fields ARE accepted here because the\r\nwrapper `UserRecordUpdate` writes them directly. However, the audit-\r\ntrail-preserving way to move money is the dedicated balance operation\r\nendpoints (forthcoming) — submitting Balance via this DTO bypasses the\r\naudit log on MT4 server side.\r\n"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `UserRecordUpdate`.\r\nClient submits every non-secret, non-read-only, non-computed field; the\r\nhandler reads the current record from MT4 server, copies the secrets and\r\nread-only fields off it, applies this DTO over the rest, and writes the\r\nmodified structure back.\r\n            \r\nRead-only fields that do NOT appear here (preserved by the server-side\r\nread step):\r\n  * `Login` — passed as a path parameter, immutable identity.\r\n  * `RegistrationDate` — set once on creation, never updated.\r\n  * `LastDate`, `LastIP` — assigned by MT4 server during login.\r\n  * `PrevMonthBalance`, `PrevBalance`, `PrevMonthEquity`,\r\n    `PrevEquity` — derived server-side at reporting close.\r\n            \r\nSecret fields that do NOT appear here (preserved by the server-side\r\nread step; use dedicated endpoints to change them):\r\n  * `Password`, `PasswordInvestor`, `PasswordPhone` —\r\n    change via `POST UserPasswordSet`.\r\n  * `OTPSecret` — provisioned via separate admin flow.\r\n  * `APIData` — wrapper-internal blob, never client-controlled.\r\n            \r\n<br><b>Note on Balance/Credit:</b> these fields ARE accepted here because the\r\nwrapper `UserRecordUpdate` writes them directly. However, the audit-\r\ntrail-preserving way to move money is the dedicated balance operation\r\nendpoints (forthcoming) — submitting Balance via this DTO bypasses the\r\naudit log on MT4 server side.\r\n"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UserUpdate"
                  }
                ],
                "description": "Type 1 mutator input — full-replace shape for `UserRecordUpdate`.\r\nClient submits every non-secret, non-read-only, non-computed field; the\r\nhandler reads the current record from MT4 server, copies the secrets and\r\nread-only fields off it, applies this DTO over the rest, and writes the\r\nmodified structure back.\r\n            \r\nRead-only fields that do NOT appear here (preserved by the server-side\r\nread step):\r\n  * `Login` — passed as a path parameter, immutable identity.\r\n  * `RegistrationDate` — set once on creation, never updated.\r\n  * `LastDate`, `LastIP` — assigned by MT4 server during login.\r\n  * `PrevMonthBalance`, `PrevBalance`, `PrevMonthEquity`,\r\n    `PrevEquity` — derived server-side at reporting close.\r\n            \r\nSecret fields that do NOT appear here (preserved by the server-side\r\nread step; use dedicated endpoints to change them):\r\n  * `Password`, `PasswordInvestor`, `PasswordPhone` —\r\n    change via `POST UserPasswordSet`.\r\n  * `OTPSecret` — provisioned via separate admin flow.\r\n  * `APIData` — wrapper-internal blob, never client-controlled.\r\n            \r\n<br><b>Note on Balance/Credit:</b> these fields ARE accepted here because the\r\nwrapper `UserRecordUpdate` writes them directly. However, the audit-\r\ntrail-preserving way to move money is the dedicated balance operation\r\nendpoints (forthcoming) — submitting Balance via this DTO bypasses the\r\naudit log on MT4 server side.\r\n"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UserRecord/{login}": {
      "patch": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Patch account",
        "description": "Type 2 mutator — partial update of a user record. Client sends a JSON object containing only the fields to change; the server reads the current record live from MT4 (Manager, not pump), overlays the patch, and writes back. Echoes the merged record.\r\n            \r\nUnknown keys in the patch body are silently ignored (forwards-compat).\r\nField-level validation is delegated to MT4 server — invalid values\r\nsurface as `MT4Error` envelopes. Secret-preservation and\r\ncomputed-field protection are handled by the existing Type 1 ApplyTo\r\nmapper's ignore list.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (immutable identity)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradeRecordsRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Get trade records batch (live)",
        "description": "Trade records for a batch of order tickets — live round-trip.\r\n            \r\nManager (live) call. Pass tickets as repeated query parameters:\r\n`?orders=12345&orders=67890`. Server-side billing counts this\r\nas one Manager request regardless of array length — prefer this over\r\nlooping single `TradeRecordGet` calls.\r\n            \r\nReturns the trade records the server has for the requested tickets.\r\nOrder in the response is NOT guaranteed to match the request order;\r\nmissing tickets are silently omitted (the envelope is not an error\r\nenvelope in that case — match by `order` field on the client).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "orders",
            "in": "query",
            "description": "Order tickets to request (repeat the query parameter)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ChartRequest/{symbol}": {
      "get": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Get chart bars",
        "description": "OHLC chart bars for a symbol over a date range.\r\n            \r\nManager (live) call. Resolves the symbol's `ConSymbol` first\r\n(needed by the wrapper to set scale/digits), then asks for bars of\r\nthe given `period` in the date window. `mode` defaults to\r\n`RangeInExcludeOutOfRage` — bars whose time falls strictly\r\ninside the window.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Bar period enum (M1, M5, M15, M30, H1, H4, D1, W1, MN1)",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChartPeriod"
                }
              ]
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Window start (UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Window end (UTC)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "description": "Bar inclusion mode at the edges; defaults to RangeInExcludeOutOfRage.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/RequestMode"
                }
              ]
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ChartBarListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ChartAdd/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Add chart bars",
        "description": "Append OHLC bars to a symbol's chart history — POST destructive.\r\n            \r\nManager (live) call that appends the provided bars to the symbol's\r\nhistorical chart for the given `period`. The wrapper looks up the\r\nsymbol's scale (`Multiply`/`Digits`) internally to encode the\r\nfloat OHLC values back into native integer prices.\r\n            \r\nIdempotency-Key strongly recommended — duplicate writes can corrupt the\r\nhistorical data series.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Bar period enum (M1, M5, M15, M30, H1, H4, D1, W1, MN1)",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChartPeriod"
                }
              ]
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "OHLC bars to append. `Rates` must be non-empty.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ChartUpdate/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Update chart bars",
        "description": "Overwrite existing OHLC bars in a symbol's chart history — POST destructive.\r\n            \r\nManager (live) call. Replaces bars at the timestamps provided in\r\n`Rates` for the given `period`. Bars whose timestamps don't\r\nmatch an existing bar are silently ignored by the MT4 server.\r\n            \r\nIdempotency-Key strongly recommended.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Bar period enum",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChartPeriod"
                }
              ]
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "OHLC bars to overwrite (matched by `Time`).",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ChartDelete/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Delete chart bars",
        "description": "Delete OHLC bars from a symbol's chart history — POST destructive.\r\n            \r\nManager (live) call. Removes bars whose `Time` matches the\r\nentries in `Rates` for the given `period`. Only the bar\r\ntimestamp is consulted server-side; OHLC values can be zero.\r\n            \r\nIdempotency-Key strongly recommended — silently repeating a delete on\r\nalready-removed bars is harmless, but accidental double-submit could\r\nnudge audit logs with extra \"operation requested\" entries.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "period",
            "in": "query",
            "description": "Bar period enum",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ChartPeriod"
                }
              ]
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "Bars to delete; only `Time` is significant.",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4ChartWriteRequest"
                  }
                ],
                "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/HistoryCorrect/{symbol}": {
      "post": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Repair chart history",
        "description": "Recompute and patch internal consistency of a symbol's chart history.\r\n            \r\nManager (live) call. The MT4 server walks the symbol's full bar\r\nhistory for every period and fixes inconsistencies (gaps, broken\r\nOHLC relationships, mismatched aggregates). Returns the count of\r\nbars that the server corrected — zero is a valid result (history\r\nwas already consistent).\r\n            \r\nRequires Administrator rights on the manager account. The operation\r\ncan take many seconds on long histories; pair with\r\n`Idempotency-Key` for retry safety so a TCP retry doesn't\r\nkick off a second full sweep.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Int32ApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TicksRequest/{symbol}": {
      "get": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Get historical ticks",
        "description": "Historical ticks for a symbol over a date range.\r\n            \r\nManager (live) call returning a list of `MT4TickRecord` DTOs.\r\n`flags` controls whether raw and/or normalised ticks are\r\nincluded (defaults to `All`). Heavy endpoint — pair with\r\n`Idempotency-Key` for retry safety.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "description": "Window start (UTC, ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end",
            "in": "query",
            "description": "Window end (UTC, ISO 8601)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "flags",
            "in": "query",
            "description": "Tick request flags. Defaults to All.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TickRequestFlags"
                }
              ]
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TickRecordListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/JournalRequest": {
      "get": {
        "tags": [
          "MT4 v2 :: Common"
        ],
        "summary": "Get server journal",
        "description": "Server journal (log) entries for a date window.\r\n            \r\nManager (live) call — round-trips to MT4 server. Returns log entries\r\nin `[from, to]` range filtered by `mode` and an optional\r\nfree-text `filter`. Defaults: `mode = Full`, `to = now`\r\n(server time).\r\n            \r\nHeavier endpoint — large date windows return large arrays. Pair with\r\nreasonable `from`/`to` bounds; consider `Idempotency-Key`\r\nfor retry safety on slow links.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "from",
            "in": "query",
            "description": "Window start (UTC, ISO 8601 — required)",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "description": "Window end (UTC, ISO 8601). Defaults to current server time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "description": "Log category filter. Defaults to Full.",
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EnLogType"
                }
              ]
            }
          },
          {
            "name": "filter",
            "in": "query",
            "description": "Optional substring filter applied server-side.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4ServerLogListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/ExternalCommandJSON": {
      "post": {
        "tags": [
          "MT4 v2 :: Plugins"
        ],
        "summary": "Send plugin command (JSON)",
        "description": "Plugin custom-command channel with JSON payload in both directions.\r\n            \r\nManager (live) call wrapping `ExternalCommandJSON`. The MT4\r\nserver forwards the body to whichever installed plugin claims the\r\ncommand first; the first plugin returning `RET_OK` wins and its\r\nresponse becomes the v2 payload. The request body is sent verbatim\r\n(no field renaming, no schema enforcement) so the plugin author\r\nowns the over-the-wire contract on both ends.\r\n            \r\nThe wrapper trio (`ExternalCommand<TIn,TOut>` for binary\r\nmarshal, `ExternalCommandCustom<T>` for caller-supplied\r\nserializer) is intentionally not exposed in v2 — those variants\r\nrequire compile-time struct layouts shared between client and\r\nplugin, which a REST surface cannot guarantee. Plugin developers\r\nwho need binary transport should keep using the wrapper directly\r\nfrom the WebAPI process or build a dedicated binary endpoint.\r\n            \r\nIdempotency-Key is strongly recommended — plugins may have side\r\neffects, and the channel itself gives no read-modify-write\r\nsemantics.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "requestBody": {
          "description": "The command as JSON, passed to the server plugin verbatim.",
          "content": {
            "application/json": {
              "schema": {
                "description": "Any JSON value."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonNodeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmTradesRequest/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "List group trades (admin)",
        "description": "All trades belonging to accounts in a given group (admin scope).\r\n            \r\nManager (live) call. Returns trades for every account assigned to\r\nthe given group. `openOnly=true` filters out closed trades on\r\nthe server side. Pair with `Idempotency-Key` on retry — large\r\ngroups can return substantial payloads.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Account group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "openOnly",
            "in": "query",
            "description": "If true, only open trades are returned. Defaults to true.",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmUsersRequestSafe/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "List group accounts (admin)",
        "description": "All user accounts in a given group (admin scope) — the safe variant that honors permission checks server-side.\r\n            \r\nManager (live) call. Returns the curated `MT4User` projection\r\nfor every account in the specified group. The wrapper's \"Safe\" suffix\r\nindicates it runs through `RunSafe` with the `Admin` rights\r\nguard — a manager lacking that permission receives a sensible error\r\nrather than a connection drop.\r\n            \r\nComma-separated group lists are accepted by the wrapper (it strips\r\ncommas and trims whitespace internally); the simplest call pattern\r\nis a single group name. Large groups may return substantial\r\npayloads — pair with `Idempotency-Key` on retry.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Account group name (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/AdmTradesDelete": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Delete trades (admin)",
        "description": "Bulk-deletes a list of trade tickets (administrative scope). Used for cleanup after reconciliation mistakes, simulator state reset, or compliance-mandated removal.\r\n            \r\nManager-live POST. The wrapper accepts a flat `int[]` of order\r\ntickets and a count; we mirror the existing batched-int pattern\r\n(repeat `?orders=` per ticket — same convention as\r\n`UserRecordsRequest`'s `?logins=`). Empty arrays are\r\nrejected with Validation.\r\n            \r\n**Destructive.** Each ticket in the array is removed from the\r\nserver's trade table; this is not reversible from the API side.\r\nPair with `Idempotency-Key` so retries don't re-process partial\r\nfailures.\n\n**Timeout:** 5 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "orders",
            "in": "query",
            "description": "Order tickets to delete (repeat the query\r\n             parameter — must be non-empty)",
            "schema": {
              "type": "array",
              "items": {
                "type": "integer",
                "format": "int32"
              }
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 5 s (trade operation). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/EnsureGroupNameExist/{group}": {
      "get": {
        "tags": [
          "MT4 v2 :: Groups"
        ],
        "summary": "Check group exists",
        "description": "Checks whether a trading group exists on the connected MT4 server. Useful as a validation pre-flight before creating users, moving users between groups, or wiring up automated provisioning.\r\n            \r\nManager-live read. The wrapper's `EnsureGroupNameExist` helper\r\nis internal/private, so this v2 endpoint re-implements the check\r\ndirectly: enumerate the full group catalog via\r\n`GroupsRequest` and look up the key. The same Manager request\r\nis incurred either way; there is no cheaper \"exists\" call in the\r\nMT4 ManagerAPI surface.\r\n            \r\nReturns `true` if the group is configured on the server,\r\n`false` otherwise. Group lookup is case-sensitive (MT4 group\r\nnames are case-sensitive in the underlying API).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name to look up (max 16 chars)",
            "required": true,
            "schema": {
              "maxLength": 16,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UsersSyncStart": {
      "post": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Start user-records sync",
        "description": "Opens a server-side incremental sync session for user records modified at or after timestamp.\r\n            \r\nManager-live POST (modifies server-side session state). The wrapper\r\nsupports a follow-up `UsersSyncRead` call that drains the\r\nsnapshot, but the read-side endpoint is currently deferred under\r\nwine x64 (see deferral note above this method). Pass\r\n`timestamp=0` to request all user records.\r\n            \r\n`timestamp` is Unix epoch seconds (int32) in MT4 server-local\r\ntime, not UTC. Returns a bare success envelope.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Unix-epoch-second cutoff (server-local time;\r\n             0 = pull all)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesSyncStart": {
      "post": {
        "tags": [
          "MT4 v2 :: Trades"
        ],
        "summary": "Start trade-records sync",
        "description": "Opens a server-side incremental sync session for trade records modified at or after timestamp.\r\n            \r\nManager-live POST (modifies server-side session state). The\r\nfollow-up `TradesSyncRead` drain is deferred under wine x64\r\n(see deferral note in the Users section above). Pass\r\n`timestamp=0` to request all trades. The timestamp is Unix\r\nepoch seconds (int32) in MT4 server-local time, not UTC.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timestamp",
            "in": "query",
            "description": "Unix-epoch-second cutoff (server-local time;\r\n             0 = pull all)",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/UsersGroupOp": {
      "post": {
        "tags": [
          "MT4 v2 :: Users"
        ],
        "summary": "Bulk account operation",
        "description": "Bulk operation on a list of account logins — change group, leverage, enable/disable, or delete in a single Manager round-trip.\r\n            \r\nManager (live) call. Wraps `UsersGroupOp(GroupCommandInfo, ICollection<int>)`.\r\nThe body specifies the command and its parameter (NewGroup for\r\nSetGroup, Leverage for Leverage; both ignored for Delete/Enable/\r\nDisable) plus the list of target logins. The wrapper auto-fills\r\nthe internal `Len` field from the logins array — clients do\r\nnot set it.\r\n            \r\nWine x64 safe: the wrapper uses `AllocArraySafe` on the int\r\nlogin array (single contiguous pack, no UnpackObject loop) and\r\n`AllocSafe` on the GroupCommandInfo struct.\r\n            \r\nRequires Manager or Administrator access rights on the manager\r\naccount; the wrapper enforces this server-side. Idempotency-Key\r\nstrongly recommended — bulk Delete / SetGroup operations are\r\ndestructive on customer-visible state.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "requestBody": {
          "description": "Operation envelope (Command, NewGroup/Leverage, Logins).",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UsersGroupOp"
                  }
                ],
                "description": "v2 request body for `UsersGroupOp` — bulk group-membership / leverage /\r\nenable-disable / delete operation across a list of account logins."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UsersGroupOp"
                  }
                ],
                "description": "v2 request body for `UsersGroupOp` — bulk group-membership / leverage /\r\nenable-disable / delete operation across a list of account logins."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UsersGroupOp"
                  }
                ],
                "description": "v2 request body for `UsersGroupOp` — bulk group-membership / leverage /\r\nenable-disable / delete operation across a list of account logins."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4UsersGroupOp"
                  }
                ],
                "description": "v2 request body for `UsersGroupOp` — bulk group-membership / leverage /\r\nenable-disable / delete operation across a list of account logins."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TradesUserHistory/{login}": {
      "get": {
        "tags": [
          "MT4 v2 :: History"
        ],
        "summary": "Get account trade history",
        "description": "Closed trades history for a single account in a time range.\r\n            \r\nManager (live) call — round-trips to MT4 server. Default time range\r\nis \"everything\" (epoch → MaxValue) when query params are omitted.\r\nReturns an empty list if the account has no closed trades in the\r\nwindow. Trades are mapped to the curated `MT4Trade` DTO; same\r\nshape as live `TradesGetByMarket` / `TradesGetBySymbol`.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "Account login (positive integer)",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "fromTime",
            "in": "query",
            "description": "Window start (UTC, ISO 8601). Optional.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "toTime",
            "in": "query",
            "description": "Window end (UTC, ISO 8601). Optional.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TickInfoLast/{symbol}": {
      "get": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Get last tick (cached)",
        "description": "Last known bid/ask tick for a single symbol from the pump cache.\r\n            \r\nPump-cached read of the last tick. For sub-second updates prefer the\r\nSignalR tick stream over polling. Returns NotFound envelope when the\r\npump cache has no tick for the requested symbol (symbol not in the\r\nactive subscription set, or the platform has never received a tick\r\nsince startup).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name (e.g. \"EURUSD\", max 12 chars)",
            "required": true,
            "schema": {
              "maxLength": 12,
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TickInfoApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/TickInfoLast": {
      "get": {
        "tags": [
          "MT4 v2 :: Prices"
        ],
        "summary": "Get last ticks, all symbols (cached)",
        "description": "Last known bid/ask tick for ALL symbols in the pump cache.\r\n            \r\nSnapshot of every symbol the pump has received quotes for. Empty list\r\nwhen no quotes have been received yet. For sub-second updates use the\r\nSignalR tick stream — this endpoint is intended for one-shot snapshots\r\n(warm-up, monitoring dashboards, idempotent cache scenarios).\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TickInfoListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvFeeders": {
      "get": {
        "tags": [
          "MT4 v2 :: Server Admin"
        ],
        "summary": "List data feeders",
        "description": "List of running data feeders on the MT4 server (admin-only read).\r\n            \r\nManager (live) call to the wrapper's `SrvFeeders`. Returns the\r\ncurrent set of running feeder configurations as opposed to\r\n`CfgRequestFeeder` which returns the static configuration. The\r\ndata shape is the same as `CfgRequestFeeder` — `MT4Feeder`\r\n— and the credential (`Password`) is intentionally excluded.\r\n<br>\r\nSorted by `Name` ascending. Paged with the same cursor codec as\r\nthe rest of the v2 paged endpoints (`Name` is the cursor key).\r\n\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4FeederListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/LicenseCheck/{licenseName}": {
      "get": {
        "tags": [
          "MT4 v2 :: Server Admin"
        ],
        "summary": "Check license",
        "description": "Check a license name against the MT4 server's license registry — admin-only read.\r\n            \r\nManager (live) call to the wrapper's `LicenseCheck(name)`.\r\nReturns a bare `bool` payload: `true` when the wrapper's\r\nresult code is `Ok`, indicating the license is recognized;\r\n`false` on any non-Ok code (covers both \"license not found\"\r\nand \"manager lacks permission to query the license registry\").\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "licenseName",
            "in": "path",
            "description": "License name to verify against the MT4 server's registry",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/NotificationsSend": {
      "post": {
        "tags": [
          "MT4 v2 :: Server Admin"
        ],
        "description": "**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4NotificationsSendRequest"
                  }
                ],
                "description": "Request body for the v2 `NotificationsSend` admin endpoint —\r\npushes a single message to one or more MT4 clients identified by\r\naccount login. Maps onto the wrapper's\r\n`NotificationsSend2(int[] logins, string message)`."
              }
            },
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4NotificationsSendRequest"
                  }
                ],
                "description": "Request body for the v2 `NotificationsSend` admin endpoint —\r\npushes a single message to one or more MT4 clients identified by\r\naccount login. Maps onto the wrapper's\r\n`NotificationsSend2(int[] logins, string message)`."
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4NotificationsSendRequest"
                  }
                ],
                "description": "Request body for the v2 `NotificationsSend` admin endpoint —\r\npushes a single message to one or more MT4 clients identified by\r\naccount login. Maps onto the wrapper's\r\n`NotificationsSend2(int[] logins, string message)`."
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/MT4NotificationsSendRequest"
                  }
                ],
                "description": "Request body for the v2 `NotificationsSend` admin endpoint —\r\npushes a single message to one or more MT4 clients identified by\r\naccount login. Maps onto the wrapper's\r\n`NotificationsSend2(int[] logins, string message)`."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvFeederLog/{name}": {
      "get": {
        "tags": [
          "MT4 v2 :: Server Admin"
        ],
        "summary": "Get feeder log",
        "description": "Server log for a single feeder by name (admin-only read).\r\n            \r\nManager (live) call to the wrapper's `SrvFeederLog(name)`. Returns\r\nthe feeder's log buffer as a string (empty when the feeder is unknown\r\nor has no recent log activity). Payload is the raw log text — not an\r\narray of lines — to preserve formatting at the wrapper boundary.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "name",
            "in": "path",
            "description": "Feeder name (matched server-side; case-sensitive)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StringApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvRestart": {
      "post": {
        "tags": [
          "MT4 v2 :: Server Admin (destructive)"
        ],
        "summary": "Restart server",
        "description": "Soft-restart of the MT4 server process. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's `SrvRestart()`. The current\r\nmanager connection is dropped during the restart cycle — clients\r\nshould expect the next request to surface a fresh login. Audit lines\r\nare emitted on both sides of the wrapper call (independently of the\r\nHTTP response).\r\n<br>\r\nThe `?confirm=true` guard rejects calls without the literal\r\nquery string. It is a deliberateness signal, NOT an authorization\r\nmechanism — admin rights are still enforced separately.\r\n\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvChartsSync": {
      "post": {
        "tags": [
          "MT4 v2 :: Server Admin (destructive)"
        ],
        "summary": "Force chart resync",
        "description": "Force chart-history resync across the plugin set. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's `SrvChartsSync()`. Forces\r\nthe MT4 server to walk every plugin's chart-history feed and bring\r\nthe local cache in sync. Idempotent — running twice is a no-op\r\nagainst an already-synced state.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvLiveUpdateStart": {
      "post": {
        "tags": [
          "MT4 v2 :: Server Admin (destructive)"
        ],
        "summary": "Start LiveUpdate distributor",
        "description": "Kick the LiveUpdate distributor. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's `SrvLiveUpdateStart()`.\r\nStarts (or restarts) the server's outbound LiveUpdate broadcast.\r\nAffects connected client terminals — they may receive an update prompt.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/SrvFeedsRestart": {
      "post": {
        "tags": [
          "MT4 v2 :: Server Admin (destructive)"
        ],
        "summary": "Restart data feeders",
        "description": "Restart all running data feeders. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's `SrvFeedsRestart()`.\r\nCycles all running quote/news feeders. May cause a brief gap in\r\nthe tick stream — typically a second or two. Idempotent.\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupInfoUsers/{mode}": {
      "get": {
        "tags": [
          "MT4 v2 :: Backup"
        ],
        "summary": "List user backup files",
        "description": "List backup user files available on the MT4 server for a given mode.\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupInfoUsers(int mode)`. Returns the catalog of backup\r\nfiles (filename, size, mtime) — does NOT touch the files themselves.\r\nRead-only operation: safe to call repeatedly.\r\n<br>`mode` is the server-defined backup mode selector (typical\r\nvalues: `0` = daily, `1` = weekly — confirm against your\r\nserver's `ConBackup` configuration).\r\n\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mode",
            "in": "path",
            "description": "Backup mode selector (0 = daily, 1 = weekly — server-defined)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BackupInfoListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupInfoOrders/{mode}": {
      "get": {
        "tags": [
          "MT4 v2 :: Backup"
        ],
        "summary": "List order backup files",
        "description": "List backup order files available on the MT4 server for a given mode.\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupInfoOrders(int mode)`. Order-side counterpart of\r\n`BackupInfoUsers` — same shape, different catalog.\r\nRead-only operation.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mode",
            "in": "path",
            "description": "Backup mode selector (0 = daily, 1 = weekly — server-defined)",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4BackupInfoListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupRequestUsers/{file}": {
      "get": {
        "tags": [
          "MT4 v2 :: Backup"
        ],
        "summary": "Read users from backup",
        "description": "Read user records out of a backup file (does NOT restore — read-only).\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupRequestUsers(string file, string request)`. The wrapper\r\nextracts records from the named backup file but does NOT write\r\nthem back to the live DB — that requires a separate (destructive)\r\n`BackupRestoreUsers` call which is part of Wave 4b.\r\n<br>\r\nUse `BackupInfoUsers` first to discover valid\r\nfile names. The optional `request` query\r\nis a server-defined filter string; empty string returns all users.\r\n<br><b>Heavy operation:</b> backup files can contain millions of\r\nrecords — the wrapper returns the full set in one shot. The\r\noptional `limit` query truncates the response server-side\r\n(default 10000, max 100000). The wrapper still loads the full\r\nfile regardless of limit — limit only caps the JSON response size.\r\n\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file",
            "in": "path",
            "description": "Backup file name (from `BackupInfoUsers`)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "request",
            "in": "query",
            "description": "Filter request string (empty = all users)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Server-side response cap (1..100000, default 10000)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4UserListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupRequestOrders/{file}": {
      "get": {
        "tags": [
          "MT4 v2 :: Backup"
        ],
        "summary": "Read orders from backup",
        "description": "Read trade records out of a backup file (does NOT restore — read-only).\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupRequestOrders(string file, string request)`. Order-side\r\ncounterpart of `BackupRequestUsers`. Same caveats:\r\nread-only, full file loaded server-side regardless of `limit`,\r\ndestructive restore is a separate (Wave 4b) operation.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "file",
            "in": "path",
            "description": "Backup file name (from `BackupInfoOrders`)",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "request",
            "in": "query",
            "description": "Filter request string (empty = all orders)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Server-side response cap (1..100000, default 10000)",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 10000
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupRestoreUsers": {
      "post": {
        "tags": [
          "MT4 v2 :: Backup (destructive)"
        ],
        "summary": "Restore users from backup",
        "description": "Restore user records into the live MT4 database. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupRestoreUsers(UserRecord[] users)`. Each input\r\n`MT4UserRestoreInput` is mapped to a fresh `UserRecord`\r\nwith the narrow restore field set — secrets, OTP, server-managed\r\ntimestamps, and reserved blobs are NOT carried (see DTO docs).\r\n<br>\r\nIdempotency-Key header is <b>strongly recommended</b>: a network\r\nblip during a multi-user restore can leave the client uncertain\r\nwhether the write happened. Without the key, retry will double-write.\r\n<br>\r\nBatch cap: 10000 records per call. Larger restores must be split.\r\n\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "requestBody": {
          "description": "Array of users to restore (1..10000 records)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4UserRestoreInput"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4UserRestoreInput"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4UserRestoreInput"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4UserRestoreInput"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BooleanApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT4/{tradePlatform}/BackupRestoreOrders": {
      "post": {
        "tags": [
          "MT4 v2 :: Backup (destructive)"
        ],
        "summary": "Restore orders from backup",
        "description": "Restore order records into the live MT4 database. Destructive — requires `?confirm=true`.\r\n            \r\nManager (live) call to the wrapper's\r\n`BackupRestoreOrders(TradeRecord[] trades)`. Returns\r\n`MT4TradeRestoreResult[]` — one entry per input trade, with\r\n`Order` (ticket) and `Res` (0 = error, 1 = restored).\r\nPosition in the response array matches position in the request.\r\n<br>\r\nIdempotency-Key header is <b>strongly recommended</b>. Batch cap:\r\n10000 records per call.\r\n\n\n**Timeout:** 60 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform id (GUID)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "confirm",
            "in": "query",
            "description": "Required deliberateness flag — must equal `true`",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 60 s (server maintenance). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 60
            }
          }
        ],
        "requestBody": {
          "description": "Array of trades to restore (1..10000 records)",
          "content": {
            "application/json-patch+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4TradeRestoreInput"
                }
              }
            },
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4TradeRestoreInput"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4TradeRestoreInput"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/MT4TradeRestoreInput"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT4TradeRestoreResultListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/ServerTime": {
      "get": {
        "tags": [
          "MT5 v2 :: Common"
        ],
        "summary": "Get server time",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DateTimeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/TimeGet": {
      "get": {
        "tags": [
          "MT5 v2 :: Common"
        ],
        "summary": "Get server time configuration",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5TimeApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/ManagerCurrent": {
      "get": {
        "tags": [
          "MT5 v2 :: Managers"
        ],
        "summary": "Get the current session manager",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5ConManagerApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/GroupGet/{group}": {
      "get": {
        "tags": [
          "MT5 v2 :: Groups"
        ],
        "summary": "Get a group by name",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5ConGroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/GroupRecord/{group}": {
      "patch": {
        "tags": [
          "MT5 v2 :: Groups"
        ],
        "summary": "Partially update a group",
        "description": "Send only the fields you want to change (JSON Merge Patch, RFC 7386);\r\nomitted fields keep their current values. Returns the updated record.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "group",
            "in": "path",
            "description": "Group name.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5ConGroupApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/UserGet/{login}": {
      "get": {
        "tags": [
          "MT5 v2 :: Users"
        ],
        "summary": "Get a user by login",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "User login (account number).",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/UserRecord/{login}": {
      "patch": {
        "tags": [
          "MT5 v2 :: Users"
        ],
        "summary": "Partially update a user",
        "description": "Send only the fields you want to change (JSON Merge Patch, RFC 7386);\r\nomitted fields keep their current values. Returns the updated record.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "login",
            "in": "path",
            "description": "User login (account number).",
            "required": true,
            "schema": {
              "minimum": 1,
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5UserApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/SymbolGet/{symbol}": {
      "get": {
        "tags": [
          "MT5 v2 :: Symbols"
        ],
        "summary": "Get a symbol by name",
        "description": "**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name, e.g. \"EURUSD\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5SymbolApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/SymbolRecord/{symbol}": {
      "patch": {
        "tags": [
          "MT5 v2 :: Symbols"
        ],
        "summary": "Partially update a symbol",
        "description": "Send only the fields you want to change (JSON Merge Patch, RFC 7386);\r\nomitted fields keep their current values. Returns the updated record.\n\n**Timeout:** 15 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: The operation may still be completed by the server (`X-Request-Outcome: unknown`): check its result before repeating it.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "symbol",
            "in": "path",
            "description": "Symbol name, e.g. \"EURUSD\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 15 s (change). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 15
            }
          }
        ],
        "requestBody": {
          "description": "JSON Merge Patch: an object with only the fields to change.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            },
            "application/merge-patch+json": {
              "schema": {
                "type": "object",
                "description": "Only the fields to change; the rest of the record stays as it is."
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5SymbolApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/PositionByGroup/{mask}": {
      "get": {
        "tags": [
          "MT5 v2 :: Trades"
        ],
        "summary": "List positions by group",
        "description": "Returns open positions for all logins in groups matching the mask,\r\nordered by Position ID ascending. Use the cursor for the next page.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mask",
            "in": "path",
            "description": "Group mask — exact group name or a wildcard like \"real\\*\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5PositionListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/OrderByGroup/{mask}": {
      "get": {
        "tags": [
          "MT5 v2 :: Trades"
        ],
        "summary": "List orders by group",
        "description": "Returns active and pending orders for all logins in groups matching the mask,\r\nordered by Order ID ascending. Use the cursor for the next page.\n\n**Timeout:** 10 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mask",
            "in": "path",
            "description": "Group mask — exact group name or a wildcard like \"real\\*\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 10 s (read). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5OrderListApiResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/MT5/{tradePlatform}/DealByGroup/{mask}": {
      "get": {
        "tags": [
          "MT5 v2 :: Trades"
        ],
        "summary": "List deals by group",
        "description": "Returns deals for all logins in groups matching the mask, ordered by Deal ID ascending.\r\nReturns the full history by default. Use the cursor for the next page.\n\n**Timeout:** 30 s by default, adjustable per request with the `X-Request-Timeout` header. When the trade server does not answer in time: Nothing was changed; the request is safe to repeat.",
        "parameters": [
          {
            "name": "tradePlatform",
            "in": "path",
            "description": "Trade platform identifier (GUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "mask",
            "in": "path",
            "description": "Group mask — exact group name or a wildcard like \"real\\*\".",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of items to return in one page. Omit to return all items in a single page.\r\nMaximum allowed value is 5000.",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "description": "Opaque continuation token. Pass the value from the previous response's\r\n`meta.paging.nextCursor` to fetch the next page; omit for the first page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Request-Timeout",
            "in": "header",
            "description": "How long to wait for the trade server, in seconds (1–300). Default for this operation: 30 s (history or report). The query parameter `requestTimeout` does the same for clients that cannot set headers. The applied value is returned in the `X-Request-Timeout-Applied` response header.",
            "schema": {
              "maximum": 300,
              "minimum": 1,
              "type": "number",
              "format": "double",
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MT5DealListApiResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ActivationModes": {
        "enum": [
          "None",
          "SL",
          "TP",
          "StopOut"
        ],
        "type": "string"
      },
      "ActivationType": {
        "enum": [
          "None",
          "SL",
          "TP",
          "Pending",
          "Stopout",
          "StopOutRollback",
          "PendingRollback",
          "TPRollback",
          "SLRollback"
        ],
        "type": "string"
      },
      "ApiError": {
        "type": "object",
        "properties": {
          "code": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WebApiErrorCode"
              }
            ],
            "description": "Stable transport-level error code."
          },
          "managerCode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ResultCode"
              }
            ],
            "description": "Raw MT4/MT5 manager result code, when the error came from the trading platform; otherwise null.",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Human-readable error description.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description."
      },
      "ApiMeta": {
        "type": "object",
        "properties": {
          "activityId": {
            "type": "string",
            "description": "W3C trace id for correlating this response in logs and tracing (Seq/SigNoz).",
            "nullable": true
          },
          "paging": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PagingMeta"
              }
            ],
            "description": "Pagination info; present only on list responses, omitted otherwise.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull."
      },
      "ArcBackupExecutionPeriod": {
        "enum": [
          "M5",
          "M15",
          "M30",
          "H1"
        ],
        "type": "string"
      },
      "ArcBackupStorePeriod": {
        "enum": [
          "W1",
          "W2",
          "Mn1",
          "Mn3",
          "Mn6"
        ],
        "type": "string"
      },
      "BackupExecutionPeriod": {
        "enum": [
          "H1",
          "H4",
          "D1"
        ],
        "type": "string"
      },
      "BackupStorePeriod": {
        "enum": [
          "Mn1",
          "Mn3",
          "Mn6",
          "Y1"
        ],
        "type": "string"
      },
      "BooleanApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "boolean"
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "ChartPeriod": {
        "enum": [
          "M1",
          "M5",
          "M15",
          "M30",
          "H1",
          "H4",
          "D1",
          "W1",
          "Mn1"
        ],
        "type": "string"
      },
      "DataFeedMode": {
        "enum": [
          "Quotes",
          "News",
          "QuotesNews"
        ],
        "type": "string"
      },
      "DateTimeApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "format": "date-time"
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "DealAction": {
        "enum": [
          "Buy",
          "Sell",
          "Balance",
          "Credit",
          "Charge",
          "Correction",
          "Bonus",
          "Commission",
          "CommissionDaily",
          "CommissionMonthly",
          "AgentDaily",
          "AgentMonthly",
          "InterestRate",
          "BuyCanceled",
          "SellCanceled",
          "Dividend",
          "DividendFranked",
          "Tax",
          "Agent",
          "SOCompensation",
          "SOCompensationCredit"
        ],
        "type": "string"
      },
      "DealReason": {
        "enum": [
          "Client",
          "Expert",
          "Dealer",
          "Sl",
          "Tp",
          "So",
          "Rollover",
          "ExternalClient",
          "VMargin",
          "Gateway",
          "Signal",
          "Settlement",
          "Transfer",
          "Sync",
          "ExternalService",
          "Migration",
          "Mobile",
          "Web",
          "Split",
          "CorporateAction"
        ],
        "type": "string"
      },
      "EnAuthMode": {
        "enum": [
          "Standard",
          "Rsa1024",
          "Rsa2048",
          "RsaCustom"
        ],
        "type": "string"
      },
      "EnAuthOTPMode": {
        "enum": [
          "Disabled",
          "TotpSha256",
          "TotpSha256Web"
        ],
        "type": "string"
      },
      "EnCalcMode": {
        "enum": [
          "Forex",
          "Futures",
          "Cfd",
          "CfdIndex",
          "CfdLeverage",
          "ForexNoLeverage",
          "ExchStocks",
          "ExchFutures",
          "ExchFuturesForts",
          "ExchOptions",
          "ExchOptionsMargin",
          "ExchBonds",
          "ExchStocksMoex",
          "ExchBondsMoex",
          "ServCollateral"
        ],
        "type": "string"
      },
      "EnChartMode": {
        "enum": [
          "BidPrice",
          "LastPrice",
          "Old"
        ],
        "type": "string"
      },
      "EnCommActionMode": {
        "enum": [
          "All",
          "Buy",
          "Sell"
        ],
        "type": "string"
      },
      "EnCommChargeMode": {
        "enum": [
          "Daily",
          "Monthly",
          "Instant"
        ],
        "type": "string"
      },
      "EnCommEntryMode": {
        "enum": [
          "All",
          "In",
          "Out"
        ],
        "type": "string"
      },
      "EnCommMode": {
        "enum": [
          "Standard",
          "Agent",
          "Fee"
        ],
        "type": "string"
      },
      "EnCommProfitMode": {
        "enum": [
          "All",
          "Profit",
          "Loss"
        ],
        "type": "string"
      },
      "EnCommRangeMode": {
        "enum": [
          "Volume",
          "OverturnMoney",
          "OverturnVolume",
          "Value",
          "Profit"
        ],
        "type": "string"
      },
      "EnCommReasonFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Client, Expert\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Client = 0x1, Expert = 0x2, Dealer = 0x4, ExternalClient = 0x8, Mobile = 0x10, Web = 0x20, Signal = 0x40. Accepted on input, never written: All = Client, Expert, Dealer, ExternalClient, Mobile, Web, Signal.",
        "example": "Client, Expert",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Client",
          "Expert",
          "Dealer",
          "ExternalClient",
          "Mobile",
          "Web",
          "Signal"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64
        ]
      },
      "EnCommissionMode": {
        "enum": [
          "MoneyDeposit",
          "MoneySymbolBase",
          "MoneySymbolProfit",
          "MoneySymbolMargin",
          "Pips",
          "Percent",
          "MoneySpecified",
          "PercentProfit"
        ],
        "type": "string"
      },
      "EnCommissionVolumeType": {
        "enum": [
          "Deal",
          "Volume"
        ],
        "type": "string"
      },
      "EnExecutionMode": {
        "enum": [
          "Request",
          "Instant",
          "Market",
          "Exchange"
        ],
        "type": "string"
      },
      "EnExpirationFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"GtC, Day\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: GtC = 0x1, Day = 0x2, Specified = 0x4, SpecifiedDay = 0x8. Accepted on input, never written: All = GtC, Day, Specified, SpecifiedDay.",
        "example": "GtC, Day",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "GtC",
          "Day",
          "Specified",
          "SpecifiedDay"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8
        ]
      },
      "EnFillingFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"FoK, IoC\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: FoK = 0x1, IoC = 0x2, BoC = 0x4. Accepted on input, never written: All = FoK, IoC, BoC.",
        "example": "FoK, IoC",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "FoK",
          "IoC",
          "BoC"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4
        ]
      },
      "EnFreeMarginMode": {
        "enum": [
          "NotUsePL",
          "UsePL",
          "Profit",
          "Loss"
        ],
        "type": "string"
      },
      "EnGatewayAccountFlags": {
        "enum": [
          "None",
          "Quotes"
        ],
        "type": "string"
      },
      "EnGtcMode": {
        "enum": [
          "GtC",
          "Daily",
          "DailyNoStops"
        ],
        "type": "string"
      },
      "EnHistoryLimit": {
        "enum": [
          "All",
          "Months1",
          "Months3",
          "Months6",
          "Year1",
          "Year2",
          "Year3"
        ],
        "type": "string"
      },
      "EnIndustries": {
        "enum": [
          "Undefined",
          "AgriculturalInputs",
          "Aluminium",
          "BuildingMaterials",
          "Chemicals",
          "CokingCoal",
          "Copper",
          "Gold",
          "LumberWood",
          "IndustrialMetals",
          "PreciousMetals",
          "Paper",
          "Silver",
          "SpecialtyChemicals",
          "Steel",
          "BasicMaterialsEnd",
          "Advertising",
          "Broadcasting",
          "GamingMultimedia",
          "Entertainment",
          "InternetContent",
          "Publishing",
          "Telecom",
          "CommunicationEnd",
          "ApparelManufacturing",
          "ApparelRetail",
          "AutoManufacturers",
          "AutoParts",
          "AutoDealership",
          "DepartmentStores",
          "FootwearAccessories",
          "Furnishings",
          "Gambling",
          "HomeImprovRetail",
          "InternetRetail",
          "Leisure",
          "Lodging",
          "LuxuryGoods",
          "PackagingContainers",
          "PersonalServices",
          "RecreationalVehicles",
          "ResidentConstruction",
          "ResortsCasinos",
          "Restaurants",
          "SpecialtyRetail",
          "TextileManufacturing",
          "TravelServices",
          "ConsumerCyclEnd",
          "BeveragesBrewers",
          "BeveragesNonAlco",
          "BeveragesWineries",
          "Confectioners",
          "DiscountStores",
          "EducationTrainig",
          "FarmProducts",
          "FoodDistribution",
          "GroceryStores",
          "HouseholdProducts",
          "PackagedFoods",
          "Tobacco",
          "ConsumerDefEnd",
          "OilGasDrilling",
          "OilGasEp",
          "OilGasEquipment",
          "OilGasIntegrated",
          "OilGasMidstream",
          "OilGasRefining",
          "ThermalCoal",
          "Uranium",
          "EnergyEnd",
          "ExchangeTradedFund",
          "AssetsManagement",
          "BanksDiversified",
          "BanksRegional",
          "CapitalMarkets",
          "CloseEndFundDebt",
          "CloseEndFundEquity",
          "CloseEndFundForeign",
          "CreditServices",
          "FinancialConglomerate",
          "FinancialDataExchange",
          "InsuranceBrokers",
          "InsuranceDiversified",
          "InsuranceLife",
          "InsuranceProperty",
          "InsuranceReinsurance",
          "InsuranceSpecialty",
          "MortgageFinance",
          "ShellCompanies",
          "FinancialEnd",
          "Biotechnology",
          "DiagnosticsResearch",
          "DrugsManufacturers",
          "DrugsManufacturersSpec",
          "HealthcarePlans",
          "HealthInformation",
          "MedicalFacilities",
          "MedicalDevices",
          "MedicalDistribution",
          "MedicalInstruments",
          "PharmRetailers",
          "HealthcareEnd",
          "AerospaceDefense",
          "Airlines",
          "AirportsServices",
          "BuildingProducts",
          "BusinessEquipment",
          "Conglomerates",
          "ConsultingServices",
          "ElectricalEquipment",
          "EngineeringConstruction",
          "FarmHeavyMachinery",
          "IndustrialDistribution",
          "InfrastructureOperations",
          "FreightLogistics",
          "MarineShipping",
          "MetalFabrication",
          "PollutionControl",
          "Railroads",
          "RentalLeasing",
          "SecurityProtection",
          "SpealityBusinessServices",
          "SpealityMachinery",
          "StuffingEmployment",
          "ToolsAccessories",
          "Trucking",
          "WasteManagement",
          "IndustrialsEnd",
          "RealEstateDevelopment",
          "RealEstateDiversified",
          "RealEstateServices",
          "ReitDiversified",
          "ReitHealtcare",
          "ReitHotelMotel",
          "ReitIndustrial",
          "ReitMortage",
          "ReitOffice",
          "ReitResidental",
          "ReitRetail",
          "ReitSpeciality",
          "RealEstateEnd",
          "CommunicationEquipment",
          "ComputerHardware",
          "ConsumerElectronics",
          "ElectronicComponents",
          "ElectronicDistribution",
          "ItServices",
          "ScientificInstruments",
          "SemiconductorEquipment",
          "Semiconductors",
          "SoftwareApplication",
          "SoftwareInfrastructure",
          "Solar",
          "TechnologyEnd",
          "UtilitiesDiversified",
          "UtilitiesPowerProducers",
          "UtilitiesRenewable",
          "UtilitiesRegulatedElectric",
          "UtilitiesRegulatedGas",
          "UtilitiesRegulatedWater",
          "UtilitiesEnd",
          "CommoditiesAgricultural",
          "CommoditiesEnergy",
          "CommoditiesMetals",
          "CommoditiesPrecious",
          "CommoditiesEnd"
        ],
        "type": "string"
      },
      "EnInstantFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"FastConfirmation\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: FastConfirmation = 0x1.",
        "example": "FastConfirmation",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "FastConfirmation"
        ],
        "x-enum-values": [
          0,
          1
        ]
      },
      "EnInstantMode": {
        "enum": [
          "Normal"
        ],
        "type": "string",
        "description": "This enumeration is used in the following methods:<br />\r\nIMTConSymbol::IECheckMode IMTConGroupSymbol::IECheckMode<br />\r\nIMTConGroupSymbol::IECheckModeDefault"
      },
      "EnLogType": {
        "enum": [
          "Standard",
          "Logins",
          "Trades",
          "Errors",
          "Full",
          "Updater",
          "SendMail",
          "Failover"
        ],
        "type": "string"
      },
      "EnMailMode": {
        "enum": [
          "Disabled",
          "Full"
        ],
        "type": "string"
      },
      "EnManagerLimit": {
        "enum": [
          "All",
          "Months1",
          "Months3",
          "Months6",
          "Year1",
          "Year2",
          "Year3"
        ],
        "type": "string"
      },
      "EnManagerRights": {
        "enum": [
          "Admin",
          "Manager",
          "CfgServers",
          "CfgAccess",
          "CfgTime",
          "CfgHolidays",
          "CfgHstSync",
          "CfgSymbols",
          "CfgGroups",
          "CfgManagers",
          "CfgDataFeeds",
          "CfgRequests",
          "SrvJournals",
          "SrvReports",
          "Charts",
          "Email",
          "Accountant",
          "AccRead",
          "AccDetails",
          "AccManager",
          "AccOnline",
          "TradesRead",
          "TradesManager",
          "Quotes",
          "RiskManager",
          "Reports",
          "News",
          "CfgGateways",
          "CfgPlugins",
          "TradesDealer",
          "CfgReports",
          "Export",
          "SymbolDetails",
          "TechSupport",
          "TradesSupervisor",
          "QuotesRaw",
          "Market",
          "GrpDetailsMargin",
          "Notifications",
          "AccDelete",
          "TradesDelete",
          "ConfirmActions",
          "CfgEcn",
          "GrpDetailsCommission",
          "SubscriptionsView",
          "SubscriptionsEdit",
          "CfgFunds",
          "CfgMails",
          "CfgMessengers",
          "CfgKyc",
          "CfgAutomations",
          "CfgAllocations",
          "CfgVps",
          "CfgPayments",
          "AdminComputer",
          "CfgWebServices",
          "FintezaAccess",
          "FintezaWebsites",
          "FintezaCampaigns",
          "FintezaReports",
          "AccTechnical",
          "AccTechnicalModify",
          "ClientsAccess",
          "ClientsCreate",
          "ClientsEdit",
          "ClientsDelete",
          "DocumentsAccess",
          "DocumentsCreate",
          "DocumentsEdit",
          "DocumentsDelete",
          "DocumentsFilesAdd",
          "DocumentsFilesDelete",
          "CommentsAccess",
          "CommentsCreate",
          "CommentsDelete",
          "ClientsKYC"
        ],
        "type": "string"
      },
      "EnMarginCalcFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"ClearAcc\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: ClearAcc = 0x1.",
        "example": "ClearAcc",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "ClearAcc"
        ],
        "x-enum-values": [
          0,
          1
        ]
      },
      "EnMarginFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"CheckProcess, CheckSLTP\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: CheckProcess = 0x1, CheckSLTP = 0x2, HedgeLargeLeg = 0x4, ExcludePl = 0x8, RecalcRates = 0x10. Accepted on input, never written: All = CheckProcess, CheckSLTP, HedgeLargeLeg, ExcludePl.",
        "example": "CheckProcess, CheckSLTP",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "CheckProcess",
          "CheckSLTP",
          "HedgeLargeLeg",
          "ExcludePl",
          "RecalcRates"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16
        ]
      },
      "EnMarginMode": {
        "enum": [
          "Retail",
          "ExchangeDiscount",
          "RetailHedged"
        ],
        "type": "string"
      },
      "EnNewsMode": {
        "enum": [
          "Disabled",
          "Headers",
          "Full"
        ],
        "type": "string"
      },
      "EnOptionMode": {
        "enum": [
          "EuropeanCall",
          "EuropeanPut",
          "AmericanCall",
          "AmericanPut"
        ],
        "type": "string"
      },
      "EnOrderFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Market, Limit\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Market = 0x1, Limit = 0x2, Stop = 0x4, StopLimit = 0x8, SL = 0x10, TP = 0x20, CloseBy = 0x40. Accepted on input, never written: All = Market, Limit, Stop, StopLimit, SL, TP, CloseBy.",
        "example": "Market, Limit",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Market",
          "Limit",
          "Stop",
          "StopLimit",
          "SL",
          "TP",
          "CloseBy"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64
        ]
      },
      "EnPermissionsFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"CertConfirm, EnableConnection\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: CertConfirm = 0x1, EnableConnection = 0x2, ResetPassword = 0x4, ForcedOtpUsage = 0x8, RiskWarning = 0x10, RegulationProtect = 0x20, NotifyDeals = 0x40, NotifyOrders = 0x80, NotifyBalances = 0x100. Accepted on input, never written: NotifyAll = NotifyDeals, NotifyOrders, NotifyBalances; All = CertConfirm, EnableConnection, ResetPassword, ForcedOtpUsage, RiskWarning, RegulationProtect, NotifyDeals, NotifyOrders, NotifyBalances.",
        "example": "CertConfirm, EnableConnection",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "CertConfirm",
          "EnableConnection",
          "ResetPassword",
          "ForcedOtpUsage",
          "RiskWarning",
          "RegulationProtect",
          "NotifyDeals",
          "NotifyOrders",
          "NotifyBalances"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128,
          256
        ]
      },
      "EnReportsFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Email, Support\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Email = 0x1, Support = 0x2, Statements = 0x4. Accepted on input, never written: All = Email, Statements.",
        "example": "Email, Support",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Email",
          "Support",
          "Statements"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4
        ]
      },
      "EnReportsMode": {
        "enum": [
          "Disabled",
          "Full",
          "EODOnly",
          "EOMOnly"
        ],
        "type": "string"
      },
      "EnRequestFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Order\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Order = 0x1.",
        "example": "Order",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Order"
        ],
        "x-enum-values": [
          0,
          1
        ]
      },
      "EnSectors": {
        "enum": [
          "Undefined",
          "BasicMaterials",
          "CommunicationServices",
          "ConsumerCyclical",
          "ConsumerDefensive",
          "Energy",
          "Financial",
          "Healthcare",
          "Industrials",
          "RealEstate",
          "Technology",
          "Utilities",
          "Currency",
          "CurrencyCrypto",
          "Indexes",
          "Commodities"
        ],
        "type": "string"
      },
      "EnSpliceTimeType": {
        "enum": [
          "Expiration"
        ],
        "type": "string"
      },
      "EnSpliceType": {
        "enum": [
          "None",
          "Unadjusted",
          "Adjusted"
        ],
        "type": "string"
      },
      "EnStopOutMode": {
        "enum": [
          "Percent",
          "Money"
        ],
        "type": "string"
      },
      "EnSwapDays": {
        "enum": [
          "Sunday",
          "Monday",
          "Tuesday",
          "Wednesday",
          "Thursday",
          "Friday",
          "Saturday",
          "Disabled"
        ],
        "type": "string"
      },
      "EnSwapFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"ConsiderHolidays\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: ConsiderHolidays = 0x1.",
        "example": "ConsiderHolidays",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "ConsiderHolidays"
        ],
        "x-enum-values": [
          0,
          1
        ]
      },
      "EnSwapMode": {
        "enum": [
          "Disabled",
          "ByPoints",
          "BySymbolCurrency",
          "ByMarginCurrency",
          "ByGroupCurrency",
          "ByInterestCurrent",
          "ByInterestOpen",
          "ReopenByClosePrice",
          "ReopenByBid",
          "ByProfitCurrency"
        ],
        "type": "string"
      },
      "EnTickFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Realtime, CollectRaw\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Realtime = 0x1, CollectRaw = 0x2, FeedStats = 0x4, NegativePrices = 0x8. Accepted on input, never written: All = Realtime, CollectRaw, FeedStats, NegativePrices.",
        "example": "Realtime, CollectRaw",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Realtime",
          "CollectRaw",
          "FeedStats",
          "NegativePrices"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8
        ]
      },
      "EnTradeFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Common Trade Flags<br/>Flags: names of the set bits joined by \", \" (\"ProfitByMarket, AllowSignals\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: ProfitByMarket = 0x1, AllowSignals = 0x2. Accepted on input, never written: TradeFlagsAll = ProfitByMarket, AllowSignals.",
        "example": "ProfitByMarket, AllowSignals",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "ProfitByMarket",
          "AllowSignals"
        ],
        "x-enum-values": [
          0,
          1,
          2
        ]
      },
      "EnTradeMode": {
        "enum": [
          "Disabled",
          "LongOnly",
          "ShortOnly",
          "CloseOnly",
          "Full"
        ],
        "type": "string"
      },
      "EnTradeRightsFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Swaps, Trailing\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Swaps = 0x1, Trailing = 0x2, Experts = 0x4, Expiration = 0x8, SignalsAll = 0x10, SignalsOwn = 0x20, SOCompensation = 0x40, SOFullyHedged = 0x80, FifoClose = 0x100, HedgeProhibit = 0x200, DealCost = 0x400, SOCompensationCredit = 0x800. Accepted on input, never written: Default = Swaps, Trailing, Experts, Expiration, SignalsAll; All = Swaps, Trailing, Experts, Expiration, SignalsAll, SignalsOwn, SOCompensation, SOFullyHedged, FifoClose, HedgeProhibit, DealCost, SOCompensationCredit.",
        "example": "Swaps, Trailing",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Swaps",
          "Trailing",
          "Experts",
          "Expiration",
          "SignalsAll",
          "SignalsOwn",
          "SOCompensation",
          "SOFullyHedged",
          "FifoClose",
          "HedgeProhibit",
          "DealCost",
          "SOCompensationCredit"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128,
          256,
          512,
          1024,
          2048
        ]
      },
      "EnTransferMode": {
        "enum": [
          "TransferModeDisabled",
          "TransferModeName",
          "TransferModeGroup",
          "TransferModeNameGroup"
        ],
        "type": "string"
      },
      "EntryFlag": {
        "enum": [
          "In",
          "Out",
          "InOut",
          "OutBy"
        ],
        "type": "string"
      },
      "ExportExecutionPeriod": {
        "enum": [
          "M1",
          "M5",
          "M15",
          "M30",
          "H1"
        ],
        "type": "string"
      },
      "GTCMode": {
        "enum": [
          "Daily",
          "GTC",
          "DailyNoStops"
        ],
        "type": "string"
      },
      "GroupRights": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Signals, Trailing\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Signals = 0x1, Trailing = 0x2, Advisor = 0x4, Expiration = 0x8, SignalAll = 0x10, SignalsOwn = 0x20, RiskWarning = 0x40, ForcedOTPUsage = 0x80.",
        "example": "Signals, Trailing",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Signals",
          "Trailing",
          "Advisor",
          "Expiration",
          "SignalAll",
          "SignalsOwn",
          "RiskWarning",
          "ForcedOTPUsage"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128
        ]
      },
      "Int32ApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "integer",
            "format": "int32"
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "Int32MT4DailyReportListDictionaryApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/MT4DailyReport"
              },
              "nullable": true
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "JsonNode": {
        "type": "object",
        "properties": {
          "options": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JsonNodeOptions"
              }
            ],
            "nullable": true,
            "readOnly": true
          },
          "parent": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JsonNode"
              }
            ],
            "nullable": true,
            "readOnly": true
          },
          "root": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JsonNode"
              }
            ],
            "nullable": true,
            "readOnly": true
          }
        },
        "additionalProperties": false
      },
      "JsonNodeApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/JsonNode"
              }
            ],
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "JsonNodeOptions": {
        "type": "object",
        "properties": {
          "propertyNameCaseInsensitive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "MT4Access": {
        "type": "object",
        "properties": {
          "action": {
            "type": "integer",
            "description": "Firewall rule action — raw MT4 value preserved (FW_BLOCK / FW_PERMIT\r\nper the wrapper's enum encoding; surfaced as int because the wrapper\r\nitself surfaces it as int).",
            "format": "int32"
          },
          "ipFrom": {
            "type": "integer",
            "description": "IP range start (uint widened to long for JSON safety)",
            "format": "int64"
          },
          "ipTo": {
            "type": "integer",
            "description": "IP range end (uint widened to long for JSON safety)",
            "format": "int64"
          },
          "comment": {
            "type": "string",
            "description": "Free-form comment for the rule",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss)."
      },
      "MT4AccessApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Access"
              }
            ],
            "description": "v2 DTO for a single MT4 firewall (access) rule. Curated subset of\r\nthe wrapper's ConAccess struct — drops the 17-int Reserved padding.\r\nIpFrom/IpTo are widened from uint to long so the JSON-serialized\r\nnumeric value fits inside JS Number safely (no precision loss).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4AccessListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Access"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4Backup": {
        "type": "object",
        "properties": {
          "fullBackupPath": {
            "type": "string",
            "description": "Filesystem path where full backups are written",
            "nullable": true
          },
          "fullBackupPeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BackupExecutionPeriod"
              }
            ],
            "description": "Full backup schedule period (1h / 4h / 1d)"
          },
          "fullBackupStore": {
            "allOf": [
              {
                "$ref": "#/components/schemas/BackupStorePeriod"
              }
            ],
            "description": "How long full backups are retained (1m / 3m / 6m / 1y)"
          },
          "fullBackupShift": {
            "type": "integer",
            "description": "Full backup time-shift in minutes",
            "format": "int32"
          },
          "fullBackupLastTime": {
            "type": "string",
            "description": "Last full backup completion timestamp (UTC)",
            "format": "date-time"
          },
          "externalPath": {
            "type": "string",
            "description": "Path to external processing directory",
            "nullable": true
          },
          "archivePeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ArcBackupExecutionPeriod"
              }
            ],
            "description": "Archive backup schedule period (5m / 15m / 30m / 1h)"
          },
          "archiveStore": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ArcBackupStorePeriod"
              }
            ],
            "description": "How long archive backups are retained (1w / 2w / 1m / 3m / 6m)"
          },
          "archiveShift": {
            "type": "integer",
            "description": "Archive backup time-shift in minutes",
            "format": "int32"
          },
          "archiveLastTime": {
            "type": "string",
            "description": "Last archive backup completion timestamp (UTC)",
            "format": "date-time"
          },
          "exportSecurities": {
            "type": "string",
            "description": "Comma-separated list of exported securities",
            "nullable": true
          },
          "exportPath": {
            "type": "string",
            "description": "Path to export script",
            "nullable": true
          },
          "exportPeriod": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ExportExecutionPeriod"
              }
            ],
            "description": "Export schedule period (1m / 5m / 15m / 30m / 1h)"
          },
          "exportLastTime": {
            "type": "string",
            "description": "Last export completion timestamp (UTC)",
            "format": "date-time"
          },
          "watchRole": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ServerRole"
              }
            ],
            "description": "Server role in HA pair (stand-alone / master / slave)"
          },
          "watchOpposite": {
            "type": "string",
            "description": "Opposite server's IP:port string (not secret)",
            "nullable": true
          },
          "watchIp": {
            "type": "integer",
            "description": "Watchdog IP (32-bit, raw wrapper representation)",
            "format": "int32"
          },
          "watchState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WatchdogState"
              }
            ],
            "description": "Watchdog state"
          },
          "watchFailover": {
            "allOf": [
              {
                "$ref": "#/components/schemas/WatchdogFailoverMode"
              }
            ],
            "description": "Watchdog failover mode"
          },
          "watchTimeout": {
            "type": "integer",
            "description": "Watchdog response timeout, seconds",
            "format": "int32"
          },
          "watchLogin": {
            "type": "integer",
            "description": "Watchdog login",
            "format": "int32"
          },
          "watchTimestamp": {
            "type": "integer",
            "description": "Watchdog last-seen timestamp (raw int — wrapper does not auto-convert)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true)."
      },
      "MT4BackupApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Backup"
              }
            ],
            "description": "v2 DTO for the MT4 server's backup configuration (wrapper's ConBackup).\r\nCurated subset — drops the WatchPassword field (slave-server credential)\r\nfor security. All other wrapper public fields are preserved, enums are\r\nsurfaced as enum types (V2JsonContext serializes them as strings via\r\nUseStringEnumConverter=true).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4BackupInfo": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "description": "Backup file name (basename, server-relative)",
            "nullable": true
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes. Source field is a 32-bit signed int —\r\nwidened to `long` here to give the client JSON-safe\r\nnumeric range without re-shaping after a future wrapper fix.",
            "format": "int64"
          },
          "time": {
            "type": "string",
            "description": "File modification time (UTC, from MetaQuotes `__time32_t`)",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 backup file descriptor. Curated subset of\r\nthe wrapper's `BackupInfo` — drops the 6-int reserved blob and\r\nkeeps only the three consumer-facing fields."
      },
      "MT4BackupInfoListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4BackupInfo"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4BalanceDiff": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Account login",
            "format": "int32"
          },
          "diff": {
            "type": "number",
            "description": "Difference (signed). Zero means balance integrity check passed.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO returned by `AdmBalanceCheck`. Reports the difference between\r\nthe account's recorded balance and what the MT4 server recomputes from\r\nclosed orders + balance operations. `Diff = 0` means the integrity\r\ncheck passed; non-zero means the recorded balance has drifted and would\r\nbe set to `recorded + Diff` if `AdmBalanceFix` ran."
      },
      "MT4BalanceDiffApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4BalanceDiff"
              }
            ],
            "description": "v2 DTO returned by `AdmBalanceCheck`. Reports the difference between\r\nthe account's recorded balance and what the MT4 server recomputes from\r\nclosed orders + balance operations. `Diff = 0` means the integrity\r\ncheck passed; non-zero means the recorded balance has drifted and would\r\nbe set to `recorded + Diff` if `AdmBalanceFix` ran.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4BalanceDiffListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4BalanceDiff"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ChartBar": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Bar timestamp (UTC, start of the bar's period)",
            "format": "date-time"
          },
          "open": {
            "type": "number",
            "description": "Open price",
            "format": "float"
          },
          "high": {
            "type": "number",
            "description": "High price during the bar",
            "format": "float"
          },
          "low": {
            "type": "number",
            "description": "Low price during the bar",
            "format": "float"
          },
          "close": {
            "type": "number",
            "description": "Close price",
            "format": "float"
          },
          "volume": {
            "type": "number",
            "description": "Trading volume during the bar (lots × 100 in MT4 convention)",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one OHLC chart bar. Curated from the wrapper's `RateInfoEx`;\r\ndrops the internal `SymbolMultiply`/`Digits` scaling helpers\r\n(callers don't need them — the wrapper's `buildRI` already\r\nnormalised Open/High/Low/Close from raw int prices into floating point)."
      },
      "MT4ChartBarListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4ChartBar"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ChartWriteRequest": {
        "type": "object",
        "properties": {
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4ChartBar"
            },
            "description": "OHLC bars to add / update / delete. Must be non-empty.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 request body for the `ChartAdd` / `ChartUpdate` / `ChartDelete`\r\ntrio. Wraps the bars list so the request shape stays extensible — future\r\nmetadata (e.g. `SkipIntegrityCheck`) can be added without a breaking\r\nchange to clients that only sent `Rates`."
      },
      "MT4Common": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Trade server name",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "Broker / company display name",
            "nullable": true
          },
          "build": {
            "type": "integer",
            "description": "Trade server build number",
            "format": "int32"
          },
          "version": {
            "type": "integer",
            "description": "Trade server version",
            "format": "int32"
          },
          "timeZone": {
            "type": "integer",
            "description": "Server time zone offset from UTC, in hours (DST-adjusted)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for MT4 server-wide common settings. Curated subset of the\r\nwrapper's ConCommon struct — exposes fields useful to clients while\r\nshielding the v2 contract from MetaQuotes schema drift."
      },
      "MT4CommonApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Common"
              }
            ],
            "description": "v2 DTO for MT4 server-wide common settings. Curated subset of the\r\nwrapper's ConCommon struct — exposes fields useful to clients while\r\nshielding the v2 contract from MetaQuotes schema drift.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4CommonUpdate": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Trade server display name.",
            "nullable": true
          },
          "owner": {
            "type": "string",
            "description": "Broker / company display name.",
            "nullable": true
          },
          "timeZone": {
            "type": "integer",
            "description": "Server time zone offset from UTC, in hours.",
            "format": "int32"
          },
          "daylightCorrection": {
            "type": "integer",
            "description": "DST correction setting (server-specific integer).",
            "format": "int32"
          },
          "timeZoneReal": {
            "type": "integer",
            "description": "Real time-zone (no DST) offset from UTC, in hours.",
            "format": "int32"
          },
          "timeSync": {
            "type": "string",
            "description": "NTP server hostname for clock sync.",
            "nullable": true
          },
          "minClient": {
            "type": "integer",
            "description": "Minimum acceptable client build number.",
            "format": "int32"
          },
          "minApi": {
            "type": "integer",
            "description": "Minimum acceptable Manager API build number.",
            "format": "int32"
          },
          "keepEmails": {
            "type": "integer",
            "description": "How long (days) to keep mailbox messages.",
            "format": "int32"
          },
          "keepTicks": {
            "type": "integer",
            "description": "How long (days) to keep tick history.",
            "format": "int32"
          },
          "antiFlood": {
            "type": "integer",
            "description": "Anti-flood threshold (requests per second).",
            "format": "int32"
          },
          "floodControl": {
            "type": "integer",
            "description": "Flood-control behaviour mode.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 Type 1 mutator DTO for MT4 server-wide common settings. Curated\r\nsubset of the wrapper's `ConCommon` struct — exposes the fields\r\nmost likely to need adjustment from a SaaS surface while leaving\r\nruntime counters, derived state, and the wrapper's internal arrays\r\nto the secret-preservation overlay on the controller side."
      },
      "MT4DailyReport": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Account login the report belongs to",
            "format": "int32"
          },
          "ctm": {
            "type": "string",
            "description": "Day boundary timestamp (wrapper internal: __time32_t, server-local time)",
            "format": "date-time"
          },
          "group": {
            "type": "string",
            "description": "Trading group the account was in on that day",
            "nullable": true
          },
          "bank": {
            "type": "string",
            "description": "Free-form bank/payment identifier recorded with the day's deposits",
            "nullable": true
          },
          "balancePrev": {
            "type": "number",
            "description": "Balance at the start of the reporting day",
            "format": "double"
          },
          "balance": {
            "type": "number",
            "description": "Balance at the end of the reporting day",
            "format": "double"
          },
          "deposit": {
            "type": "number",
            "description": "Net deposits credited within the day (positive = inflow)",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "description": "Credit balance at end-of-day",
            "format": "double"
          },
          "profitClosed": {
            "type": "number",
            "description": "Closed-position profit/loss realised within the day",
            "format": "double"
          },
          "profit": {
            "type": "number",
            "description": "Floating (open-position) profit/loss at end-of-day",
            "format": "double"
          },
          "equity": {
            "type": "number",
            "description": "Equity at end-of-day (Balance + Credit + Profit)",
            "format": "double"
          },
          "margin": {
            "type": "number",
            "description": "Used margin at end-of-day",
            "format": "double"
          },
          "marginFree": {
            "type": "number",
            "description": "Free margin at end-of-day (Equity - Margin)",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO mirroring the wrapper's `DailyReport`: one end-of-day\r\nbalance/equity/PnL snapshot for a single account. Used by the broker\r\ndaily-report family (per-login query, bulk pull, incremental sync).\r\nInternal underscore-prefixed unix-time field, the `Next` pointer\r\nchain, and the 3-int `Reserved` padding are intentionally excluded.\r\nNote: `Ctm` is reported by the MT4 server in its local time zone,\r\nnot UTC — clients should treat it as \"broker day boundary\" and convert\r\nas appropriate."
      },
      "MT4DailyReportListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4DailyReport"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4DataServer": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string",
            "description": "Server address as \"host:port\" or \"host\"",
            "nullable": true
          },
          "ip": {
            "type": "integer",
            "description": "Server IP (raw wrapper int — sign-preserved; high-bit IPs may serialize as negative)",
            "format": "int32"
          },
          "description": {
            "type": "string",
            "description": "Free-form server description",
            "nullable": true
          },
          "isProxy": {
            "type": "integer",
            "description": "Whether the server can act as a proxy (0/1; raw wrapper int preserved)",
            "format": "int32"
          },
          "priority": {
            "type": "integer",
            "description": "Connection priority: 0-7 base, 255 = idle",
            "format": "int32"
          },
          "loading": {
            "type": "integer",
            "description": "Reported server load (UINT_MAX = no information reported)",
            "format": "int64"
          },
          "ipInternal": {
            "type": "integer",
            "description": "Internal IP address (widened uint → long)",
            "format": "int64"
          },
          "isWitness": {
            "type": "integer",
            "description": "Failover-witness flag (0 / 1)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization."
      },
      "MT4DataServerApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4DataServer"
              }
            ],
            "description": "v2 DTO for a single MT4 access-server (DataServer) configuration entry.\r\nCurated subset of the wrapper's ConDataServer — drops the internal\r\nReserved1/Reserved2 padding and the Next pointer chain. Loading and\r\nIpInternal are widened from uint to long for JSON-safe numeric\r\nserialization.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4DataServerListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4DataServer"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4Feeder": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Feeder name (used as cursor key — assumed unique)",
            "nullable": true
          },
          "file": {
            "type": "string",
            "description": "Datafeed loader filename (DLL or script path)",
            "nullable": true
          },
          "server": {
            "type": "string",
            "description": "Upstream feeder server address",
            "nullable": true
          },
          "login": {
            "type": "string",
            "description": "Datafeed login (upstream credential identifier)",
            "nullable": true
          },
          "keywords": {
            "type": "string",
            "description": "Keywords for news filtering",
            "nullable": true
          },
          "enable": {
            "type": "integer",
            "description": "Enable flag (0 = disabled, 1 = enabled — raw wrapper int)",
            "format": "int32"
          },
          "dataFeedMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DataFeedMode"
              }
            ],
            "description": "Feed mode (quotes / news / both — wrapper enum)"
          },
          "timeout": {
            "type": "integer",
            "description": "Maximum freeze time in seconds before considered stalled (default ~120)",
            "format": "int32"
          },
          "timeoutReconnect": {
            "type": "integer",
            "description": "Reconnect delay before \"sleep\" attempts threshold (default ~5s)",
            "format": "int32"
          },
          "timeoutSleep": {
            "type": "integer",
            "description": "Reconnect delay after \"sleep\" attempts threshold (default ~60s)",
            "format": "int32"
          },
          "attempsSleep": {
            "type": "integer",
            "description": "Reconnect count before switching to sleep timeout",
            "format": "int32"
          },
          "newsLangId": {
            "type": "integer",
            "description": "News language id",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials)."
      },
      "MT4FeederApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Feeder"
              }
            ],
            "description": "v2 DTO for a single MT4 quote/news feeder configuration. Curated\r\nsubset of the wrapper's ConFeeder — drops the wrapper's Unused\r\nreserved blob AND the `Password` field (datafeed credentials).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4FeederListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Feeder"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayAccount": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "Whether the gateway-account entry is active"
          },
          "name": {
            "type": "string",
            "description": "Public name of the gateway account",
            "nullable": true
          },
          "id": {
            "type": "integer",
            "description": "Internal id (stable identifier)",
            "format": "int32"
          },
          "type": {
            "type": "integer",
            "description": "Gateway type (obsolete in modern MT4 builds — preserved for API completeness)",
            "format": "int32"
          },
          "login": {
            "type": "integer",
            "description": "STP MT4 login (account number on the external server)",
            "format": "int32"
          },
          "address": {
            "type": "string",
            "description": "External MT4 server address (host:port string)",
            "nullable": true
          },
          "notifyLogins": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Logins of broker managers receiving internal-email gateway notifications (fixed-size 8 slots)",
            "nullable": true
          },
          "flags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnGatewayAccountFlags"
              }
            ],
            "description": "Gateway-account flag bitmap (wrapper enum, serialized as string)"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array."
      },
      "MT4GatewayAccountApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4GatewayAccount"
              }
            ],
            "description": "v2 DTO for a single MT4 STP gateway-account configuration entry.\r\nCurated subset of the wrapper's ConGatewayAccount — drops the\r\n23-int Reserved block AND the `Password` field (STP MT4\r\ncredential to the external server). NotifyLogins is preserved\r\nas int[8] because the wrapper exposes a fixed-size 8-slot array.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayAccountListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4GatewayAccount"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayMarkup": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "Whether the markup rule is active"
          },
          "source": {
            "type": "string",
            "description": "External symbol name, mask, or symbol-group identifier",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "description": "Local symbol name this markup applies to",
            "nullable": true
          },
          "accountName": {
            "type": "string",
            "description": "Gateway-account name (obsolete in modern MT4 builds — preserved for API completeness)",
            "nullable": true
          },
          "accountId": {
            "type": "integer",
            "description": "Gateway-account internal id (obsolete — see AccountName note)",
            "format": "int32"
          },
          "bidMarkup": {
            "type": "integer",
            "description": "Bid-side markup in pips (added to the external bid quote)",
            "format": "int32"
          },
          "askMarkup": {
            "type": "integer",
            "description": "Ask-side markup in pips (added to the external ask quote)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips."
      },
      "MT4GatewayMarkupApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4GatewayMarkup"
              }
            ],
            "description": "v2 DTO for a single MT4 gateway markup rule. Curated subset of the\r\nwrapper's ConGatewayMarkup — drops the 16-int Reserved padding.\r\nSource describes the external symbol (or a wildcard/group mask)\r\nbeing mapped onto Symbol on this server, with per-side spread\r\nadjustments BidMarkup and AskMarkup expressed in pips.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayMarkupListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4GatewayMarkup"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayRule": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "boolean",
            "description": "Whether the rule is active"
          },
          "name": {
            "type": "string",
            "description": "Public name of the rule (assumed unique within the rules table — used as cursor key)",
            "nullable": true
          },
          "requestSymbol": {
            "type": "string",
            "description": "Order-matching symbol name, mask, or symbol-group identifier",
            "nullable": true
          },
          "requestGroup": {
            "type": "string",
            "description": "Order-matching account group name or group mask",
            "nullable": true
          },
          "exeAccountName": {
            "type": "string",
            "description": "Execution gateway-account name",
            "nullable": true
          },
          "exeAccountId": {
            "type": "integer",
            "description": "Execution gateway-account internal id",
            "format": "int32"
          },
          "exeMaxDeviation": {
            "type": "integer",
            "description": "Maximum allowed deviation (pips) between requested and executed price",
            "format": "int32"
          },
          "exeMaxProfitSlippage": {
            "type": "integer",
            "description": "Maximum slippage in pips on profit-side execution",
            "format": "int32"
          },
          "exeMaxProfitSlippageLots": {
            "type": "integer",
            "description": "Maximum slippage volume in lots on profit-side execution",
            "format": "int32"
          },
          "exeMaxLosingSlippage": {
            "type": "integer",
            "description": "Maximum slippage in pips on losing-side execution",
            "format": "int32"
          },
          "exeMaxLosingSlippageLots": {
            "type": "integer",
            "description": "Maximum slippage volume in lots on losing-side execution",
            "format": "int32"
          },
          "exeAccountPos": {
            "type": "integer",
            "description": "Current open position on the execution account",
            "format": "int32"
          },
          "exeVolumePercent": {
            "type": "integer",
            "description": "Coverage percentage (volume routed externally vs. internal book)",
            "format": "int32"
          },
          "exeFlags": {
            "type": "integer",
            "description": "Execution flags bitmap (raw wrapper int)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n"
      },
      "MT4GatewayRuleApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4GatewayRule"
              }
            ],
            "description": "v2 DTO for a single MT4 gateway-rule entry (STP execution routing\r\npolicy). Curated subset of the wrapper's ConGatewayRule — drops the\r\ninternal RequestRreserved/ExeReserved padding blocks.\r\n<br>\r\nEach rule selects orders by RequestSymbol and RequestGroup (each can\r\nbe an exact name, a wildcard mask, or a group identifier), then\r\nroutes them to ExeAccount (named externally), with execution limits\r\nexpressed in pips and lots.\r\n",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GatewayRuleListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4GatewayRule"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4Group": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "description": "Group name (unique per platform, max 16 chars)",
            "nullable": true
          },
          "enable": {
            "type": "integer",
            "description": "0 = group disabled, non-zero = enabled (accounts in this group can log in)",
            "format": "int32"
          },
          "timeout": {
            "type": "integer",
            "description": "Trade confirmation timeout, seconds",
            "format": "int32"
          },
          "otpMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OTPMode"
              }
            ],
            "description": "One-time password requirement mode"
          },
          "company": {
            "type": "string",
            "description": "Company name shown on statements",
            "nullable": true
          },
          "signature": {
            "type": "string",
            "description": "Statement signature line",
            "nullable": true
          },
          "supportPage": {
            "type": "string",
            "description": "Support page URL shown to clients",
            "nullable": true
          },
          "supportEmail": {
            "type": "string",
            "description": "Support email shown to clients",
            "nullable": true
          },
          "copies": {
            "type": "integer",
            "description": "Number of statement copies sent to support address",
            "format": "int32"
          },
          "reports": {
            "type": "integer",
            "description": "0 = statements disabled, non-zero = nightly statements enabled",
            "format": "int32"
          },
          "defaultLeverage": {
            "type": "integer",
            "description": "Default leverage applied when an account omits its own leverage",
            "format": "int32"
          },
          "defaultDeposit": {
            "type": "number",
            "description": "Default deposit applied when an account omits its own balance",
            "format": "double"
          },
          "maxSecurities": {
            "type": "integer",
            "description": "Max simultaneously open securities",
            "format": "int32"
          },
          "secMarginsTotal": {
            "type": "integer",
            "description": "Count of special securities settings (SecMargins) in use",
            "format": "int32"
          },
          "currency": {
            "type": "string",
            "description": "Deposit currency (e.g. \"USD\")",
            "nullable": true
          },
          "credit": {
            "type": "number",
            "description": "Virtual credit applied to the group's accounts",
            "format": "double"
          },
          "marginCall": {
            "type": "integer",
            "description": "Margin call threshold (percent of equity)",
            "format": "int32"
          },
          "marginMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginMode"
              }
            ],
            "description": "Margin calculation mode (don't use / use all / use profit / use loss)"
          },
          "marginStopout": {
            "type": "integer",
            "description": "Stop-out threshold",
            "format": "int32"
          },
          "interestRate": {
            "type": "number",
            "description": "Annual interest rate (percent)",
            "format": "double"
          },
          "useSwap": {
            "type": "integer",
            "description": "0 = no rollovers, non-zero = use rollovers and interest rate",
            "format": "int32"
          },
          "newsMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NewsMode"
              }
            ],
            "description": "News delivery mode"
          },
          "groupRights": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupRights"
              }
            ],
            "description": "Permissions bit mask for this group"
          },
          "checkIEPrices": {
            "type": "integer",
            "description": "0 = no IE check, non-zero = check Instant Execution prices",
            "format": "int32"
          },
          "maxPositions": {
            "type": "integer",
            "description": "Maximum simultaneous orders and open positions",
            "format": "int32"
          },
          "closeReopen": {
            "type": "integer",
            "description": "0 = standard close, non-zero = close-and-reopen mode",
            "format": "int32"
          },
          "hedgeProhibited": {
            "type": "integer",
            "description": "0 = hedging allowed, non-zero = hedging prohibited",
            "format": "int32"
          },
          "closeFIFO": {
            "type": "integer",
            "description": "0 = LIFO, non-zero = FIFO close rule",
            "format": "int32"
          },
          "hedgeLargeLeg": {
            "type": "integer",
            "description": "0 = standard hedge, non-zero = treat large hedged leg specially",
            "format": "int32"
          },
          "marginControllingType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginControllingType"
              }
            ],
            "description": "Margin controlling unit (percent vs deposit currency)"
          },
          "archivePeriod": {
            "type": "integer",
            "description": "Inactivity period (days) before account moves to archive",
            "format": "int32"
          },
          "archiveMaxBalance": {
            "type": "integer",
            "description": "Maximum balance under which an account is eligible for archiving",
            "format": "int32"
          },
          "stopoutSkipHedged": {
            "type": "integer",
            "description": "0 = include hedged accounts in stop-out checks, non-zero = skip them",
            "format": "int32"
          },
          "archivePendingPeriod": {
            "type": "integer",
            "description": "Pending orders clean-up period (days)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing a trading group configuration. Curated subset of the\r\nwrapper's `ConGroup` — exposes the configuration fields that callers\r\nneed to inspect margin/leverage/rights settings.\r\n            \r\nDeliberately omitted from v2 (vs v1's full ConGroup shape):\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP\r\n    credentials must never cross the v2 boundary regardless of access\r\n    level. `SmtpServer` alone is dropped too because a server name\r\n    is rarely useful without its credentials and exposes infra topology.\r\n  * `Templates` — server-side filesystem path, irrelevant to API\r\n    consumers and a minor information-disclosure risk.\r\n  * `SecuritiesHash` — opaque byte[], wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights`, `SecGroups[32]`,\r\n    `SecMargins[128]` — reserved/internal arrays. The two nested\r\n    arrays (SecGroups, SecMargins) deserve their own dedicated v2\r\n    endpoints (`GroupSecGroupsGet/{group}`, `GroupSecMarginsGet/{group}`)\r\n    planned for Wave 3 — including them here would balloon the DTO.\r\n  * `NewsLanguages` (uint[]) and `NewsLanguagesTotal` —\r\n    rarely consumed; can be added later once the use case is clear.\r\n            \r\nEnums (`OTPMode`, `MarginMode`, `NewsMode`,\r\n`MarginControllingType`) serialize as strings because\r\nCPlugin.SaaSWebApps.WebAPI.Code.Json.V2JsonContext enables `UseStringEnumConverter`;\r\n`GroupRights` is a flags string, the names of the set bits."
      },
      "MT4GroupApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Group"
              }
            ],
            "description": "v2 DTO describing a trading group configuration. Curated subset of the\r\nwrapper's `ConGroup` — exposes the configuration fields that callers\r\nneed to inspect margin/leverage/rights settings.\r\n            \r\nDeliberately omitted from v2 (vs v1's full ConGroup shape):\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP\r\n    credentials must never cross the v2 boundary regardless of access\r\n    level. `SmtpServer` alone is dropped too because a server name\r\n    is rarely useful without its credentials and exposes infra topology.\r\n  * `Templates` — server-side filesystem path, irrelevant to API\r\n    consumers and a minor information-disclosure risk.\r\n  * `SecuritiesHash` — opaque byte[], wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights`, `SecGroups[32]`,\r\n    `SecMargins[128]` — reserved/internal arrays. The two nested\r\n    arrays (SecGroups, SecMargins) deserve their own dedicated v2\r\n    endpoints (`GroupSecGroupsGet/{group}`, `GroupSecMarginsGet/{group}`)\r\n    planned for Wave 3 — including them here would balloon the DTO.\r\n  * `NewsLanguages` (uint[]) and `NewsLanguagesTotal` —\r\n    rarely consumed; can be added later once the use case is clear.\r\n            \r\nEnums (`OTPMode`, `MarginMode`, `NewsMode`,\r\n`MarginControllingType`) serialize as strings because\r\nCPlugin.SaaSWebApps.WebAPI.Code.Json.V2JsonContext enables `UseStringEnumConverter`;\r\n`GroupRights` is a flags string, the names of the set bits.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GroupListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Group"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GroupMargin": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol the override applies to (max 12 chars)",
            "nullable": true
          },
          "swapLong": {
            "type": "number",
            "description": "Swap charge for long positions",
            "format": "double"
          },
          "swapShort": {
            "type": "number",
            "description": "Swap charge for short positions",
            "format": "double"
          },
          "marginDivider": {
            "type": "number",
            "description": "Margin divider override (1.0 = use default)",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one of a group's \"special securities\" margin overrides. Curated\r\nfrom `ConGroupMargin` — the wrapper's per-symbol swap/margin overrides\r\nstored as a 128-element array on `ConGroup.SecMargins`. The\r\n`Reserved` int[7] padding is dropped."
      },
      "MT4GroupMarginListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4GroupMargin"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GroupSec": {
        "type": "object",
        "properties": {
          "show": {
            "type": "integer",
            "description": "0 = security group hidden from clients, non-zero = visible",
            "format": "int32"
          },
          "trade": {
            "type": "integer",
            "description": "0 = trading disabled, non-zero = trading enabled",
            "format": "int32"
          },
          "dealingMode": {
            "type": "string",
            "description": "Dealing mode (Manual / Auto / Activity)",
            "nullable": true
          },
          "standardCommission": {
            "type": "number",
            "description": "Standard commission",
            "format": "double"
          },
          "commissionType": {
            "type": "string",
            "description": "Commission type (Money / Pips / Percent)",
            "nullable": true
          },
          "commissionLotsMode": {
            "type": "string",
            "description": "Commission lots mode (PerLot / PerDeal)",
            "nullable": true
          },
          "agentCommission": {
            "type": "number",
            "description": "Agent commission",
            "format": "double"
          },
          "agentCommissionMode": {
            "type": "string",
            "description": "Agent commission type (Money / Pips)",
            "nullable": true
          },
          "spreadDiff": {
            "type": "integer",
            "description": "Spread difference compared to default symbol spread",
            "format": "int32"
          },
          "lotMin": {
            "type": "integer",
            "description": "Minimum allowed lot size (in 1/100 lot units, e.g. 100 = 1 lot)",
            "format": "int32"
          },
          "lotMax": {
            "type": "integer",
            "description": "Maximum allowed lot size",
            "format": "int32"
          },
          "lotStep": {
            "type": "integer",
            "description": "Lot step (10 lot = 1000, 1 lot = 100, 0.1 lot = 10)",
            "format": "int32"
          },
          "ieDeviation": {
            "type": "integer",
            "description": "Max price deviation in Instant Execution mode",
            "format": "int32"
          },
          "confirmation": {
            "type": "integer",
            "description": "0 = no confirmation, non-zero = request mode confirmation",
            "format": "int32"
          },
          "tradeRights": {
            "type": "string",
            "description": "Clients trade rights bit mask (string-encoded)",
            "nullable": true
          },
          "ieQuickMode": {
            "type": "integer",
            "description": "0 = normal, non-zero = don't resend on deviation in IE",
            "format": "int32"
          },
          "autoCloseOutMode": {
            "type": "string",
            "description": "Auto close-out method (None / HiHi / LoLo / FIFO / LIFO / ...)",
            "nullable": true
          },
          "commissionTaxes": {
            "type": "number",
            "description": "Commission taxes",
            "format": "double"
          },
          "commissionAgentLots": {
            "type": "string",
            "description": "Agent commission lots mode",
            "nullable": true
          },
          "freeMarginMode": {
            "type": "integer",
            "description": "0 = strict margin check, non-zero = soft check",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one entry in a group's `SecGroups` array (32 elements\r\nindexed by symbol-group). Curated from `ConGroupSec`; drops the\r\n`Reserved` int[3] padding. Enum fields are typed as string for\r\nthe leaf-nested-generic STJ source-gen reason — see\r\nfeedback-stj-enum-leaf-nested."
      },
      "MT4GroupSecListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4GroupSec"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4GroupUpdate": {
        "type": "object",
        "properties": {
          "enable": {
            "type": "integer",
            "description": "0 = group disabled, non-zero = enabled",
            "format": "int32"
          },
          "timeout": {
            "type": "integer",
            "description": "Trade confirmation timeout, seconds",
            "format": "int32"
          },
          "otpMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OTPMode"
              }
            ],
            "description": "One-time password requirement mode"
          },
          "company": {
            "type": "string",
            "description": "Company name shown on statements",
            "nullable": true
          },
          "signature": {
            "type": "string",
            "description": "Statement signature line",
            "nullable": true
          },
          "supportPage": {
            "type": "string",
            "description": "Support page URL",
            "nullable": true
          },
          "supportEmail": {
            "type": "string",
            "description": "Support email",
            "nullable": true
          },
          "copies": {
            "type": "integer",
            "description": "Statement copy count",
            "format": "int32"
          },
          "reports": {
            "type": "integer",
            "description": "0 = statements disabled, non-zero = enabled",
            "format": "int32"
          },
          "defaultLeverage": {
            "type": "integer",
            "description": "Default leverage when accounts omit their own",
            "format": "int32"
          },
          "defaultDeposit": {
            "type": "number",
            "description": "Default deposit when accounts omit their own balance",
            "format": "double"
          },
          "maxSecurities": {
            "type": "integer",
            "description": "Max simultaneously open securities",
            "format": "int32"
          },
          "currency": {
            "type": "string",
            "description": "Deposit currency",
            "nullable": true
          },
          "credit": {
            "type": "number",
            "description": "Virtual credit applied to group's accounts",
            "format": "double"
          },
          "marginCall": {
            "type": "integer",
            "description": "Margin call threshold (percent)",
            "format": "int32"
          },
          "marginMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginMode"
              }
            ],
            "description": "Margin calculation mode"
          },
          "marginStopout": {
            "type": "integer",
            "description": "Stop-out threshold",
            "format": "int32"
          },
          "interestRate": {
            "type": "number",
            "description": "Annual interest rate (percent)",
            "format": "double"
          },
          "useSwap": {
            "type": "integer",
            "description": "0 = no rollovers, non-zero = use them",
            "format": "int32"
          },
          "newsMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/NewsMode"
              }
            ],
            "description": "News delivery mode"
          },
          "groupRights": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GroupRights"
              }
            ],
            "description": "Permissions bit mask"
          },
          "checkIEPrices": {
            "type": "integer",
            "description": "0 = no IE check, non-zero = check IE prices",
            "format": "int32"
          },
          "maxPositions": {
            "type": "integer",
            "description": "Maximum simultaneous orders and open positions",
            "format": "int32"
          },
          "closeReopen": {
            "type": "integer",
            "description": "0 = standard, non-zero = close-and-reopen mode",
            "format": "int32"
          },
          "hedgeProhibited": {
            "type": "integer",
            "description": "0 = hedging allowed, non-zero = prohibited",
            "format": "int32"
          },
          "closeFIFO": {
            "type": "integer",
            "description": "0 = LIFO, non-zero = FIFO close rule",
            "format": "int32"
          },
          "hedgeLargeLeg": {
            "type": "integer",
            "description": "0 = standard, non-zero = treat large hedged leg specially",
            "format": "int32"
          },
          "marginControllingType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginControllingType"
              }
            ],
            "description": "Margin controlling unit (percent vs deposit currency)"
          },
          "archivePeriod": {
            "type": "integer",
            "description": "Inactivity period (days) before account archival",
            "format": "int32"
          },
          "archiveMaxBalance": {
            "type": "integer",
            "description": "Max balance under which an account becomes archivable",
            "format": "int32"
          },
          "stopoutSkipHedged": {
            "type": "integer",
            "description": "0 = include hedged in stop-out checks, non-zero = skip them",
            "format": "int32"
          },
          "archivePendingPeriod": {
            "type": "integer",
            "description": "Pending orders clean-up period (days)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Type 1 mutator input — full-replace shape for `GroupRecordUpdate`.\r\nSame field set as the read DTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Group minus the immutable\r\ngroup name (path parameter) and the derived `SecMarginsTotal`\r\n(computed from SecMargins length).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Group` — path param, immutable identity.\r\n  * `SmtpServer`, `SmtpLogin`, `SmtpPassword` — SMTP creds,\r\n    never client-controlled.\r\n  * `Templates` — server-side filesystem path.\r\n  * `SecuritiesHash` — opaque wrapper bookkeeping.\r\n  * `Reserved`, `UnusedRights` — reserved arrays.\r\n  * `SecGroups[32]`, `SecMargins[128]` — nested arrays, planned\r\n    as dedicated v2 endpoints.\r\n  * `NewsLanguages`, `NewsLanguagesTotal` — separate management.\r\n  * `SecMarginsTotal` — derived from SecMargins length."
      },
      "MT4Holiday": {
        "type": "object",
        "properties": {
          "year": {
            "type": "integer",
            "description": "Calendar year of the holiday (e.g. 2026)",
            "format": "int32"
          },
          "month": {
            "type": "integer",
            "description": "Calendar month, 1..12",
            "format": "int32"
          },
          "day": {
            "type": "integer",
            "description": "Day-of-month, 1..31",
            "format": "int32"
          },
          "from": {
            "type": "integer",
            "description": "Work-day start time, in minutes from midnight (0 if closed all day)",
            "format": "int32"
          },
          "to": {
            "type": "integer",
            "description": "Work-day end time, in minutes from midnight",
            "format": "int32"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol name, symbol group name, or \"All\" for global holiday",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Free-form description of the holiday",
            "nullable": true
          },
          "enable": {
            "type": "boolean",
            "description": "Whether the holiday entry is active"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries)."
      },
      "MT4HolidayApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Holiday"
              }
            ],
            "description": "v2 DTO for a single MT4 holiday-calendar entry. Curated subset of the\r\nwrapper's ConHoliday struct — exposes the broker-facing fields and\r\ndrops the internal Reserved/Next pointer block. Date is split into\r\nYear/Month/Day ints (wire-compatible with the wrapper, no DateTime\r\nconversion to avoid timezone ambiguity for date-only entries).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4HolidayListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Holiday"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4LiveUpdate": {
        "type": "object",
        "properties": {
          "company": {
            "type": "string",
            "description": "Company name advertised by the LiveUpdate service (used as cursor key)",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "Filesystem path to the LiveUpdate files",
            "nullable": true
          },
          "version": {
            "type": "integer",
            "description": "Service version number",
            "format": "int32"
          },
          "build": {
            "type": "integer",
            "description": "Service build number",
            "format": "int32"
          },
          "maxConnect": {
            "type": "integer",
            "description": "Maximum simultaneous client connections allowed",
            "format": "int32"
          },
          "connections": {
            "type": "integer",
            "description": "Currently active client connections (read-only counter)",
            "format": "int32"
          },
          "type": {
            "type": "integer",
            "description": "LiveUpdate kind/type (raw wrapper int — LIVE_UPDATE_* constants)",
            "format": "int32"
          },
          "enable": {
            "type": "integer",
            "description": "Enable flag (0 = disabled, 1 = enabled — raw wrapper int)",
            "format": "int32"
          },
          "totalFiles": {
            "type": "integer",
            "description": "Total files served",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice."
      },
      "MT4LiveUpdateApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4LiveUpdate"
              }
            ],
            "description": "v2 DTO for a single MT4 LiveUpdate configuration entry. Curated\r\nsubset of the wrapper's ConLiveUpdate — exposes the metadata\r\n(Company, Path, Version/Build, connection limits and counters,\r\nType, Enable, TotalFiles). The wrapper's `Files` array\r\n(128-element LiveInfoFile descriptor table) is intentionally\r\ndeferred to a future endpoint to keep this payload tractable; v2\r\ncallers needing per-file detail will get a separate\r\n`CfgRequestLiveUpdateFiles` in a later slice.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4LiveUpdateListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4LiveUpdate"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ManagerRights": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Manager account login (read-only)",
            "format": "int32"
          },
          "name": {
            "type": "string",
            "description": "Display name of the manager (read-only on the wrapper side)",
            "nullable": true
          },
          "groups": {
            "type": "string",
            "description": "Comma-separated list of managed group names (wildcard '*' allowed)",
            "nullable": true
          },
          "mailBox": {
            "type": "string",
            "description": "Internal mailbox name used for manager mail",
            "nullable": true
          },
          "infoDepth": {
            "type": "integer",
            "description": "Maximum reportable history depth, in days",
            "format": "int32"
          },
          "manager": {
            "type": "boolean"
          },
          "money": {
            "type": "boolean"
          },
          "online": {
            "type": "boolean"
          },
          "riskMan": {
            "type": "boolean"
          },
          "broker": {
            "type": "boolean"
          },
          "admin": {
            "type": "boolean"
          },
          "logs": {
            "type": "boolean"
          },
          "reports": {
            "type": "boolean"
          },
          "trades": {
            "type": "boolean"
          },
          "marketWatch": {
            "type": "boolean"
          },
          "email": {
            "type": "boolean"
          },
          "userDetails": {
            "type": "boolean"
          },
          "seeTrades": {
            "type": "boolean"
          },
          "news": {
            "type": "boolean"
          },
          "plugins": {
            "type": "boolean"
          },
          "market": {
            "type": "boolean"
          },
          "notifications": {
            "type": "boolean"
          },
          "serverReports": {
            "type": "boolean"
          },
          "techSupport": {
            "type": "boolean"
          },
          "ipFilter": {
            "type": "integer",
            "description": "IP filtering mode (0 = disabled; non-zero = enabled — raw MT4 wrapper value, semantics preserved)",
            "format": "int32"
          },
          "ipFrom": {
            "type": "integer",
            "description": "IP range start (uint widened to long for safe JSON numeric serialization)",
            "format": "int64"
          },
          "ipTo": {
            "type": "integer",
            "description": "IP range end (uint widened to long for safe JSON numeric serialization)",
            "format": "int64"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss)."
      },
      "MT4ManagerRightsApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4ManagerRights"
              }
            ],
            "description": "v2 DTO for an MT4 manager-account configuration entry. Curated subset\r\nof the wrapper's ConManager struct — exposes Login/Name/Groups/MailBox,\r\nthe 19 boolean permission rights, IP-filter fields, and InfoDepth.\r\nDrops internal fields: SecGroups, ExpTime, Unused, Reserved blocks.\r\nIPFrom/IPTo are widened from uint to long so the JSON-serialized value\r\nfits inside JS Number safely (no precision loss).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ManagerRightsListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4ManagerRights"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4MarginLevel": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Trading account number",
            "format": "int32"
          },
          "group": {
            "type": "string",
            "description": "Group the account belongs to",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "description": "Account leverage (e.g. 100 means 1:100)",
            "format": "int32"
          },
          "updated": {
            "type": "integer",
            "description": "Last update timestamp (MT4 unix-time int)",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "description": "Account balance (deposit minus losses)",
            "format": "double"
          },
          "equity": {
            "type": "number",
            "description": "Equity (balance + floating P&L)",
            "format": "double"
          },
          "volume": {
            "type": "integer",
            "description": "Open volume across all positions",
            "format": "int32"
          },
          "margin": {
            "type": "number",
            "description": "Used margin",
            "format": "double"
          },
          "free": {
            "type": "number",
            "description": "Free margin (equity − margin)",
            "format": "double"
          },
          "level": {
            "type": "number",
            "description": "Margin level in % (equity / margin × 100)",
            "format": "double"
          },
          "controllingType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginControllingType"
              }
            ],
            "description": "Whether margin is controlled by percentage or currency"
          },
          "levelType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginLevelType"
              }
            ],
            "description": "Indicates margin call / stop-out state"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO mirroring the wrapper's MarginLevel record. All fields are kept\r\nbecause clients monitoring margin call / stop-out conditions need the\r\ncomplete state. ControllingType and LevelType remain as MT4 enums and\r\nserialize as string names via the V2JsonContext UseStringEnumConverter\r\noption (e.g. \"Percent\" rather than 0)."
      },
      "MT4MarginLevelApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4MarginLevel"
              }
            ],
            "description": "v2 DTO mirroring the wrapper's MarginLevel record. All fields are kept\r\nbecause clients monitoring margin call / stop-out conditions need the\r\ncomplete state. ControllingType and LevelType remain as MT4 enums and\r\nserialize as string names via the V2JsonContext UseStringEnumConverter\r\noption (e.g. \"Percent\" rather than 0).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4MarginLevelListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4MarginLevel"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4NewsTopic": {
        "type": "object",
        "properties": {
          "key": {
            "type": "integer",
            "description": "News key — the identifier used by `NewsBodyGet` and\r\n`NewsBodyRequest` to fetch the body for this topic.",
            "format": "int32"
          },
          "time": {
            "type": "string",
            "description": "Published time of the news topic (UTC).",
            "format": "date-time"
          },
          "topic": {
            "type": "string",
            "description": "News headline / subject (max 256 chars at the wrapper layer).",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "News category. Slash-separated path on the wrapper side (e.g.\r\n\"Markets\\Asian Markets News\") used by the MT4 client terminal to\r\nbuild a tree view. Max 64 chars at the wrapper layer.",
            "nullable": true
          },
          "keywords": {
            "type": "string",
            "description": "Comma-separated keyword list (max 256 chars). Used by quote-feed\r\nbrokers as a symbol filter — for example `\"!EURUSD, EUR*\"`\r\nselects all EUR pairs except EURUSD.",
            "nullable": true
          },
          "priority": {
            "type": "integer",
            "description": "News priority: 0 = general, 1 = high.",
            "format": "int32"
          },
          "langId": {
            "type": "integer",
            "description": "Windows LCID language id. 0 means unspecified; otherwise the low\r\n16 bits of a Windows LCID (the language portion).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing a single news topic header as held in the wrapper's\r\npumping cache. Curated subset of the wrapper's NewsTopic: enough to render\r\na list / browse view of broker-distributed news (Key for follow-up\r\nNewsBodyGet / NewsBodyRequest, Time, Topic, Category, Keywords, Priority,\r\nLangId). The wrapper's `Body` property is intentionally excluded —\r\nit is x86-only at the unmanaged layer (the MT4 ManagerAPI lays out the\r\nbody pointer as a 32-bit field and the wrapper throws\r\nSystem.PlatformNotSupportedException on x64) and is fetched\r\nseparately via `NewsBodyGet(key)`."
      },
      "MT4NewsTopicApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4NewsTopic"
              }
            ],
            "description": "v2 DTO describing a single news topic header as held in the wrapper's\r\npumping cache. Curated subset of the wrapper's NewsTopic: enough to render\r\na list / browse view of broker-distributed news (Key for follow-up\r\nNewsBodyGet / NewsBodyRequest, Time, Topic, Category, Keywords, Priority,\r\nLangId). The wrapper's `Body` property is intentionally excluded —\r\nit is x86-only at the unmanaged layer (the MT4 ManagerAPI lays out the\r\nbody pointer as a 32-bit field and the wrapper throws\r\nSystem.PlatformNotSupportedException on x64) and is fetched\r\nseparately via `NewsBodyGet(key)`.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4NewsTopicListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4NewsTopic"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4NotificationsSendRequest": {
        "type": "object",
        "properties": {
          "logins": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Account logins to deliver the notification to (server-side fan-out\r\n— the wrapper sends one notification per recipient in a single\r\nManager-API call).",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Notification text. Single-line; the MT4 mobile client displays it\r\nas the push body. Controller enforces a length cap to keep the\r\npayload tractable on the unmanaged side.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request body for the v2 `NotificationsSend` admin endpoint —\r\npushes a single message to one or more MT4 clients identified by\r\naccount login. Maps onto the wrapper's\r\n`NotificationsSend2(int[] logins, string message)`."
      },
      "MT4Online": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Trading account number (login)",
            "format": "int32"
          },
          "group": {
            "type": "string",
            "description": "Group name the account belongs to",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing an online user session entry. Curated subset of the\r\nwrapper's OnlineRecord — exposes the login id and group name, which is\r\nwhat callers actually need to know who is connected. IP, Counter and\r\ninternal Reserved fields are intentionally omitted: IP is potentially\r\nPII and not always meaningful (NAT, proxies), Counter/Reserved are\r\nwrapper bookkeeping."
      },
      "MT4OnlineListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Online"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4Performance": {
        "type": "object",
        "properties": {
          "ctm": {
            "type": "string",
            "description": "Snapshot timestamp (wrapper internal: __time32_t)",
            "format": "date-time"
          },
          "users": {
            "type": "integer",
            "description": "Connected-users count at the snapshot",
            "format": "int32"
          },
          "cpu": {
            "type": "integer",
            "description": "CPU load, percent (0..100)",
            "format": "int32"
          },
          "freeMem": {
            "type": "integer",
            "description": "Free memory at the snapshot, in kilobytes",
            "format": "int32"
          },
          "network": {
            "type": "integer",
            "description": "Network throughput at the snapshot, in kilobytes per second",
            "format": "int32"
          },
          "sockets": {
            "type": "integer",
            "description": "Open-sockets count at the snapshot",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 server performance snapshot — one row in the\r\ntime-series that `PerformanceRequest` returns. Mirrors the wrapper's\r\n`PerformanceInfo` struct: a periodic resource sample (server-defined\r\ncadence, typically every 5 minutes) covering CPU, memory, network, socket\r\ncount, and connected-user count at CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Performance.Ctm. Used for capacity\r\nplanning, dashboards, and incident timelines. The wrapper's private\r\nunderscore-prefixed unix-time field is masked by CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4Performance.Ctm."
      },
      "MT4PerformanceListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Performance"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ServerLog": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Log level / message category (Ok / Trade / Login / Warn / Err / Att).\r\n<br>\r\nExposed as a plain string instead of an enum because STJ source-gen's\r\nglobal `UseStringEnumConverter` doesn't consistently apply to\r\nleaf-enum fields reachable only via nested generics\r\n(`List<MT4ServerLog>.Code`). Property-level\r\n`[JsonConverter(typeof(JsonStringEnumConverter<T>))]` also\r\nfailed for the same reason — the source generator does not bind the\r\nattribute at the leaf. Mapping at the mapper level (enum.ToString())\r\nis the most reliable path that survives the source generator.\r\n",
            "nullable": true
          },
          "time": {
            "type": "string",
            "description": "Server-side timestamp as the wrapper formats it (string, not DateTime — preserved verbatim)",
            "nullable": true
          },
          "ip": {
            "type": "string",
            "description": "Client IP recorded for the event (empty for server-internal events)",
            "nullable": true
          },
          "message": {
            "type": "string",
            "description": "Free-text log message",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one MT4 server journal entry. Returned by `JournalRequest`\r\nwhen querying server-side logs for a date window. Same field set as the\r\nwrapper's `ServerLog` — the wrapper struct is already minimal, no\r\nsecrets to drop. `Code` serialises as a string via\r\nCPlugin.SaaSWebApps.WebAPI.Code.Json.V2JsonContext's `UseStringEnumConverter`."
      },
      "MT4ServerLogListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4ServerLog"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4ServerTime": {
        "type": "object",
        "properties": {
          "accessHours": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "7×24 = 168 hourly access flags. Index = day*24 + hour;\r\nday 0 = Sunday (MT4 convention). 0 = denied, 1 = allowed.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n"
      },
      "MT4ServerTimeApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4ServerTime"
              }
            ],
            "description": "v2 DTO for the MT4 server's per-hour access matrix (wrapper's\r\n`ConTime.Days` field). 168-element flat array; each element\r\nis `0` (denied) or `1` (allowed) for one hour of the\r\nweek. Layout: `index = day * 24 + hour`, day-of-week 0..6\r\nmatches MT4's native convention where day 0 = Sunday.\r\n<br>\r\nExample: `AccessHours[24..47]` covers Monday's 24 hours.\r\nInternal `DaysControl` and `Reserved` wrapper fields\r\nare not part of the v2 contract.\r\n",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolChangeRequest": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol name (max 12 chars — wrapper's fixed slot)",
            "nullable": true
          },
          "color": {
            "type": "integer",
            "description": "Quote display color (raw int; broker UI convention)",
            "format": "int32"
          },
          "spread": {
            "type": "integer",
            "description": "Spread (in points; 0 = market spread)",
            "format": "int32"
          },
          "spreadBalance": {
            "type": "integer",
            "description": "Spread imbalance offset (in points)",
            "format": "int32"
          },
          "stopsLevel": {
            "type": "integer",
            "description": "Minimum allowed stops distance from market (in points)",
            "format": "int32"
          },
          "smoothing": {
            "type": "integer",
            "description": "Quote-smoothing parameter (raw int; broker-defined)",
            "format": "int32"
          },
          "exeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SymbolExecMode"
              }
            ],
            "description": "Order execution mode (Request/Instant/Market/Exchange)"
          }
        },
        "additionalProperties": false,
        "description": "POST body for the Manager-live `SymbolChange` endpoint. Maps 1:1 to the\r\nwrapper's `SymbolProperties` struct (the public properties, not the\r\nunderscore-prefixed backing fields). The struct's 8-int `Reserved`\r\npadding is dropped from the v2 contract.\r\n            \r\n<br>Use cases: dealers and exchange operators adjusting per-symbol spread,\r\nstops level, smoothing, or quote-color metadata without touching the broader\r\nsymbol configuration. Heavier write operations (currency, calc mode,\r\nmargin, swap) live on the separate `CfgUpdateSymbol` Type 1 mutator."
      },
      "MT4SymbolConfig": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol name (max 12 chars)",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Human-readable description",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "Data feed source identifier",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "Quote currency code",
            "nullable": true
          },
          "type": {
            "type": "integer",
            "description": "Symbol type identifier",
            "format": "int32"
          },
          "digits": {
            "type": "integer",
            "description": "Number of decimal digits in the quote",
            "format": "int32"
          },
          "tradeMode": {
            "type": "string",
            "description": "Trading mode (Disabled / CloseOnly / Full)",
            "nullable": true
          },
          "backgroundColor": {
            "type": "integer",
            "description": "Background colour for terminal client (BGR int)",
            "format": "int32"
          },
          "count": {
            "type": "integer",
            "description": "Tick counter for the symbol (computed)",
            "format": "int32"
          },
          "countOriginal": {
            "type": "integer",
            "description": "Original tick counter (computed)",
            "format": "int32"
          },
          "realtime": {
            "type": "integer",
            "description": "0 = synthetic, non-zero = real-time feed",
            "format": "int32"
          },
          "starting": {
            "type": "string",
            "description": "Symbol activation date (UTC)",
            "format": "date-time"
          },
          "expiration": {
            "type": "string",
            "description": "Symbol expiration date (UTC)",
            "format": "date-time"
          },
          "profitCalculationMode": {
            "type": "string",
            "description": "Profit calculation mode (Forex / CFD / Futures)",
            "nullable": true
          },
          "filter": {
            "type": "integer",
            "description": "Tick filter type",
            "format": "int32"
          },
          "filterCounter": {
            "type": "integer",
            "description": "Tick filter counter (computed)",
            "format": "int32"
          },
          "filterLimit": {
            "type": "number",
            "description": "Tick filter price-change limit",
            "format": "double"
          },
          "filterSmoothing": {
            "type": "integer",
            "description": "Tick filter smoothing factor",
            "format": "int32"
          },
          "logging": {
            "type": "integer",
            "description": "0 = no logging, non-zero = log price changes",
            "format": "int32"
          },
          "spread": {
            "type": "integer",
            "description": "Spread in points (0 = floating)",
            "format": "int32"
          },
          "spreadBalance": {
            "type": "integer",
            "description": "Spread balance correction",
            "format": "int32"
          },
          "symbolExecMode": {
            "type": "string",
            "description": "Symbol execution mode",
            "nullable": true
          },
          "swapEnable": {
            "type": "integer",
            "description": "0 = swaps disabled, non-zero = enabled",
            "format": "int32"
          },
          "swapType": {
            "type": "string",
            "description": "Swap type (Points / SymbolBase / SymbolMargin / CurrencyMargin)",
            "nullable": true
          },
          "swapLong": {
            "type": "number",
            "description": "Swap value for long positions",
            "format": "double"
          },
          "swapShort": {
            "type": "number",
            "description": "Swap value for short positions",
            "format": "double"
          },
          "swapRollover3Days": {
            "type": "integer",
            "description": "Day of week (1-7) when 3-day rollover applies",
            "format": "int32"
          },
          "contractSize": {
            "type": "number",
            "description": "Contract size",
            "format": "double"
          },
          "tickValue": {
            "type": "number",
            "description": "Tick value in deposit currency",
            "format": "double"
          },
          "tickSize": {
            "type": "number",
            "description": "Tick size",
            "format": "double"
          },
          "stopsLevel": {
            "type": "integer",
            "description": "Minimum distance to current price for SL/TP (points)",
            "format": "int32"
          },
          "gtcMode": {
            "type": "string",
            "description": "Pending order GTC mode",
            "nullable": true
          },
          "marginCalculationMode": {
            "type": "string",
            "description": "Margin calculation mode (Forex / CFD / Futures / CFDIndex / CFDLeverage)",
            "nullable": true
          },
          "marginInitial": {
            "type": "number",
            "description": "Initial margin per lot",
            "format": "double"
          },
          "marginMaintenance": {
            "type": "number",
            "description": "Maintenance margin per lot",
            "format": "double"
          },
          "marginHedged": {
            "type": "number",
            "description": "Hedged margin per lot",
            "format": "double"
          },
          "marginDivider": {
            "type": "number",
            "description": "Margin divider",
            "format": "double"
          },
          "percentage": {
            "type": "number",
            "description": "Percentage",
            "format": "double"
          },
          "point": {
            "type": "number",
            "description": "Point size",
            "format": "double"
          },
          "multiply": {
            "type": "number",
            "description": "Multiplier",
            "format": "double"
          },
          "bidTickValue": {
            "type": "number",
            "description": "Bid tick value",
            "format": "double"
          },
          "askTickValue": {
            "type": "number",
            "description": "Ask tick value",
            "format": "double"
          },
          "longOnly": {
            "type": "integer",
            "description": "0 = long+short, non-zero = long-only",
            "format": "int32"
          },
          "instantMaxVolume": {
            "type": "integer",
            "description": "Max instant-execution volume (lots, 0 = unlimited)",
            "format": "int32"
          },
          "marginCurrency": {
            "type": "string",
            "description": "Margin currency for non-deposit-currency symbols",
            "nullable": true
          },
          "freezeLevel": {
            "type": "integer",
            "description": "Freeze level (points before expiration to freeze trading)",
            "format": "int32"
          },
          "marginHedgedStrong": {
            "type": "integer",
            "description": "Strong hedge margin per lot",
            "format": "int32"
          },
          "valueDate": {
            "type": "string",
            "description": "Value date (UTC)",
            "format": "date-time"
          },
          "quotesDelay": {
            "type": "integer",
            "description": "Quotes delay in seconds (0 = real time)",
            "format": "int32"
          },
          "swapOpenPrice": {
            "type": "integer",
            "description": "0 = standard, non-zero = use open price for swaps",
            "format": "int32"
          },
          "swapVariationMargin": {
            "type": "integer",
            "description": "0 = swap, non-zero = variation margin",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a symbol's full server-side configuration. Curated from\r\n`ConSymbol`; drops reserved / unused arrays and the nested\r\n`Sessions` table (planned as its own endpoint).\r\n            \r\nSeven wrapper enum fields (`TradeMode`, `ProfitCalculationMode`,\r\n`SymbolExecMode`, `SwapType`, `GTCMode`,\r\n`MarginCalculationMode`) are exposed as strings; see\r\nfeedback-stj-enum-leaf-nested for why the conversion happens at the mapper."
      },
      "MT4SymbolConfigApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4SymbolConfig"
              }
            ],
            "description": "v2 DTO for a symbol's full server-side configuration. Curated from\r\n`ConSymbol`; drops reserved / unused arrays and the nested\r\n`Sessions` table (planned as its own endpoint).\r\n            \r\nSeven wrapper enum fields (`TradeMode`, `ProfitCalculationMode`,\r\n`SymbolExecMode`, `SwapType`, `GTCMode`,\r\n`MarginCalculationMode`) are exposed as strings; see\r\nfeedback-stj-enum-leaf-nested for why the conversion happens at the mapper.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolConfigListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolConfig"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolConfigUpdate": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "type": {
            "type": "integer",
            "format": "int32"
          },
          "digits": {
            "type": "integer",
            "format": "int32"
          },
          "tradeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeMode"
              }
            ]
          },
          "backgroundColor": {
            "type": "integer",
            "format": "int32"
          },
          "realtime": {
            "type": "integer",
            "format": "int32"
          },
          "starting": {
            "type": "string",
            "format": "date-time"
          },
          "expiration": {
            "type": "string",
            "format": "date-time"
          },
          "profitCalculationMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ProfitCalculationMode"
              }
            ]
          },
          "filter": {
            "type": "integer",
            "format": "int32"
          },
          "filterLimit": {
            "type": "number",
            "format": "double"
          },
          "filterSmoothing": {
            "type": "integer",
            "format": "int32"
          },
          "logging": {
            "type": "integer",
            "format": "int32"
          },
          "spread": {
            "type": "integer",
            "format": "int32"
          },
          "spreadBalance": {
            "type": "integer",
            "format": "int32"
          },
          "symbolExecMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SymbolExecMode"
              }
            ]
          },
          "swapEnable": {
            "type": "integer",
            "format": "int32"
          },
          "swapType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SwapType"
              }
            ]
          },
          "swapLong": {
            "type": "number",
            "format": "double"
          },
          "swapShort": {
            "type": "number",
            "format": "double"
          },
          "swapRollover3Days": {
            "type": "integer",
            "format": "int32"
          },
          "contractSize": {
            "type": "number",
            "format": "double"
          },
          "tickValue": {
            "type": "number",
            "format": "double"
          },
          "tickSize": {
            "type": "number",
            "format": "double"
          },
          "stopsLevel": {
            "type": "integer",
            "format": "int32"
          },
          "gtcMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/GTCMode"
              }
            ]
          },
          "marginCalculationMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MarginCalculationMode"
              }
            ]
          },
          "marginInitial": {
            "type": "number",
            "format": "double"
          },
          "marginMaintenance": {
            "type": "number",
            "format": "double"
          },
          "marginHedged": {
            "type": "number",
            "format": "double"
          },
          "marginDivider": {
            "type": "number",
            "format": "double"
          },
          "percentage": {
            "type": "number",
            "format": "double"
          },
          "longOnly": {
            "type": "integer",
            "format": "int32"
          },
          "instantMaxVolume": {
            "type": "integer",
            "format": "int32"
          },
          "marginCurrency": {
            "type": "string",
            "nullable": true
          },
          "freezeLevel": {
            "type": "integer",
            "format": "int32"
          },
          "marginHedgedStrong": {
            "type": "integer",
            "format": "int32"
          },
          "valueDate": {
            "type": "string",
            "format": "date-time"
          },
          "quotesDelay": {
            "type": "integer",
            "format": "int32"
          },
          "swapOpenPrice": {
            "type": "integer",
            "format": "int32"
          },
          "swapVariationMargin": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Type 1 mutator input for `CfgUpdateSymbol`. Same field set as the read\r\nDTO CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolConfig minus:\r\n  * `Symbol` (path parameter, immutable identity);\r\n  * `Count`, `CountOriginal`, `FilterCounter` — server-side\r\n    counters, derived;\r\n  * Stringified enum fields are submitted as their original wrapper enum\r\n    types here (one-way deserialisation accepts JsonStringEnumConverter\r\n    via the existing global STJ options).\r\n            \r\nFields preserved by the server-side read step (NOT on this DTO):\r\n  * `Symbol` identity.\r\n  * `Sessions` nested array (own endpoint planned).\r\n  * `Unused`, `ExternalUnused`, `ProfitReserved`,\r\n    `FilterReserved` reserved arrays.\r\n  * `Count`, `CountOriginal`, `FilterCounter`,\r\n    `BidTickValue`, `AskTickValue`, `Point`, `Multiply`\r\n    — server-derived from other fields, writing them is a no-op or\r\n    overwrite-with-stale."
      },
      "MT4SymbolDaySessions": {
        "type": "object",
        "properties": {
          "dayOfWeek": {
            "type": "integer",
            "description": "Day of week: 0=Sunday ... 6=Saturday (.NET DayOfWeek numeric)",
            "format": "int32"
          },
          "quoteOvernight": {
            "type": "integer",
            "description": "Whether quote sessions roll over midnight",
            "format": "int32"
          },
          "tradeOvernight": {
            "type": "integer",
            "description": "Whether trade sessions roll over midnight",
            "format": "int32"
          },
          "quote": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolSession"
            },
            "description": "Up to three quote (price) session windows for the day",
            "nullable": true
          },
          "trade": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolSession"
            },
            "description": "Up to three trade (order acceptance) session windows for the day",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO bundling the Quote and Trade sessions for one weekday on a symbol.\r\n`DayOfWeek` follows the .NET convention: 0=Sunday, 1=Monday, ..., 6=Saturday."
      },
      "MT4SymbolDaySessionsListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolDaySessions"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolGroup": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Group name (e.g. \"Forex\", \"CFD\", \"Metals\")",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of the group",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists."
      },
      "MT4SymbolGroupApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4SymbolGroup"
              }
            ],
            "description": "v2 DTO describing a single MT4 symbol group (security category).\r\nMirrors the wrapper's ConSymbolGroup — which only carries Name and\r\nDescription as fixed-size ANSI fields. There is no ProfitCurrency on\r\nthe MT4-side group struct (that lives on per-symbol settings, not on\r\nthe group level), so the DTO faithfully exposes only what exists.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolGroupListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolGroup"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolInfo": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol name (e.g. \"EURUSD\")",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "Number of digits after decimal point for prices on this symbol",
            "format": "int32"
          },
          "type": {
            "type": "integer",
            "description": "Security group index this symbol belongs to (refers to ConGroupSec)",
            "format": "int32"
          },
          "point": {
            "type": "number",
            "description": "Point size (e.g. 0.00001 for 5-digit FX); price increment per point",
            "format": "double"
          },
          "spread": {
            "type": "integer",
            "description": "Current spread, in points",
            "format": "int32"
          },
          "direction": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SymbolPriceDirection"
              }
            ],
            "description": "Direction of the last tick (Up/Down/Flat) — useful for UI flash highlights"
          },
          "bid": {
            "type": "number",
            "description": "Current bid price",
            "format": "double"
          },
          "ask": {
            "type": "number",
            "description": "Current ask price",
            "format": "double"
          },
          "high": {
            "type": "number",
            "description": "Session high price",
            "format": "double"
          },
          "low": {
            "type": "number",
            "description": "Session low price",
            "format": "double"
          },
          "lastTime": {
            "type": "string",
            "description": "Timestamp of the last tick; null when the pump has not yet\r\n            observed a tick for this symbol since connect.",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing a single symbol's market data and metadata as held in\r\nthe wrapper's pumping cache. Curated subset of the wrapper's SymbolInfo:\r\ncovers what clients monitoring tick feeds / building a quote panel\r\nactually need — current Bid/Ask, session High/Low, tick precision\r\n(Digits, Point), current Spread (in points), last-tick direction, and\r\nthe last-tick timestamp. Internal bookkeeping (Count, UpdateFlag,\r\nVisible, SpreadBalance, Commission, CommType) is intentionally omitted:\r\nthose are pump-side cache mechanics or broker-side commission config\r\nthat don't belong on a real-time market-data wire."
      },
      "MT4SymbolInfoApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4SymbolInfo"
              }
            ],
            "description": "v2 DTO describing a single symbol's market data and metadata as held in\r\nthe wrapper's pumping cache. Curated subset of the wrapper's SymbolInfo:\r\ncovers what clients monitoring tick feeds / building a quote panel\r\nactually need — current Bid/Ask, session High/Low, tick precision\r\n(Digits, Point), current Spread (in points), last-tick direction, and\r\nthe last-tick timestamp. Internal bookkeeping (Count, UpdateFlag,\r\nVisible, SpreadBalance, Commission, CommType) is intentionally omitted:\r\nthose are pump-side cache mechanics or broker-side commission config\r\nthat don't belong on a real-time market-data wire.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolInfoListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4SymbolInfo"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SymbolSession": {
        "type": "object",
        "properties": {
          "openHour": {
            "type": "integer",
            "description": "Session opens at this hour (0–23)",
            "format": "int32"
          },
          "openMinute": {
            "type": "integer",
            "description": "Session opens at this minute (0–59)",
            "format": "int32"
          },
          "closeHour": {
            "type": "integer",
            "description": "Session closes at this hour (0–23)",
            "format": "int32"
          },
          "closeMinute": {
            "type": "integer",
            "description": "Session closes at this minute (0–59)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one open/close session window. The wrapper stores three of these\r\nper direction (Quote/Trade) per weekday — see CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4SymbolDaySessions.\r\nAll four time components are server-local (the wrapper itself has no\r\ntimezone — the trading server's clock is the reference frame)."
      },
      "MT4Sync": {
        "type": "object",
        "properties": {
          "server": {
            "type": "string",
            "description": "Upstream sync server address (used as cursor key)",
            "nullable": true
          },
          "login": {
            "type": "string",
            "description": "Replication login (upstream credential identifier)",
            "nullable": true
          },
          "enable": {
            "type": "integer",
            "description": "Enable flag (0 = disabled, 1 = enabled — raw wrapper int)",
            "format": "int32"
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/SynchronizationMode"
              }
            ],
            "description": "Synchronization mode (Add / Update / Insert — wrapper enum)"
          },
          "from": {
            "type": "integer",
            "description": "Sync range start (negative = whole chart)",
            "format": "int32"
          },
          "to": {
            "type": "integer",
            "description": "Sync range end (negative = whole chart)",
            "format": "int32"
          },
          "securities": {
            "type": "string",
            "description": "Comma-separated list of symbols to synchronize",
            "nullable": true
          },
          "timeCorrection": {
            "type": "integer",
            "description": "Time correction in minutes applied to incoming bars",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source)."
      },
      "MT4SyncApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Sync"
              }
            ],
            "description": "v2 DTO for a single MT4 chart-history synchronization rule. Curated\r\nsubset of the wrapper's ConSync — drops the Reserved padding, the\r\nNext pointer chain, the unused port slot, AND the `Password`\r\nfield (replication credentials to the upstream sync source).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4SyncListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Sync"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TickInfo": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "Symbol the tick applies to (e.g. \"EURUSD\")",
            "nullable": true
          },
          "time": {
            "type": "string",
            "description": "Server-side tick timestamp (UTC)",
            "format": "date-time"
          },
          "bid": {
            "type": "number",
            "description": "Bid price (best price at which the broker is buying)",
            "format": "double"
          },
          "ask": {
            "type": "number",
            "description": "Ask price (best price at which the broker is selling)",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing the last known tick for a trading symbol. Pump-cached\r\nsnapshot of bid/ask quote — for sub-second updates, prefer the SignalR\r\ntick stream over polling this endpoint. The wrapper's `TickInfo`\r\nhas no additional fields; the curated DTO is 1:1 on field semantics\r\nwith the wrapper, only the timestamp source field is renamed for\r\nreadability (`Ctm` → `Time`)."
      },
      "MT4TickInfoApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4TickInfo"
              }
            ],
            "description": "v2 DTO describing the last known tick for a trading symbol. Pump-cached\r\nsnapshot of bid/ask quote — for sub-second updates, prefer the SignalR\r\ntick stream over polling this endpoint. The wrapper's `TickInfo`\r\nhas no additional fields; the curated DTO is 1:1 on field semantics\r\nwith the wrapper, only the timestamp source field is renamed for\r\nreadability (`Ctm` → `Time`).",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TickInfoListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4TickInfo"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TickRecord": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Server-side tick timestamp (UTC)",
            "format": "date-time"
          },
          "bid": {
            "type": "number",
            "description": "Bid price",
            "format": "double"
          },
          "ask": {
            "type": "number",
            "description": "Ask price",
            "format": "double"
          },
          "dataFeed": {
            "type": "integer",
            "description": "Index of the data feed source",
            "format": "int32"
          },
          "flags": {
            "type": "string",
            "description": "Tick flags as string — combination of `Raw`, `Normal`, `All`.\r\nString-typed for the same STJ source-gen reason as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4ServerLog.Code.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for one historical tick from `TicksRequest`. Same fields as the\r\nwrapper's `TickRecord`; `Ctm` is renamed to `Time` at the API\r\nboundary (consistent with CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4TickInfo). The wrapper's\r\n`TickRequestFlags` enum is exposed as a string to avoid the leaf-enum\r\nnested-generic serialization issue documented in feedback-stj-enum-leaf-nested."
      },
      "MT4TickRecordListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4TickRecord"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4Trade": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "description": "Order ticket number",
            "format": "int32"
          },
          "login": {
            "type": "integer",
            "description": "Owner account login",
            "format": "int32"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol traded (e.g. EURUSD)",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "Symbol precision (number of digits after the decimal point)",
            "format": "int32"
          },
          "tradeCommand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeCommand"
              }
            ],
            "description": "Trade direction / pending order type (Buy/Sell/BuyLimit/etc)"
          },
          "volume": {
            "type": "integer",
            "description": "Volume stored ×100 (e.g. 15 means 0.15 lots — see VolumeLots)",
            "format": "int32"
          },
          "volumeLots": {
            "type": "number",
            "description": "Volume expressed in lots, for human consumption (Volume / 100)",
            "format": "double"
          },
          "tradeRecordState": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeRecordState"
              }
            ],
            "description": "Lifecycle state of the trade record"
          },
          "openPrice": {
            "type": "number",
            "description": "Price at which the order was opened",
            "format": "double"
          },
          "sl": {
            "type": "number",
            "description": "Stop-loss price (0 if unset)",
            "format": "double"
          },
          "tp": {
            "type": "number",
            "description": "Take-profit price (0 if unset)",
            "format": "double"
          },
          "openTime": {
            "type": "string",
            "description": "Order open timestamp",
            "format": "date-time"
          },
          "closeTime": {
            "type": "string",
            "description": "Order close timestamp (default for still-open orders)",
            "format": "date-time"
          },
          "closePrice": {
            "type": "number",
            "description": "Price at which the order was closed",
            "format": "double"
          },
          "commission": {
            "type": "number",
            "description": "Broker commission",
            "format": "double"
          },
          "commissionAgent": {
            "type": "number",
            "description": "Agent (IB) commission",
            "format": "double"
          },
          "storage": {
            "type": "number",
            "description": "Accumulated swap / rollover charges",
            "format": "double"
          },
          "profit": {
            "type": "number",
            "description": "Realised / floating profit",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "description": "Taxes withheld",
            "format": "double"
          },
          "magic": {
            "type": "integer",
            "description": "Expert advisor magic number — client-supplied tag",
            "format": "int32"
          },
          "comment": {
            "type": "string",
            "description": "Free-form order comment",
            "nullable": true
          },
          "expiration": {
            "type": "string",
            "description": "Expiration timestamp for pending orders",
            "format": "date-time"
          },
          "tradeRecordReason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeRecordReason"
              }
            ],
            "description": "Reason the trade record was created/modified (Client/Expert/Dealer/Stopout/etc)"
          },
          "activationType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActivationType"
              }
            ],
            "description": "How a pending order was activated"
          },
          "timeStamp": {
            "type": "string",
            "description": "Last modification timestamp of the trade record",
            "format": "date-time"
          },
          "marginRate": {
            "type": "number",
            "description": "Margin conversion rate (margin currency → deposit currency)",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO mirroring the wrapper's TradeRecord. The set of fields is curated\r\nfor typical client use-cases — order monitoring, P&L reporting, trade\r\nhistory reconciliation. Internal padding/reserved/gateway-internal/raw\r\nunderscore-prefixed fields are intentionally excluded. Span<>-typed\r\nhelpers (ConvRates, ConvReserv, APIData) are excluded because System.Text.Json\r\ncannot serialize ref-struct-backed properties — those would force callers\r\nonto a custom converter for marginal value.\r\nEnum members (TradeCommand, TradeRecordState, TradeRecordReason,\r\nActivationType) serialize as string names via V2JsonContext\r\nUseStringEnumConverter — e.g. \"Buy\" rather than 0."
      },
      "MT4TradeApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4Trade"
              }
            ],
            "description": "v2 DTO mirroring the wrapper's TradeRecord. The set of fields is curated\r\nfor typical client use-cases — order monitoring, P&L reporting, trade\r\nhistory reconciliation. Internal padding/reserved/gateway-internal/raw\r\nunderscore-prefixed fields are intentionally excluded. Span<>-typed\r\nhelpers (ConvRates, ConvReserv, APIData) are excluded because System.Text.Json\r\ncannot serialize ref-struct-backed properties — those would force callers\r\nonto a custom converter for marginal value.\r\nEnum members (TradeCommand, TradeRecordState, TradeRecordReason,\r\nActivationType) serialize as string names via V2JsonContext\r\nUseStringEnumConverter — e.g. \"Buy\" rather than 0.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TradeListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4Trade"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TradeRestoreInput": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "description": "Order ticket (the input array position is the binding key for the result)",
            "format": "int32"
          },
          "login": {
            "type": "integer",
            "description": "Owner's login",
            "format": "int32"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol (e.g. `EURUSD`; max 12 ASCII chars on the wrapper side)",
            "nullable": true
          },
          "tradeCommand": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeCommand"
              }
            ],
            "description": "Trade command (buy / sell / pending / balance / etc.)"
          },
          "volume": {
            "type": "integer",
            "description": "Volume in 1/100 lots (15 = 0.15 lot)",
            "format": "int32"
          },
          "openPrice": {
            "type": "number",
            "description": "Open price",
            "format": "double"
          },
          "sl": {
            "type": "number",
            "description": "Stop loss",
            "format": "double"
          },
          "tp": {
            "type": "number",
            "description": "Take profit",
            "format": "double"
          },
          "closePrice": {
            "type": "number",
            "description": "Close price (0 for still-open trades)",
            "format": "double"
          },
          "profit": {
            "type": "number",
            "description": "Trade profit/loss",
            "format": "double"
          },
          "storage": {
            "type": "number",
            "description": "Swap (rollover charge)",
            "format": "double"
          },
          "commission": {
            "type": "number",
            "description": "Commission",
            "format": "double"
          },
          "openTime": {
            "type": "string",
            "description": "Open time (UTC)",
            "format": "date-time"
          },
          "closeTime": {
            "type": "string",
            "description": "Close time (UTC; default for still-open)",
            "format": "date-time"
          },
          "expiration": {
            "type": "string",
            "description": "Expiration time (UTC; default for non-pending orders)",
            "format": "date-time"
          },
          "magic": {
            "type": "integer",
            "description": "Magic number (EA identifier)",
            "format": "int32"
          },
          "comment": {
            "type": "string",
            "description": "Free-form comment (max ~31 ASCII chars on the wrapper side)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 narrow input DTO for `BackupRestoreOrders`. Carries the trade\r\nidentity + economic state that a disaster-recovery flow needs."
      },
      "MT4TradeRestoreResult": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "description": "Order ticket from the input array (matches by position)",
            "format": "int64"
          },
          "res": {
            "type": "integer",
            "description": "Per-order restore status: `0` = error, `1` = restored",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a single per-order result of a backup-restore operation.\r\nMirrors the wrapper's `TradeRestoreResult` — order ticket plus\r\na 1-byte status flag."
      },
      "MT4TradeRestoreResultListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4TradeRestoreResult"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TradeTransaction": {
        "type": "object",
        "properties": {
          "tradeTransactionType": {
            "type": "string",
            "description": "Transaction type: OpenPending, OpenMarket, ModifyPending, ModifyTrade, DeletePending, CloseMarket, BalanceAdd, CreditAdd, etc.",
            "nullable": true
          },
          "tradeCommand": {
            "type": "string",
            "description": "Trade command: Buy, Sell, BuyLimit, SellLimit, BuyStop, SellStop, Balance, Credit",
            "nullable": true
          },
          "tradeRequestFlags": {
            "type": "string",
            "description": "Request flags: None, MarketOpen, Partial, NoExpiration, etc.",
            "nullable": true
          },
          "expiration": {
            "type": "string",
            "description": "Pending order expiration time. Default value means GTC.",
            "format": "date-time"
          },
          "order": {
            "type": "integer",
            "description": "Order ticket. 0 on Open requests; server fills this on success.",
            "format": "int32"
          },
          "orderBy": {
            "type": "integer",
            "description": "Login (account number). Required for Balance/Credit operations.",
            "format": "int32"
          },
          "symbol": {
            "type": "string",
            "description": "Symbol (max 12 chars)",
            "nullable": true
          },
          "volume": {
            "type": "integer",
            "description": "Volume in MT4 internal units. 1 lot = 100, so e.g. 250 = 2.5 lots.",
            "format": "int32"
          },
          "price": {
            "type": "number",
            "description": "Order price",
            "format": "double"
          },
          "sl": {
            "type": "number",
            "description": "Stop-loss price (0 = none)",
            "format": "double"
          },
          "tp": {
            "type": "number",
            "description": "Take-profit price (0 = none)",
            "format": "double"
          },
          "ieDeviation": {
            "type": "integer",
            "description": "Instant-execution price deviation tolerance (points)",
            "format": "int32"
          },
          "comment": {
            "type": "string",
            "description": "Free-form comment (broker-visible)",
            "nullable": true
          },
          "crc": {
            "type": "integer",
            "description": "CRC for transaction integrity; usually 0 (server fills).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested."
      },
      "MT4TradeTransactionApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4TradeTransaction"
              }
            ],
            "description": "v2 DTO for a trade transaction — input AND output of `TradeTransaction`.\r\nThe wrapper's `TradeTransInfo` is in/out: the caller fills the request\r\nfields (operation type, command, symbol, volume, price), submits via POST,\r\nand the server populates the resulting `Order` id (for Open) or\r\nechoes the modified record (for Modify/Close).\r\n            \r\nEnum fields (`TradeTransactionType`, `TradeCommand`,\r\n`TradeRequestFlags`) are exposed as plain strings. Clients submit\r\nthe enum name (e.g. `\"Buy\"`, `\"OpenPending\"`); the response\r\nechoes the names back. This dodges the leaf-enum nested-generic STJ\r\nsource-gen quirk documented in feedback-stj-enum-leaf-nested.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4TradeUpdate": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "description": "Order ticket to edit (path parameter is the source of truth)",
            "format": "int32"
          },
          "sl": {
            "type": "number",
            "description": "New stop-loss price (0 = remove SL)",
            "format": "double"
          },
          "tp": {
            "type": "number",
            "description": "New take-profit price (0 = remove TP)",
            "format": "double"
          },
          "magic": {
            "type": "integer",
            "description": "Magic number / EA tag",
            "format": "int32"
          },
          "comment": {
            "type": "string",
            "description": "Comment (broker-visible)",
            "nullable": true
          },
          "commission": {
            "type": "number",
            "description": "Manual commission override",
            "format": "double"
          },
          "commissionAgent": {
            "type": "number",
            "description": "Manual agent-commission override",
            "format": "double"
          },
          "storage": {
            "type": "number",
            "description": "Swap / storage override",
            "format": "double"
          },
          "profit": {
            "type": "number",
            "description": "Profit override (back-office correction only)",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "description": "Taxes override",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Type 1 mutator input for the admin direct-edit endpoint\r\n`AdmTradeRecordModify`. Only the fields a back-office tool would\r\nlegitimately need to adjust are exposed; everything else (order id,\r\nlogin, symbol, volume, open/close times, gateway internals, conversion\r\nrates, API data blobs) is preserved from the server-side read.\r\n            \r\n<br>\r\nFor typical stop-loss / take-profit edits prefer\r\n`POST TradeTransaction` with `tradeTransactionType=ModifyTrade`\r\n— that goes through the wrapper's audited path. This endpoint is the\r\nlow-level admin override for back-office corrections.\r\n"
      },
      "MT4User": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Trading account number (login)",
            "format": "int32"
          },
          "group": {
            "type": "string",
            "description": "Group name the account belongs to",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the account holder",
            "nullable": true
          },
          "registrationDate": {
            "type": "string",
            "description": "UTC timestamp when the account was created",
            "format": "date-time"
          },
          "lastDate": {
            "type": "string",
            "description": "UTC timestamp of the last MT4 server interaction",
            "format": "date-time"
          },
          "externalId": {
            "type": "string",
            "description": "External customer identifier (e.g. CRM/KYC link). Wrapper's `Id` field.",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "MT4-internal status string (e.g. live/demo state)",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country (free text per broker's enrolment workflow)",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State / region",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Postal / ZIP code",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Street address",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "description": "Lead source / referral channel tag",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Contact phone",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Contact email",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Free-form back-office comment",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "description": "Account leverage (e.g. 100 means 1:100)",
            "format": "int32"
          },
          "agentAccount": {
            "type": "integer",
            "description": "IB / agent account number that referred this client",
            "format": "int32"
          },
          "lastIP": {
            "type": "integer",
            "description": "Last connection IP as raw int (use platform helpers to format)",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "description": "Current balance",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "description": "Credit on the account",
            "format": "double"
          },
          "prevMonthBalance": {
            "type": "number",
            "description": "Balance at the start of the previous calendar month",
            "format": "double"
          },
          "prevBalance": {
            "type": "number",
            "description": "Balance at the previous reporting close",
            "format": "double"
          },
          "prevMonthEquity": {
            "type": "number",
            "description": "Equity at the start of the previous calendar month",
            "format": "double"
          },
          "prevEquity": {
            "type": "number",
            "description": "Equity at the previous reporting close",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "description": "Interest rate (broker-defined, often used for swaps)",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "description": "Tax rate applied to the account",
            "format": "double"
          },
          "enableFlags": {
            "type": "integer",
            "description": "Account flag bitfield (wrapper's `EnableFlags`). Documented bits:\r\n  * 0x01 = account enabled (login allowed)\r\n  * 0x02 = client may change password\r\n  * 0x04 = account is read-only (no trading)\r\n  * 0x08 = OTP enrolment required at login\r\nBit positions reflect MT4 build 1455. Verify against the current MT4\r\nManager docs if pinning behaviour to a specific bit.",
            "format": "int32"
          },
          "sendReports": {
            "type": "integer",
            "description": "0 = no reports, non-zero = nightly email reports enabled",
            "format": "int32"
          },
          "mqid": {
            "type": "integer",
            "description": "MetaQuotes ID for mobile push notifications (0 if not linked).\r\nTyped as `long` in v2 even though current builds store it in\r\n32 bits — the wrapper exposes a wider underlying type and a checked\r\nnarrowing cast would crash for accounts whose mqid sits above\r\nInt32.MaxValue. Future-proofs the contract against MQ widening.",
            "format": "int64"
          },
          "userColor": {
            "type": "integer",
            "description": "UI tint color in terminal client lists",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 DTO describing a trading account. Curated subset of the wrapper's\r\n`UserRecord` — exposes identity, contact, financial and flag fields\r\nthat callers actually need.\r\n            \r\nDeliberately omitted from v2 (vs v1's full UserRecord shape):\r\n  * Password / PasswordInvestor / PasswordPhone / OtpSecret / ApiData /\r\n    SecureReserved — credentials and secrets must never cross the v2\r\n    boundary regardless of access level.\r\n  * Unused / Reserved2 / EnableReserved / TimeStamp — wrapper bookkeeping\r\n    with no caller-visible semantics.\r\n            \r\nAccount flags are exposed as a single CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4User.EnableFlags bitfield\r\n(the wrapper's native representation). Bit semantics are documented under\r\nthat property — splitting it into separate booleans would hide the fact\r\nthat MetaQuotes occasionally reuses bit positions across builds."
      },
      "MT4UserApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT4User"
              }
            ],
            "description": "v2 DTO describing a trading account. Curated subset of the wrapper's\r\n`UserRecord` — exposes identity, contact, financial and flag fields\r\nthat callers actually need.\r\n            \r\nDeliberately omitted from v2 (vs v1's full UserRecord shape):\r\n  * Password / PasswordInvestor / PasswordPhone / OtpSecret / ApiData /\r\n    SecureReserved — credentials and secrets must never cross the v2\r\n    boundary regardless of access level.\r\n  * Unused / Reserved2 / EnableReserved / TimeStamp — wrapper bookkeeping\r\n    with no caller-visible semantics.\r\n            \r\nAccount flags are exposed as a single CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4User.EnableFlags bitfield\r\n(the wrapper's native representation). Bit semantics are documented under\r\nthat property — splitting it into separate booleans would hide the fact\r\nthat MetaQuotes occasionally reuses bit positions across builds.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4UserCreate": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Optional preferred login. `0` = let server assign the next free\r\nid. `> 0` = request this exact id (server rejects collisions\r\nvia wrapper error code).",
            "format": "int32"
          },
          "group": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "state": {
            "type": "string",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "nullable": true
          },
          "address": {
            "type": "string",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "format": "int32"
          },
          "agentAccount": {
            "type": "integer",
            "format": "int32"
          },
          "interestRate": {
            "type": "number",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "format": "double"
          },
          "enableFlags": {
            "type": "integer",
            "format": "int32"
          },
          "sendReports": {
            "type": "integer",
            "format": "int32"
          },
          "mqid": {
            "type": "integer",
            "format": "int64"
          },
          "userColor": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Type 1 mutator input — full create shape for `UserRecordNew`.\r\nSame writable fields as CPlugin.SaaSWebApps.WebAPI.DTOs.MT4.v2.MT4UserUpdate minus the explicit\r\n`Balance`/`Credit` (those should come through dedicated balance\r\noperations after the account exists). The wrapper allocates the next free\r\nlogin id when `Login = 0`; clients may also request a specific id by\r\nsetting `Login > 0` (the server rejects collisions).\r\n            \r\nPassword / OTP / API-data fields are NOT on this DTO. After successful\r\ncreation, set the initial password via a separate\r\n`POST UserPasswordSet/{login}` call. The wrapper accepts the new\r\naccount with empty password bytes; the password endpoint lifts it to\r\nusable credentials."
      },
      "MT4UserListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT4User"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT4UserRestoreInput": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Account login (record key)",
            "format": "int32"
          },
          "group": {
            "type": "string",
            "description": "Group name",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Account holder display name",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "description": "Trading leverage (e.g. 100 for 1:100)",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "description": "Account balance (broker base currency)",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "description": "Account credit (e.g. promotional bonus)",
            "format": "double"
          },
          "enable": {
            "type": "integer",
            "description": "Account enabled flag (0 = disabled, 1 = enabled — raw wrapper int)",
            "format": "int32"
          },
          "enableReadOnly": {
            "type": "integer",
            "description": "Read-only flag (1 = cannot open positions)",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "v2 narrow input DTO for `BackupRestoreUsers`. Carries the\r\naccount identity + persistent metadata + money/leverage state that a\r\ndisaster-recovery flow needs to recreate."
      },
      "MT4UserUpdate": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "description": "Group name the account belongs to",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Display name of the account holder",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "description": "External customer identifier (CRM/KYC link)",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "MT4-internal status string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State / region",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Postal / ZIP code",
            "nullable": true
          },
          "address": {
            "type": "string",
            "description": "Street address",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "description": "Lead source / referral channel tag",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Contact phone",
            "nullable": true
          },
          "email": {
            "type": "string",
            "description": "Contact email",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Free-form back-office comment",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "description": "Account leverage (e.g. 100 means 1:100)",
            "format": "int32"
          },
          "agentAccount": {
            "type": "integer",
            "description": "IB / agent account number that referred this client",
            "format": "int32"
          },
          "balance": {
            "type": "number",
            "description": "Current balance (prefer dedicated balance ops for audit trail)",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "description": "Credit on the account",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "description": "Interest rate",
            "format": "double"
          },
          "taxes": {
            "type": "number",
            "description": "Tax rate",
            "format": "double"
          },
          "enableFlags": {
            "type": "integer",
            "description": "Account flag bitfield — see MT4User.EnableFlags for bit semantics",
            "format": "int32"
          },
          "sendReports": {
            "type": "integer",
            "description": "0 = no reports, non-zero = nightly email reports enabled",
            "format": "int32"
          },
          "mqid": {
            "type": "integer",
            "description": "MetaQuotes ID for mobile push notifications",
            "format": "int64"
          },
          "userColor": {
            "type": "integer",
            "description": "UI tint color in terminal client lists",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Type 1 mutator input — full-replace shape for `UserRecordUpdate`.\r\nClient submits every non-secret, non-read-only, non-computed field; the\r\nhandler reads the current record from MT4 server, copies the secrets and\r\nread-only fields off it, applies this DTO over the rest, and writes the\r\nmodified structure back.\r\n            \r\nRead-only fields that do NOT appear here (preserved by the server-side\r\nread step):\r\n  * `Login` — passed as a path parameter, immutable identity.\r\n  * `RegistrationDate` — set once on creation, never updated.\r\n  * `LastDate`, `LastIP` — assigned by MT4 server during login.\r\n  * `PrevMonthBalance`, `PrevBalance`, `PrevMonthEquity`,\r\n    `PrevEquity` — derived server-side at reporting close.\r\n            \r\nSecret fields that do NOT appear here (preserved by the server-side\r\nread step; use dedicated endpoints to change them):\r\n  * `Password`, `PasswordInvestor`, `PasswordPhone` —\r\n    change via `POST UserPasswordSet`.\r\n  * `OTPSecret` — provisioned via separate admin flow.\r\n  * `APIData` — wrapper-internal blob, never client-controlled.\r\n            \r\n<br><b>Note on Balance/Credit:</b> these fields ARE accepted here because the\r\nwrapper `UserRecordUpdate` writes them directly. However, the audit-\r\ntrail-preserving way to move money is the dedicated balance operation\r\nendpoints (forthcoming) — submitting Balance via this DTO bypasses the\r\naudit log on MT4 server side.\r\n"
      },
      "MT4UsersGroupOp": {
        "type": "object",
        "properties": {
          "command": {
            "type": "string",
            "description": "Bulk operation: `\"Delete\"`, `\"Enable\"`, `\"Disable\"`, `\"Leverage\"`, or `\"SetGroup\"`.",
            "nullable": true
          },
          "newGroup": {
            "type": "string",
            "description": "Target group name (max 15 chars + NUL). Only used by `SetGroup`.",
            "nullable": true
          },
          "leverage": {
            "type": "integer",
            "description": "New leverage value (e.g. 100, 200, 500). Only used by `Leverage`.",
            "format": "int32"
          },
          "logins": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "List of account logins (account numbers) to apply the operation to. Must be non-empty.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "v2 request body for `UsersGroupOp` — bulk group-membership / leverage /\r\nenable-disable / delete operation across a list of account logins."
      },
      "MT5ConCommTier": {
        "type": "object",
        "properties": {
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommissionMode"
              }
            ],
            "description": "EnCommissionMode",
            "nullable": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommissionVolumeType"
              }
            ],
            "description": "EnCommissionVolumeType",
            "nullable": true
          },
          "value": {
            "type": "number",
            "description": "commission value",
            "format": "double",
            "nullable": true
          },
          "minimal": {
            "type": "number",
            "description": "minimal commission value",
            "format": "double",
            "nullable": true
          },
          "rangeFrom": {
            "type": "number",
            "description": "tier range from",
            "format": "double",
            "nullable": true
          },
          "rangeTo": {
            "type": "number",
            "description": "tier range to",
            "format": "double",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "commission currency (for Mode==COMM_MONEY_SPECIFIED)",
            "nullable": true
          },
          "maximal": {
            "type": "number",
            "description": "maximal commission value",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5ConCommission": {
        "type": "object",
        "properties": {
          "name": {
            "maxLength": 64,
            "type": "string",
            "description": "commission name",
            "nullable": true
          },
          "description": {
            "maxLength": 64,
            "type": "string",
            "description": "description",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "symbols path",
            "nullable": true
          },
          "mode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommMode"
              }
            ],
            "description": "EnCommMode",
            "nullable": true
          },
          "rangeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommRangeMode"
              }
            ],
            "description": "EnCommRangeMode",
            "nullable": true
          },
          "chargeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommChargeMode"
              }
            ],
            "description": "EnCommChargeMode",
            "nullable": true
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT5ConCommTier"
            },
            "description": "commission tiers. Index in array from 0 means Position of the range.",
            "nullable": true
          },
          "turnoverCurrency": {
            "type": "string",
            "description": "- turnover calculation currency",
            "nullable": true
          },
          "entryMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommEntryMode"
              }
            ],
            "description": "EnCommEntryMode",
            "nullable": true
          },
          "actionMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommActionMode"
              }
            ],
            "description": "EnCommActionMode",
            "nullable": true
          },
          "profitMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommProfitMode"
              }
            ],
            "description": "EnCommProfitMode",
            "nullable": true
          },
          "reasonFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCommReasonFlags"
              }
            ],
            "description": "EnCommReasonFlags",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5ConGroup": {
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "description": "group name",
            "nullable": true
          },
          "server": {
            "type": "integer",
            "description": "group trade server ID",
            "format": "int64",
            "nullable": true
          },
          "permissionsFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnPermissionsFlags"
              }
            ],
            "description": "EnPermissionsFlags",
            "nullable": true
          },
          "authMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnAuthMode"
              }
            ],
            "description": "EnAuthMode",
            "nullable": true
          },
          "authPasswordMin": {
            "type": "integer",
            "description": "minimal password length",
            "format": "int32",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "company name",
            "nullable": true
          },
          "companyPage": {
            "type": "string",
            "description": "company web page URL",
            "nullable": true
          },
          "companyEmail": {
            "type": "string",
            "description": "company email",
            "nullable": true
          },
          "companySupportPage": {
            "type": "string",
            "description": "company support site URL",
            "nullable": true
          },
          "companySupportEmail": {
            "type": "string",
            "description": "company support email",
            "nullable": true
          },
          "companyCatalog": {
            "type": "string",
            "description": "company catalog name (for reports and email templates)",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "description": "deposit currency",
            "nullable": true
          },
          "currencyDigits": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "reportsMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnReportsMode"
              }
            ],
            "description": "EnReportsMode",
            "nullable": true
          },
          "reportsFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnReportsFlags"
              }
            ],
            "description": "EnReportsFlags",
            "nullable": true
          },
          "reportsSMTP": {
            "type": "string",
            "description": "reports SMTP server address:ports",
            "nullable": true
          },
          "reportsSMTPLogin": {
            "type": "string",
            "description": "reports SMTP server login",
            "nullable": true
          },
          "reportsSMTPPass": {
            "type": "string",
            "description": "reports SMTP server password",
            "nullable": true
          },
          "newsMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnNewsMode"
              }
            ],
            "description": "EnNewsMode",
            "nullable": true
          },
          "newsCategory": {
            "type": "string",
            "description": "news category filter string",
            "nullable": true
          },
          "newsLang": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "<strong>Setter not yet implemented. If you want to send this value to MT5, ask vendor to implement this feature. Exception will be thrown if you send anything but null here.</strong>\r\n<br />\r\n<br />\r\n            allowed news languages (Windows API LANGID used)",
            "nullable": true
          },
          "mailMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnMailMode"
              }
            ],
            "description": "EnMailMode",
            "nullable": true
          },
          "tradeFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnTradeRightsFlags"
              }
            ],
            "description": "EnTradeFlags",
            "nullable": true
          },
          "tradeInterestRate": {
            "type": "number",
            "description": "interest rate for free deposit money",
            "format": "double",
            "nullable": true
          },
          "tradeVirtualCredit": {
            "type": "number",
            "description": "virtual credit",
            "format": "double",
            "nullable": true
          },
          "marginFreeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnFreeMarginMode"
              }
            ],
            "description": "EnFreeMarginMode",
            "nullable": true
          },
          "marginSOMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnStopOutMode"
              }
            ],
            "description": "EnStopOutMode",
            "nullable": true
          },
          "marginCall": {
            "type": "number",
            "description": "Margin Call level value",
            "format": "double",
            "nullable": true
          },
          "marginStopOut": {
            "type": "number",
            "description": "Sto-Out level value",
            "format": "double",
            "nullable": true
          },
          "demoLeverage": {
            "type": "integer",
            "description": "default demo accounts leverage",
            "format": "int32",
            "nullable": true
          },
          "demoDeposit": {
            "type": "number",
            "description": "default demo accounts deposit",
            "format": "double",
            "nullable": true
          },
          "limitHistory": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnHistoryLimit"
              }
            ],
            "description": "EnHistoryLimit",
            "nullable": true
          },
          "limitOrders": {
            "type": "integer",
            "description": "max. order limit",
            "format": "int32",
            "nullable": true
          },
          "limitSymbols": {
            "type": "integer",
            "description": "max. selected symbols limit",
            "format": "int32",
            "nullable": true
          },
          "commissions": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/MT5ConCommission"
            },
            "description": "/// <strong>Setter not yet implemented. If you want to send this value to MT5, ask vendor to implement this feature. Exception will be thrown if you send anything but null here.</strong><br /><br />",
            "nullable": true
          },
          "marginFreeProfitMode": {
            "type": "integer",
            "description": "margin free profit accounting mode",
            "format": "int32",
            "nullable": true
          },
          "marginMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnMarginMode"
              }
            ],
            "description": "group risk management mode - EnMarginMode",
            "nullable": true
          },
          "authOTPMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnAuthOTPMode"
              }
            ],
            "description": "OTP authentication mode - EnAuthOTPMode",
            "nullable": true
          },
          "tradeTransferMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnTransferMode"
              }
            ],
            "description": "deposit transfer mode - EnTransferMode",
            "nullable": true
          },
          "marginFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnMarginCalcFlags"
              }
            ],
            "description": "margin calculation flags EnMarginFlags",
            "nullable": true
          },
          "limitPositions": {
            "type": "integer",
            "description": "max. positions limit",
            "format": "int32",
            "nullable": true
          },
          "reportsEmail": {
            "type": "string",
            "description": "reports SMTP email account",
            "nullable": true
          },
          "companyDepositPage": {
            "type": "string",
            "description": "company deposit URL",
            "nullable": true
          },
          "companyWithdrawalPage": {
            "type": "string",
            "description": "company deposit URL",
            "nullable": true
          },
          "demoInactivityPeriod": {
            "type": "integer",
            "description": "demo groups in days, orders and positions will be deleted after this period",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5ConGroupApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT5ConGroup"
              }
            ],
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5ConManager": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Get and set the login of a manager",
            "format": "int64",
            "nullable": true
          },
          "mailbox": {
            "type": "string",
            "description": "Get and set the name of a manager's mailbox in the internal mail system.",
            "nullable": true
          },
          "server": {
            "type": "integer",
            "description": "Get and set the ID of the trade server, to which the manager belongs.",
            "format": "int64",
            "nullable": true
          },
          "limitLogs": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnManagerLimit"
              }
            ],
            "description": "Get and set the time period of system logs available to a manager.",
            "nullable": true
          },
          "limitReports": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnManagerLimit"
              }
            ],
            "description": "Get and set the time period of reports available to a manager.",
            "nullable": true
          },
          "right": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EnManagerRights"
            },
            "description": "What is granted to manager.<br />\r\nFeatures not enlisted here means that such features is not permitted.<br />",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5ConManagerApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT5ConManager"
              }
            ]
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5Deal": {
        "required": [
          "deal"
        ],
        "type": "object",
        "properties": {
          "deal": {
            "type": "integer",
            "description": "deal ticket",
            "format": "int64"
          },
          "externalID": {
            "type": "string",
            "description": "deal ticket in external system (exchange, ECN, etc)",
            "nullable": true
          },
          "login": {
            "type": "integer",
            "description": "client login",
            "format": "int64",
            "nullable": true
          },
          "dealer": {
            "type": "integer",
            "description": "processed dealer login (0-means auto)",
            "format": "int64",
            "nullable": true
          },
          "partyID": {
            "type": "integer",
            "description": "counterparty identification",
            "format": "int64",
            "nullable": true
          },
          "order": {
            "type": "integer",
            "description": "deal order ticket",
            "format": "int64",
            "nullable": true
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DealAction"
              }
            ],
            "description": "DealAction",
            "nullable": true
          },
          "entry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EntryFlag"
              }
            ],
            "description": "EntryFlags",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "price digits",
            "format": "int32",
            "nullable": true
          },
          "digitsCurrency": {
            "type": "integer",
            "description": "currency digits",
            "format": "int32",
            "nullable": true
          },
          "contractSize": {
            "type": "number",
            "description": "symbol contract size",
            "format": "double",
            "nullable": true
          },
          "time": {
            "type": "string",
            "description": "deal creation datetime in seconds. If the value of this field is specified, the IMTDeal::TimeMsc value will be filled in automatically.",
            "format": "date-time",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "description": "deal symbol",
            "nullable": true
          },
          "price": {
            "type": "number",
            "description": "deal price",
            "format": "double",
            "nullable": true
          },
          "priceSL": {
            "type": "number",
            "description": "order SL",
            "format": "double",
            "nullable": true
          },
          "priceTP": {
            "type": "number",
            "description": "order TP",
            "format": "double",
            "nullable": true
          },
          "volume": {
            "type": "integer",
            "description": "deal volume",
            "format": "int64",
            "nullable": true
          },
          "volumeExt": {
            "type": "integer",
            "description": "deal volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "volumeClosed": {
            "type": "integer",
            "description": "closed volume",
            "format": "int64",
            "nullable": true
          },
          "volumeClosedExt": {
            "type": "integer",
            "description": "closed volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "profit": {
            "type": "number",
            "description": "deal profit",
            "format": "double",
            "nullable": true
          },
          "value": {
            "type": "number",
            "description": "value",
            "format": "double",
            "nullable": true
          },
          "storage": {
            "type": "number",
            "description": "deal collected swaps",
            "format": "double",
            "nullable": true
          },
          "commission": {
            "type": "number",
            "description": "deal commission",
            "format": "double",
            "nullable": true
          },
          "obsoleteValue": {
            "type": "number",
            "description": "obsolete value",
            "format": "double",
            "nullable": true
          },
          "fee": {
            "type": "number",
            "description": "fee",
            "format": "double",
            "nullable": true
          },
          "rateProfit": {
            "type": "number",
            "description": "profit conversion rate (from symbol profit currency to deposit currency)",
            "format": "double",
            "nullable": true
          },
          "rateMargin": {
            "type": "number",
            "description": "margin conversion rate (from symbol margin currency to deposit currency)",
            "format": "double",
            "nullable": true
          },
          "expertID": {
            "type": "integer",
            "description": "expert id (filled by expert advisor)",
            "format": "int64",
            "nullable": true
          },
          "positionID": {
            "type": "integer",
            "description": "position id",
            "format": "int64",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "deal comment",
            "nullable": true
          },
          "profitRaw": {
            "type": "number",
            "description": "deal profit in symbol's profit currency",
            "format": "double",
            "nullable": true
          },
          "pricePosition": {
            "type": "number",
            "description": "closed position  price",
            "format": "double",
            "nullable": true
          },
          "tickValue": {
            "type": "number",
            "description": "tick value",
            "format": "double",
            "nullable": true
          },
          "tickSize": {
            "type": "number",
            "description": "tick size",
            "format": "double",
            "nullable": true
          },
          "flags": {
            "type": "integer",
            "description": "flags",
            "format": "int64",
            "nullable": true
          },
          "timeMsc": {
            "type": "string",
            "description": "deal creation datetime in msc since 1970.01.01. If the value of this field is specified, the IMTDeal::Time value will be filled in automatically",
            "format": "date-time",
            "nullable": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DealReason"
              }
            ],
            "description": "DealReason",
            "nullable": true
          },
          "gateway": {
            "type": "string",
            "description": "source gateway name",
            "nullable": true
          },
          "priceGateway": {
            "type": "number",
            "description": "deal price on gateway",
            "format": "double",
            "nullable": true
          },
          "marketBid": {
            "type": "number",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            Get the market Bid price as at the time of deal execution by the server",
            "format": "double",
            "nullable": true
          },
          "marketAsk": {
            "type": "number",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            Get the market Ask price as at the time of deal execution by the server",
            "format": "double",
            "nullable": true
          },
          "marketLast": {
            "type": "number",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            Get the market Last price as at the time of deal execution by the server",
            "format": "double",
            "nullable": true
          },
          "modificationFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeModifyFlags"
              }
            ],
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            modification flags",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5DealListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT5Deal"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5Order": {
        "type": "object",
        "properties": {
          "order": {
            "type": "integer",
            "description": "order ticket",
            "format": "int64",
            "nullable": true
          },
          "externalID": {
            "type": "string",
            "description": "order ticket in external system (exchange, ECN, etc)",
            "nullable": true
          },
          "login": {
            "type": "integer",
            "description": "client login",
            "format": "int64",
            "nullable": true
          },
          "dealer": {
            "type": "integer",
            "description": "processed dealer login (0-means auto)",
            "format": "int64",
            "nullable": true
          },
          "partyID": {
            "type": "integer",
            "description": "counterparty identification",
            "format": "int64",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "description": "order symbol",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "price digits",
            "format": "int32",
            "nullable": true
          },
          "digitsCurrency": {
            "type": "integer",
            "description": "currency digits",
            "format": "int32",
            "nullable": true
          },
          "contractSize": {
            "type": "number",
            "description": "contract size",
            "format": "double",
            "nullable": true
          },
          "state": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderState"
              }
            ],
            "description": "OrderState",
            "nullable": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderReason"
              }
            ],
            "description": "OrderReason",
            "nullable": true
          },
          "timeSetup": {
            "type": "string",
            "description": "order setup time",
            "format": "date-time",
            "nullable": true
          },
          "timeExpiration": {
            "type": "string",
            "description": "order expiration",
            "format": "date-time",
            "nullable": true
          },
          "timeDone": {
            "type": "string",
            "description": "order filling/cancel time",
            "format": "date-time",
            "nullable": true
          },
          "type": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderType"
              }
            ],
            "description": "OrderType",
            "nullable": true
          },
          "typeFill": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderFilling"
              }
            ],
            "description": "OrderFilling",
            "nullable": true
          },
          "typeTime": {
            "allOf": [
              {
                "$ref": "#/components/schemas/OrderTime"
              }
            ],
            "description": "OrderTime",
            "nullable": true
          },
          "priceOrder": {
            "type": "number",
            "description": "order price",
            "format": "double",
            "nullable": true
          },
          "priceTrigger": {
            "type": "number",
            "description": "order trigger price (stop-limit price)",
            "format": "double",
            "nullable": true
          },
          "priceCurrent": {
            "type": "number",
            "description": "order current price",
            "format": "double",
            "nullable": true
          },
          "priceSL": {
            "type": "number",
            "description": "order SL",
            "format": "double",
            "nullable": true
          },
          "priceTP": {
            "type": "number",
            "description": "order TP",
            "format": "double",
            "nullable": true
          },
          "volumeInitial": {
            "type": "integer",
            "description": "order initial volume",
            "format": "int64",
            "nullable": true
          },
          "volumeCurrent": {
            "type": "integer",
            "description": "order current volume",
            "format": "int64",
            "nullable": true
          },
          "expertID": {
            "type": "integer",
            "description": "expert id (filled by expert advisor)",
            "format": "int64",
            "nullable": true
          },
          "positionID": {
            "type": "integer",
            "description": "position id",
            "format": "int64",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "order comment",
            "nullable": true
          },
          "activationMode": {
            "type": "integer",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            order activation state, time and price",
            "format": "int32",
            "nullable": true
          },
          "activationTime": {
            "type": "string",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "format": "date-time",
            "nullable": true
          },
          "activationPrice": {
            "type": "number",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />\r\n            Gets the price, at which the order was activated",
            "format": "double",
            "nullable": true
          },
          "activationFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeActivationFlags"
              }
            ],
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "nullable": true
          },
          "timeSetupMsc": {
            "type": "string",
            "description": "Gets and sets the order placing time in milliseconds, since 1970.01.01\r\n<br /><strong>If the value of this field is specified, the TimeSetup value will be filled in automatically.</strong>",
            "format": "date-time",
            "nullable": true
          },
          "timeDoneMsc": {
            "type": "string",
            "description": "Gets and sets the order execution time in milliseconds, since 1970.01.01\r\n<br /><strong>If the value of this field is specified, the TimeDone value will be filled in automatically.</strong>",
            "format": "date-time",
            "nullable": true
          },
          "rateMargin": {
            "type": "number",
            "description": "margin conversion rate (from symbol margin currency to deposit currency)",
            "format": "double",
            "nullable": true
          },
          "positionByID": {
            "type": "integer",
            "description": "position by id",
            "format": "int64",
            "nullable": true
          },
          "modificationFlags": {
            "type": "integer",
            "description": "modification flags",
            "format": "int32",
            "nullable": true
          },
          "volumeInitialExt": {
            "type": "integer",
            "description": "order initial volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "volumeCurrentExt": {
            "type": "integer",
            "description": "order current volume with extended accuracy",
            "format": "int64",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5OrderListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT5Order"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5Position": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "Gets the login of the client, to whom the trade position belongs",
            "format": "int64",
            "nullable": true
          },
          "symbol": {
            "type": "string",
            "description": "position symbol",
            "nullable": true
          },
          "action": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PositionActions"
              }
            ],
            "description": "PositionAction",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "price digits",
            "format": "int32",
            "nullable": true
          },
          "digitsCurrency": {
            "type": "integer",
            "description": "currency digits",
            "format": "int32",
            "nullable": true
          },
          "contractSize": {
            "type": "number",
            "description": "symbol contract size",
            "format": "double",
            "nullable": true
          },
          "position": {
            "type": "integer",
            "description": "position ticket",
            "format": "int64",
            "nullable": true
          },
          "externalId": {
            "type": "string",
            "description": "The ticket of a position in an external trading system",
            "nullable": true
          },
          "timeCreate": {
            "type": "string",
            "description": "position create time",
            "format": "date-time",
            "nullable": true
          },
          "timeUpdate": {
            "type": "string",
            "description": "position last update time",
            "format": "date-time",
            "nullable": true
          },
          "timeCreateMsc": {
            "type": "string",
            "description": "position create time in msc since 1970.01.01\r\n<br /><strong>If the value of this field is specified, the TimeCreate value will be filled in automatically.</strong>",
            "format": "date-time",
            "nullable": true
          },
          "timeUpdateMsc": {
            "type": "string",
            "description": "position last update time in msc since 1970.01.01\r\n<br /><strong>If the value of this field is specified, the TimeUpdate value will be filled in automatically.</strong>",
            "format": "date-time",
            "nullable": true
          },
          "priceOpen": {
            "type": "number",
            "description": "position weighted average open price",
            "format": "double",
            "nullable": true
          },
          "priceCurrent": {
            "type": "number",
            "description": "position current price",
            "format": "double",
            "nullable": true
          },
          "priceSL": {
            "type": "number",
            "description": "position SL price",
            "format": "double",
            "nullable": true
          },
          "priceTP": {
            "type": "number",
            "description": "position TP price",
            "format": "double",
            "nullable": true
          },
          "volume": {
            "type": "integer",
            "description": "position volume",
            "format": "int64",
            "nullable": true
          },
          "volumeExt": {
            "type": "integer",
            "description": "position volume",
            "format": "int64",
            "nullable": true
          },
          "profit": {
            "type": "number",
            "description": "position floating profit",
            "format": "double",
            "nullable": true
          },
          "storage": {
            "type": "number",
            "description": "position accumulated swaps",
            "format": "double",
            "nullable": true
          },
          "rateProfit": {
            "type": "number",
            "description": "profit conversion rate (from symbol profit currency to deposit currency)",
            "format": "double",
            "nullable": true
          },
          "rateMargin": {
            "type": "number",
            "description": "margin conversion rate (from symbol margin currency to deposit currency)",
            "format": "double",
            "nullable": true
          },
          "expertId": {
            "type": "integer",
            "description": "expert id (filled by expert advisor)",
            "format": "int64",
            "nullable": true
          },
          "expertPositionId": {
            "type": "integer",
            "description": "expert position id",
            "format": "int64",
            "nullable": true
          },
          "comment": {
            "maxLength": 32,
            "type": "string",
            "description": "",
            "nullable": true
          },
          "dealer": {
            "type": "integer",
            "description": "The login of a dealer, who has processed the order that opened the position. 0 means that the order was processed automatically by the server",
            "format": "int64",
            "nullable": true
          },
          "activationMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ActivationModes"
              }
            ],
            "description": "order activation state, time and price",
            "nullable": true
          },
          "activationTime": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "activationPrice": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "activationFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeActivationFlags"
              }
            ],
            "nullable": true
          },
          "modificationFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TradeModifyFlags"
              }
            ],
            "description": "modification flags",
            "nullable": true
          },
          "reason": {
            "allOf": [
              {
                "$ref": "#/components/schemas/PositionReasons"
              }
            ],
            "description": "position reason - PositionReason",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5PositionListApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MT5Position"
            },
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5Symbol": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "name",
            "nullable": true
          },
          "path": {
            "type": "string",
            "description": "hierarchical symbol path (including symbol name)",
            "nullable": true
          },
          "isin": {
            "type": "string",
            "description": "ISIN",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "local description",
            "nullable": true
          },
          "international": {
            "type": "string",
            "description": "internation description",
            "nullable": true
          },
          "basis": {
            "type": "string",
            "description": "basic symbol name",
            "nullable": true
          },
          "source": {
            "type": "string",
            "description": "source symbol name",
            "nullable": true
          },
          "page": {
            "type": "string",
            "description": "symbol specification page URL",
            "nullable": true
          },
          "currencyBase": {
            "type": "string",
            "description": "symbol base currency",
            "nullable": true
          },
          "currencyBaseDigits": {
            "type": "integer",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "format": "int32",
            "nullable": true
          },
          "currencyProfit": {
            "type": "string",
            "description": "symbol profit currency",
            "nullable": true
          },
          "currencyProfitDigits": {
            "type": "integer",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "format": "int32",
            "nullable": true
          },
          "currencyMargin": {
            "type": "string",
            "description": "symbol margin currency",
            "nullable": true
          },
          "currencyMarginDigits": {
            "type": "integer",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "format": "int32",
            "nullable": true
          },
          "color": {
            "type": "integer",
            "description": "symbol color",
            "format": "int32",
            "nullable": true
          },
          "colorBackground": {
            "type": "integer",
            "description": "symbol background color",
            "format": "int32",
            "nullable": true
          },
          "digits": {
            "type": "integer",
            "description": "symbol digits",
            "format": "int32",
            "nullable": true
          },
          "point": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "multiply": {
            "type": "number",
            "description": "<strong>Has No Setter In ManagerAPI, so all you can is to read this value.</strong>\r\n<br />\r\n<br />",
            "format": "double",
            "nullable": true
          },
          "tickFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnTickFlags"
              }
            ],
            "description": "EnTickFlags",
            "nullable": true
          },
          "tickBookDepth": {
            "type": "integer",
            "description": "Depth of Market depth (both legs)",
            "format": "int32",
            "nullable": true
          },
          "filterSoft": {
            "type": "integer",
            "description": "filtration soft level",
            "format": "int32",
            "nullable": true
          },
          "filterSoftTicks": {
            "type": "integer",
            "description": "filtration soft level counter",
            "format": "int32",
            "nullable": true
          },
          "filterHard": {
            "type": "integer",
            "description": "filtration hard level",
            "format": "int32",
            "nullable": true
          },
          "filterHardTicks": {
            "type": "integer",
            "description": "filtration hard level counter",
            "format": "int32",
            "nullable": true
          },
          "filterDiscard": {
            "type": "integer",
            "description": "filtration discard level",
            "format": "int32",
            "nullable": true
          },
          "filterSpreadMax": {
            "type": "integer",
            "description": "spread max value",
            "format": "int32",
            "nullable": true
          },
          "filterSpreadMin": {
            "type": "integer",
            "description": "spread min value",
            "format": "int32",
            "nullable": true
          },
          "tradeMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnTradeMode"
              }
            ],
            "description": "EnTradeMode",
            "nullable": true
          },
          "calcMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnCalcMode"
              }
            ],
            "description": "EnCalcMode",
            "nullable": true
          },
          "execMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnExecutionMode"
              }
            ],
            "description": "EnExecutionMode",
            "nullable": true
          },
          "gtcMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnGtcMode"
              }
            ],
            "description": "EnGTCMode",
            "nullable": true
          },
          "fillFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnFillingFlags"
              }
            ],
            "description": "EnFillingFlags",
            "nullable": true
          },
          "expirFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnExpirationFlags"
              }
            ],
            "description": "EnExpirationFlags",
            "nullable": true
          },
          "spread": {
            "type": "integer",
            "description": "symbol spread (0-floating)",
            "format": "int32",
            "nullable": true
          },
          "spreadBalance": {
            "type": "integer",
            "description": "spread balance",
            "format": "int32",
            "nullable": true
          },
          "spreadDiff": {
            "type": "integer",
            "description": "spread difference",
            "format": "int32",
            "nullable": true
          },
          "spreadDiffBalance": {
            "type": "integer",
            "description": "spread difference balance",
            "format": "int32",
            "nullable": true
          },
          "tickValue": {
            "type": "number",
            "description": "tick value",
            "format": "double",
            "nullable": true
          },
          "tickSize": {
            "type": "number",
            "description": "tick size",
            "format": "double",
            "nullable": true
          },
          "contractSize": {
            "type": "number",
            "description": "contract size",
            "format": "double",
            "nullable": true
          },
          "stopsLevel": {
            "type": "integer",
            "description": "stops level",
            "format": "int32",
            "nullable": true
          },
          "freezeLevel": {
            "type": "integer",
            "description": "freeze level",
            "format": "int32",
            "nullable": true
          },
          "quotesTimeout": {
            "type": "integer",
            "description": "The time to wait for quotes in seconds, after which trading is automatically disabled for the symbol.",
            "format": "int32",
            "nullable": true
          },
          "volumeMin": {
            "type": "integer",
            "description": "minimal volume",
            "format": "int64",
            "nullable": true
          },
          "volumeMax": {
            "type": "integer",
            "description": "maximal volume",
            "format": "int64",
            "nullable": true
          },
          "volumeStep": {
            "type": "integer",
            "description": "volume step",
            "format": "int64",
            "nullable": true
          },
          "volumeLimit": {
            "type": "integer",
            "description": "cumulative positions and orders limit",
            "format": "int64",
            "nullable": true
          },
          "marginFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnMarginFlags"
              }
            ],
            "description": "EnMarginFlags",
            "nullable": true
          },
          "marginInitial": {
            "type": "number",
            "description": "initial margin",
            "format": "double",
            "nullable": true
          },
          "marginMaintenance": {
            "type": "number",
            "description": "maintenance margin",
            "format": "double",
            "nullable": true
          },
          "marginLong": {
            "type": "number",
            "description": "long orders and positions margin rate",
            "format": "double",
            "nullable": true
          },
          "marginShort": {
            "type": "number",
            "description": "short orders and positions margin rate",
            "format": "double",
            "nullable": true
          },
          "marginLimit": {
            "type": "number",
            "description": "limit orders and positions margin rate",
            "format": "double",
            "nullable": true
          },
          "marginStop": {
            "type": "number",
            "description": "stop orders and positions margin rate",
            "format": "double",
            "nullable": true
          },
          "marginStopLimit": {
            "type": "number",
            "description": "stop-limit orders and positions margin rate",
            "format": "double",
            "nullable": true
          },
          "swapMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSwapMode"
              }
            ],
            "description": "EnSwapMode",
            "nullable": true
          },
          "swapLong": {
            "type": "number",
            "description": "long positions swaps rate",
            "format": "double",
            "nullable": true
          },
          "swapShort": {
            "type": "number",
            "description": "short positions swaps rate",
            "format": "double",
            "nullable": true
          },
          "swap3Day": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSwapDays"
              }
            ],
            "description": "3 time swaps day, EnSwapDay",
            "nullable": true
          },
          "timeStart": {
            "type": "string",
            "description": "trade start date",
            "format": "date-time",
            "nullable": true
          },
          "timeExpiration": {
            "type": "string",
            "description": "The date of trading expiration for a symbol.<br />\r\nIt is considered that there is no time limitation for trading by a symbol if both IMTConSymbol::TimeStart and IMTConSymbol::TimeExpiration are equal to 0.",
            "format": "date-time",
            "nullable": true
          },
          "sessionQuote": {
            "maxItems": 7,
            "minItems": 7,
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/MT5SymbolSession"
              }
            },
            "description": "<strong>Not yet implemented. Contact us for further information</strong>\r\n<br />\r\n<br />\r\n            Update a quoting session of a symbol by the day and index. The day is specified by a value 0 (Sunday) to 6 (Saturday).",
            "nullable": true
          },
          "sessionTrade": {
            "maxItems": 7,
            "minItems": 7,
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/MT5SymbolSession"
              }
            },
            "description": "<strong>Not yet implemented. Contact us for further information</strong>\r\n<br />\r\n<br />",
            "nullable": true
          },
          "reFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnRequestFlags"
              }
            ],
            "description": "request execution flags",
            "nullable": true
          },
          "reTimeout": {
            "type": "integer",
            "description": "Time in seconds during which the price issued by a dealer in the request execution mode is valid.",
            "format": "int32",
            "nullable": true
          },
          "ieCheckMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnInstantMode"
              }
            ],
            "description": "instant execution check mode",
            "nullable": true
          },
          "ieTimeout": {
            "type": "integer",
            "description": "Get and set the maximum allowed difference between the time of arrival of the price, at which the client places an order, and the time of the last price.",
            "format": "int32",
            "nullable": true
          },
          "ieSlipProfit": {
            "type": "integer",
            "description": "instant execution profit slippage",
            "format": "int32",
            "nullable": true
          },
          "ieSlipLosing": {
            "type": "integer",
            "description": "instant execution losing slippage",
            "format": "int32",
            "nullable": true
          },
          "ieVolumeMax": {
            "type": "integer",
            "description": "instant execution max volume",
            "format": "int64",
            "nullable": true
          },
          "priceSettle": {
            "type": "number",
            "description": "settle price (for futures)",
            "format": "double",
            "nullable": true
          },
          "priceLimitMax": {
            "type": "number",
            "description": "price limit max (for futures)",
            "format": "double",
            "nullable": true
          },
          "priceLimitMin": {
            "type": "number",
            "description": "price limit min (for futures)",
            "format": "double",
            "nullable": true
          },
          "tradeFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnTradeFlags"
              }
            ],
            "description": "EnTradeFlags",
            "nullable": true
          },
          "orderFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnOrderFlags"
              }
            ],
            "description": "EnOrderFlags",
            "nullable": true
          },
          "marginRateInitial": {
            "type": "object",
            "properties": {
              "Buy": {
                "type": "number",
                "format": "double"
              },
              "Sell": {
                "type": "number",
                "format": "double"
              },
              "BuyLimit": {
                "type": "number",
                "format": "double"
              },
              "SellLimit": {
                "type": "number",
                "format": "double"
              },
              "BuyStop": {
                "type": "number",
                "format": "double"
              },
              "SellStop": {
                "type": "number",
                "format": "double"
              },
              "BuyStopLimit": {
                "type": "number",
                "format": "double"
              },
              "SellStopLimit": {
                "type": "number",
                "format": "double"
              }
            },
            "additionalProperties": false,
            "description": "orders and positions margin rates",
            "nullable": true
          },
          "marginRateMaintenance": {
            "type": "object",
            "properties": {
              "Buy": {
                "type": "number",
                "format": "double"
              },
              "Sell": {
                "type": "number",
                "format": "double"
              },
              "BuyLimit": {
                "type": "number",
                "format": "double"
              },
              "SellLimit": {
                "type": "number",
                "format": "double"
              },
              "BuyStop": {
                "type": "number",
                "format": "double"
              },
              "SellStop": {
                "type": "number",
                "format": "double"
              },
              "BuyStopLimit": {
                "type": "number",
                "format": "double"
              },
              "SellStopLimit": {
                "type": "number",
                "format": "double"
              }
            },
            "additionalProperties": false,
            "description": "orders and positions margin rates",
            "nullable": true
          },
          "optionsMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnOptionMode"
              }
            ],
            "description": "options mode EnOptionMode",
            "nullable": true
          },
          "priceStrike": {
            "type": "number",
            "description": "option strike price value",
            "format": "double",
            "nullable": true
          },
          "marginRateLiquidity": {
            "type": "number",
            "description": "liquidity rate",
            "format": "double",
            "nullable": true
          },
          "faceValue": {
            "type": "number",
            "description": "bond face value",
            "format": "double",
            "nullable": true
          },
          "accruedInterest": {
            "type": "number",
            "description": "bond accrued interest",
            "format": "double",
            "nullable": true
          },
          "spliceType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSpliceType"
              }
            ],
            "description": "futures splice type EnSpliceType",
            "nullable": true
          },
          "spliceTimeType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSpliceTimeType"
              }
            ],
            "description": "futures splice time type EnSpliceType",
            "nullable": true
          },
          "spliceTimeDays": {
            "type": "integer",
            "description": "The splicing shift as a number of days to the past from the symbol's expiration date IMTConSymbol::TimeExpiration",
            "format": "int32",
            "nullable": true
          },
          "marginHedged": {
            "type": "number",
            "description": "hedged positions margin rate",
            "format": "double",
            "nullable": true
          },
          "marginRateCurrency": {
            "type": "number",
            "description": "currency rate",
            "format": "double",
            "nullable": true
          },
          "filterGap": {
            "type": "integer",
            "description": "gap level",
            "format": "int32",
            "nullable": true
          },
          "filterGapTicks": {
            "type": "integer",
            "description": "gap level ticks",
            "format": "int32",
            "nullable": true
          },
          "chartMode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnChartMode"
              }
            ],
            "description": "chart mode",
            "nullable": true
          },
          "ieFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnInstantFlags"
              }
            ],
            "description": "instant execution flags with extended accuracy",
            "nullable": true
          },
          "volumeMinExt": {
            "type": "integer",
            "description": "minimal volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "volumeMaxExt": {
            "type": "integer",
            "description": "maximal volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "volumeStepExt": {
            "type": "integer",
            "description": "volume step with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "volumeLimitExt": {
            "type": "integer",
            "description": "cumulative positions and orders limit with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "ieVolumeMaxExt": {
            "type": "integer",
            "description": "instant execution max volume with extended accuracy",
            "format": "int64",
            "nullable": true
          },
          "category": {
            "type": "string",
            "description": "category",
            "nullable": true
          },
          "exchange": {
            "type": "string",
            "description": "exchange",
            "nullable": true
          },
          "cfi": {
            "type": "string",
            "description": "CFI",
            "nullable": true
          },
          "sector": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSectors"
              }
            ],
            "description": "Sector",
            "nullable": true
          },
          "industry": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnIndustries"
              }
            ],
            "description": "Industry",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country - ISO 3166-1 alpha-3 code",
            "nullable": true
          },
          "subscriptionsDelay": {
            "type": "integer",
            "description": "Delay for subscriptions",
            "format": "int32",
            "nullable": true
          },
          "swapYearDays": {
            "type": "integer",
            "description": "Days in year",
            "format": "int32",
            "nullable": true
          },
          "swapFlags": {
            "allOf": [
              {
                "$ref": "#/components/schemas/EnSwapFlags"
              }
            ],
            "description": "swap flags",
            "nullable": true
          },
          "swapRateSunday": {
            "type": "number",
            "description": "swap rate for Sunday",
            "format": "double",
            "nullable": true
          },
          "swapRateMonday": {
            "type": "number",
            "description": "swap rate for Monday",
            "format": "double",
            "nullable": true
          },
          "swapRateTuesday": {
            "type": "number",
            "description": "swap rate for Tuesday",
            "format": "double",
            "nullable": true
          },
          "swapRateWednesday": {
            "type": "number",
            "description": "swap rate for Wednesday",
            "format": "double",
            "nullable": true
          },
          "swapRateThursday": {
            "type": "number",
            "description": "swap rate for Thursday",
            "format": "double",
            "nullable": true
          },
          "swapRateFriday": {
            "type": "number",
            "description": "swap rate for Friday",
            "format": "double",
            "nullable": true
          },
          "swapRateSaturday": {
            "type": "number",
            "description": "swap rate for Saturday",
            "format": "double",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5SymbolApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT5Symbol"
              }
            ],
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5SymbolSession": {
        "type": "object",
        "properties": {
          "open": {
            "type": "integer",
            "description": "The session opening time in minutes from 00:00. For example, 100 denotes 01:40.",
            "format": "int32",
            "nullable": true
          },
          "openHours": {
            "type": "integer",
            "description": "Get the number of hours in the opening time of trading or quoting session of a symbol.",
            "format": "int32",
            "nullable": true
          },
          "openMinutes": {
            "type": "integer",
            "description": "The number of minutes in the opening time of trading or quoting session of a symbol.",
            "format": "int32",
            "nullable": true
          },
          "close": {
            "type": "integer",
            "description": "The session closing time in minutes from 00:00. For example, 100 denotes 01:40.",
            "format": "int32",
            "nullable": true
          },
          "closeHours": {
            "type": "integer",
            "description": "The number of hours in the closing time of trading or quoting session of a symbol.",
            "format": "int32",
            "nullable": true
          },
          "closeMinutes": {
            "type": "integer",
            "description": "The number of minutes in the closing time of trading or quoting session of a symbol.",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MT5Time": {
        "type": "object",
        "properties": {
          "timeZone": {
            "type": "integer",
            "description": "Server time zone, minutes from GMT (0 = GMT, 60 = GMT+1).",
            "format": "int32"
          },
          "timeServer": {
            "type": "string",
            "description": "Time synchronization server address (TIME/NTP).",
            "nullable": true
          },
          "daylight": {
            "type": "boolean",
            "description": "Daylight saving time mode enabled."
          },
          "daylightState": {
            "type": "integer",
            "description": "Daylight saving state (0 = no DST in zone, non-zero otherwise).",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Server time configuration (MT5 CIMTConTime), v2 read DTO."
      },
      "MT5TimeApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT5Time"
              }
            ],
            "description": "Server time configuration (MT5 CIMTConTime), v2 read DTO.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MT5User": {
        "type": "object",
        "properties": {
          "login": {
            "type": "integer",
            "description": "User login (identity, read-only).",
            "format": "int64"
          },
          "group": {
            "type": "string",
            "description": "User group name.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Full display name of the account holder.",
            "nullable": true
          },
          "company": {
            "type": "string",
            "description": "Company or organisation name.",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Client country.",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "Client city.",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "Client state or province.",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Client postal code.",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "description": "Client phone number.",
            "nullable": true
          },
          "eMail": {
            "type": "string",
            "description": "Client email address.",
            "nullable": true
          },
          "comment": {
            "type": "string",
            "description": "Internal comment on the account.",
            "nullable": true
          },
          "color": {
            "type": "integer",
            "description": "Colour tag assigned to the account in MT5 Manager (ARGB uint).",
            "format": "int32"
          },
          "leverage": {
            "type": "integer",
            "description": "Account leverage (e.g. 100 = 1:100).",
            "format": "int32"
          },
          "account": {
            "type": "string",
            "description": "Account ID string (external account identifier).",
            "nullable": true
          },
          "language": {
            "type": "integer",
            "description": "Client language code (MT5 locale uint).",
            "format": "int32"
          },
          "address": {
            "type": "string",
            "description": "Client postal/physical address.",
            "nullable": true
          },
          "id": {
            "type": "string",
            "description": "Client document ID (passport, national ID, etc.).",
            "nullable": true
          },
          "status": {
            "type": "string",
            "description": "Client KYC / account status label.",
            "nullable": true
          },
          "agent": {
            "type": "integer",
            "description": "Introducing agent login.",
            "format": "int64"
          },
          "leadCampaign": {
            "type": "string",
            "description": "Marketing lead campaign name.",
            "nullable": true
          },
          "leadSource": {
            "type": "string",
            "description": "Marketing lead source name.",
            "nullable": true
          },
          "clientID": {
            "type": "integer",
            "description": "External CRM client ID.",
            "format": "int64"
          },
          "firstName": {
            "type": "string",
            "description": "Given name (first name).",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "description": "Family name (last name).",
            "nullable": true
          },
          "middleName": {
            "type": "string",
            "description": "Patronymic / middle name.",
            "nullable": true
          },
          "rights": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UsersRights"
              }
            ],
            "description": "Account permission flags: names of the set bits, `\"Enabled, Password\"` (the UsersRights schema)."
          },
          "certSerialNumber": {
            "type": "integer",
            "description": "SSL certificate serial number (read-only).",
            "format": "int64"
          },
          "registration": {
            "type": "string",
            "description": "Account registration timestamp (UTC). Null when not set (unix 0).",
            "format": "date-time",
            "nullable": true
          },
          "lastAccess": {
            "type": "string",
            "description": "Last login timestamp (UTC). Null when not set.",
            "format": "date-time",
            "nullable": true
          },
          "lastPassChange": {
            "type": "string",
            "description": "Last password change timestamp (UTC). Null when not set.",
            "format": "date-time",
            "nullable": true
          },
          "lastIP": {
            "type": "string",
            "description": "Last known client IP address.",
            "nullable": true
          },
          "balance": {
            "type": "number",
            "description": "Current account balance.",
            "format": "double"
          },
          "credit": {
            "type": "number",
            "description": "Current credit facility amount.",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "description": "Annual interest rate on credit.",
            "format": "double"
          },
          "commissionDaily": {
            "type": "number",
            "description": "Accumulated commission for the current day.",
            "format": "double"
          },
          "commissionMonthly": {
            "type": "number",
            "description": "Accumulated commission for the current month.",
            "format": "double"
          },
          "commissionAgentDaily": {
            "type": "number",
            "description": "Agent commission accrued today.",
            "format": "double"
          },
          "commissionAgentMonthly": {
            "type": "number",
            "description": "Agent commission accrued this month.",
            "format": "double"
          },
          "balancePrevDay": {
            "type": "number",
            "description": "Balance at end of previous trading day.",
            "format": "double"
          },
          "balancePrevMonth": {
            "type": "number",
            "description": "Balance at end of previous calendar month.",
            "format": "double"
          },
          "equityPrevDay": {
            "type": "number",
            "description": "Equity at end of previous trading day.",
            "format": "double"
          },
          "equityPrevMonth": {
            "type": "number",
            "description": "Equity at end of previous calendar month.",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "MT5 user, v2 read DTO — full field set (A4 expansion). Includes all editable\r\n            fields mirrored from MT5UserUpdate plus read-only financial/metadata fields.\r\n            `Rights` is a flags string: the names of the set bits, `\"Enabled, Password\"`."
      },
      "MT5UserApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MT5User"
              }
            ],
            "description": "MT5 user, v2 read DTO — full field set (A4 expansion). Includes all editable\r\n            fields mirrored from MT5UserUpdate plus read-only financial/metadata fields.\r\n            `Rights` is a flags string: the names of the set bits, `\"Enabled, Password\"`.",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "MarginCalculationMode": {
        "enum": [
          "Forex",
          "CFD",
          "Futures",
          "CFDIndex",
          "CFDLeverage"
        ],
        "type": "string"
      },
      "MarginControllingType": {
        "enum": [
          "Percent",
          "Currency"
        ],
        "type": "string"
      },
      "MarginLevelType": {
        "enum": [
          "Ok",
          "MarginCall",
          "StopOut"
        ],
        "type": "string"
      },
      "MarginMode": {
        "enum": [
          "DontUse",
          "UseAll",
          "UseProfit",
          "UseLoss"
        ],
        "type": "string"
      },
      "NewsMode": {
        "enum": [
          "No",
          "Topics",
          "Full"
        ],
        "type": "string"
      },
      "OTPMode": {
        "enum": [
          "Disabled",
          "TOTP_SHA256"
        ],
        "type": "string"
      },
      "OrderFilling": {
        "enum": [
          "FoK",
          "IoC",
          "Return",
          "BoC"
        ],
        "type": "string"
      },
      "OrderReason": {
        "enum": [
          "Client",
          "Expert",
          "Dealer",
          "SL",
          "TP",
          "SO",
          "Rollover",
          "ExternalClient",
          "VMargin",
          "Gateway",
          "Signal",
          "Settlement",
          "Transfer",
          "Sync",
          "ExternalService",
          "Migration",
          "Mobile",
          "Web",
          "Split",
          "CorporateAction"
        ],
        "type": "string"
      },
      "OrderState": {
        "enum": [
          "Started",
          "Placed",
          "Canceled",
          "Partial",
          "Filled",
          "Rejected",
          "Expired",
          "RequestAdd",
          "RequestModify",
          "RequestCancel"
        ],
        "type": "string"
      },
      "OrderTime": {
        "enum": [
          "GtC",
          "Day",
          "Specified",
          "SpecifiedDay"
        ],
        "type": "string"
      },
      "OrderType": {
        "enum": [
          "Buy",
          "Sell",
          "BuyLimit",
          "SellLimit",
          "BuyStop",
          "SellStop",
          "BuyStopLimit",
          "SellStopLimit",
          "CloseBy"
        ],
        "type": "string"
      },
      "PagingMeta": {
        "type": "object",
        "properties": {
          "nextCursor": {
            "type": "string",
            "description": "Opaque token for the next page; pass it back as ?cursor=. Null when there are no more items.",
            "nullable": true
          },
          "hasMore": {
            "type": "boolean",
            "description": "True if more items are available; explicit boolean form of NextCursor != null."
          }
        },
        "additionalProperties": false,
        "description": "Paging metadata returned alongside a list-shaped payload.\r\n`NextCursor` is an opaque base64 string the client passes back as\r\n`?cursor=` to fetch the next page; null when there are no more items.\r\n`HasMore` is the explicit boolean form of the same signal so clients\r\ncan avoid string-null checks."
      },
      "PositionActions": {
        "enum": [
          "Buy",
          "Sell"
        ],
        "type": "string",
        "description": "PositionReason"
      },
      "PositionReasons": {
        "enum": [
          "Client",
          "Expert",
          "Dealer",
          "SL",
          "TP",
          "SO",
          "Rollover",
          "ExternalClient",
          "VMargin",
          "Gateway",
          "Signal",
          "Settlement",
          "Transfer",
          "Sync",
          "ExternalService",
          "Migration",
          "Mobile",
          "Web",
          "Split",
          "CorporateAction"
        ],
        "type": "string"
      },
      "ProfitCalculationMode": {
        "enum": [
          "Forex",
          "CFD",
          "Futures"
        ],
        "type": "string"
      },
      "RequestMode": {
        "enum": [
          "RangeIn",
          "RangeOut",
          "RangeLast",
          "RangeInExcludeOutOfRage"
        ],
        "type": "string"
      },
      "ResultCode": {
        "enum": [
          "Ok",
          "OkNone",
          "Error",
          "InvalidData",
          "TechProblem",
          "OldVersion",
          "NoConnect",
          "NotEnoughRights",
          "TooFrequent",
          "Malfunction",
          "GenerateKey",
          "SecuritySession",
          "InvalidCompany",
          "AccountDisabled",
          "BadAccountInfo",
          "PublicKeyMissing",
          "TradeTimeout",
          "TradeBadPrices",
          "TradeBadStops",
          "TradeBadVolume",
          "TradeMarketClosed",
          "TradeDisable",
          "TradeNoMoney",
          "TradePriceChanged",
          "TradeOffquotes",
          "TradeBrokerBusy",
          "TradeRequote",
          "TradeOrderLocked",
          "TradeLongOnly",
          "TradeTooManyReq",
          "TradeAccepted",
          "TradeProcess",
          "TradeUserCancel",
          "TradeModifyDenied",
          "TradeContextBusy",
          "TradeExpirationDenied",
          "TradeTooManyOrders",
          "TradeHedgeProhibited",
          "TradeProhibitedByFIFO",
          "UnhandledException"
        ],
        "type": "string"
      },
      "ServerRole": {
        "enum": [
          "StandAlone",
          "Master",
          "Slave"
        ],
        "type": "string"
      },
      "StringApiResponse": {
        "type": "object",
        "properties": {
          "data": {
            "type": "string",
            "nullable": true
          },
          "error": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiError"
              }
            ],
            "description": "v2 error body. Code is the stable transport error code; ManagerCode is the raw MT4\r\nResultCode (serialized as a string for a known enum member, or as a number for an\r\nunrecognised value returned by MT4); Message is a human-readable description.",
            "nullable": true
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/ApiMeta"
              }
            ],
            "description": "Response metadata. ActivityId is the W3C trace-id for correlation in Seq/SigNoz.\r\nPaging is present only on paginated list responses; otherwise it is omitted —\r\nthe global JSON context policy serialises null fields, so we override that here\r\nwith System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Unified v2 response envelope: data is the payload (null on error); error is the\r\nerror object (null on success, always serialised); meta contains response metadata\r\n(activityId and optional paging). HTTP status is always 200."
      },
      "SwapType": {
        "enum": [
          "Points",
          "Dollars",
          "Interest",
          "MarginCurrency"
        ],
        "type": "string"
      },
      "SymbolExecMode": {
        "enum": [
          "Request",
          "Instant",
          "Market"
        ],
        "type": "string"
      },
      "SymbolPriceDirection": {
        "enum": [
          "Up",
          "Down",
          "None"
        ],
        "type": "string"
      },
      "SynchronizationMode": {
        "enum": [
          "Add",
          "Update",
          "Insert",
          "Delete",
          "Last"
        ],
        "type": "string"
      },
      "TickRequestFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"Raw, Normal\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Raw = 0x1, Normal = 0x2. Accepted on input, never written: All = Raw, Normal.",
        "example": "Raw, Normal",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Raw",
          "Normal"
        ],
        "x-enum-values": [
          0,
          1,
          2
        ]
      },
      "TradeActivationFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "Flags: names of the set bits joined by \", \" (\"NoLimit, NoStop\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: NoLimit = 0x1, NoStop = 0x2, NoSLimit = 0x4, NoSL = 0x8, NoTP = 0x10, NoSO = 0x20, NoExpiration = 0x40. Accepted on input, never written: All = NoLimit, NoStop, NoSLimit, NoSL, NoTP, NoSO, NoExpiration.",
        "example": "NoLimit, NoStop",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "NoLimit",
          "NoStop",
          "NoSLimit",
          "NoSL",
          "NoTP",
          "NoSO",
          "NoExpiration"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64
        ]
      },
      "TradeCommand": {
        "enum": [
          "Buy",
          "Sell",
          "BuyLimit",
          "SellLimit",
          "BuyStop",
          "SellStop",
          "Balance",
          "Credit"
        ],
        "type": "string"
      },
      "TradeMode": {
        "enum": [
          "No",
          "Close",
          "Full"
        ],
        "type": "string"
      },
      "TradeModifyFlags": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "also used for Deal,Order,Position<br/>Flags: names of the set bits joined by \", \" (\"Admin, Manager\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Admin = 0x1, Manager = 0x2, Position = 0x4, Restore = 0x8, ApiAdmin = 0x10, ApiManager = 0x20, ApiServer = 0x40, ApiGateway = 0x80. Accepted on input, never written: All = Admin, Manager, Position, Restore, ApiAdmin, ApiManager, ApiServer, ApiGateway.",
        "example": "Admin, Manager",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Admin",
          "Manager",
          "Position",
          "Restore",
          "ApiAdmin",
          "ApiManager",
          "ApiServer",
          "ApiGateway"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128
        ]
      },
      "TradeRecordReason": {
        "enum": [
          "Client",
          "Expert",
          "Dealer",
          "Signal",
          "Gateway",
          "Mobile",
          "Web",
          "API"
        ],
        "type": "string"
      },
      "TradeRecordState": {
        "enum": [
          "OpenNormal",
          "OpenRemand",
          "OpenRestored",
          "ClosedNormal",
          "ClosedPart",
          "ClosedBy",
          "Deleted"
        ],
        "type": "string"
      },
      "UsersRights": {
        "pattern": "^[A-Za-z][A-Za-z0-9]*(, [A-Za-z][A-Za-z0-9]*)*$",
        "type": "string",
        "description": "MT5 user permission flags. Values mirror CIMTUser.EnUsersRights.<br/>Flags: names of the set bits joined by \", \" (\"Enabled, Password\"), \"None\" when none is set; a set bit without a name is \"Bit<n>\" (bit number). Bits: Enabled = 0x1, Password = 0x2, TradeDisabled = 0x4, Investor = 0x8, Confirmed = 0x10, Trailing = 0x20, Expert = 0x40, Obsolete = 0x80, Reports = 0x100, Readonly = 0x200, ResetPass = 0x400, OTPEnabled = 0x800, SponsoredHosting = 0x2000, APIEnabled = 0x4000, PushNotification = 0x8000, Technical = 0x10000, ExcludeReports = 0x20000.",
        "example": "Enabled, Password",
        "x-enumFlags": true,
        "x-enum-varnames": [
          "None",
          "Enabled",
          "Password",
          "TradeDisabled",
          "Investor",
          "Confirmed",
          "Trailing",
          "Expert",
          "Obsolete",
          "Reports",
          "Readonly",
          "ResetPass",
          "OTPEnabled",
          "SponsoredHosting",
          "APIEnabled",
          "PushNotification",
          "Technical",
          "ExcludeReports"
        ],
        "x-enum-values": [
          0,
          1,
          2,
          4,
          8,
          16,
          32,
          64,
          128,
          256,
          512,
          1024,
          2048,
          8192,
          16384,
          32768,
          65536,
          131072
        ]
      },
      "WatchdogFailoverMode": {
        "enum": [
          "Off",
          "Most",
          "Full"
        ],
        "type": "string"
      },
      "WatchdogState": {
        "enum": [
          "Disconnected",
          "Synchronizing",
          "Synchronized"
        ],
        "type": "string"
      },
      "WebApiErrorCode": {
        "enum": [
          "Ok",
          "NoConnect",
          "Validation",
          "MT4Error",
          "Forbidden",
          "NotFound",
          "MT5Error",
          "Timeout",
          "OutcomeUnknown",
          "Busy",
          "Internal"
        ],
        "type": "string",
        "description": "Transport-level error classification for v2 responses. Stable across MT4\r\nwrapper versions — clients can branch on this without knowing MT-specific\r\ncodes. When ErrorCode == MT4Error, see ManagerCode for the underlying\r\nMT4 ResultCode value."
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. \r\n\r\nEnter 'Bearer' [space] and then your token in the text input below.\r\n\r\nExample: \"Bearer 12345abcdef\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ],
  "tags": [
    {
      "name": "MT4ControllerV",
      "description": "MT4 Manager API v2 — clean envelope, structured errors, Idempotency-Key\r\nheader support, cache-hit billing exemption, path-based versioning.\r\nSee history.md for the customer-facing migration guide."
    },
    {
      "name": "MT5ControllerV",
      "description": "MT5 Manager API v2 — clean envelope, structured errors, Idempotency-Key\r\nheader support, cache-hit billing exemption, path-based versioning.\r\nSee history.md for the customer-facing migration guide."
    }
  ]
}