{
  "openapi": "3.0.1",
  "info": {
    "title": "MetaTrader API (MT4 + MT5)",
    "version": "1.0.0",
    "description": "REST + WebSocket API for any MT4/MT5 account.\n\n**Auth:** send your account API key as the `x-api-key` header, and the account's UUID as `?id=`. Both come from your dashboard after you connect an account. Keys can be **read-only** and/or **scoped to a single account** (mint via `POST /v1/seats/:id/keys` with `readOnly`/`accountScoped`) so you can hand a client direct websocket access to one account with no trading rights.\n\n**WebSocket:** `wss://<host>/v1/stream?apiKey=<key>&id=<uuid>`; send `{\"action\":\"subscribe\",\"symbol\":\"EURUSD\"}` per symbol to receive quotes. Add `\"timeframe\":\"M1\"` (or `\"timeframes\":[\"M1\",\"H1\"]`) to that message to also receive live **CANDLE** frames `{type:\"CANDLE\",data:{symbol,timeframe,time,open,high,low,close,ticks,closed,partial}}` built from the tick feed (bid); `time` is the bar's open time in unix seconds on the broker server's clock; `closed:true` marks a finished bar. Streams live quotes as `{\"type\":\"QUOTE\",...}`, position changes as `{\"type\":\"POSITIONS\",...}`, pending-order changes as `{\"type\":\"ORDERS\",...}` (both full snapshots; one is also sent right after you connect, marked `\"snapshot\":true`), and every deal execution as `{\"type\":\"TRADE\",...}` carrying full economics (magic/expertId, comment, commission, swap, profit, and the `position` it belongs to). TRADE frames are built from the same source as REST OrderHistory, so they never disagree. Every 10 s a `{\"type\":\"HEARTBEAT\",...}` frame reports `connection` (connected/reconnecting/connecting -- the last only before the first connect) and, per subscribed symbol, `lastTickTimeMsc` + `lastQuoteAgeMs` -- a quiet market shows `connected` with a growing age, interrupted delivery shows `reconnecting`. Opt out with `?heartbeat=0`.\n\n**Timestamps:** the classic REST endpoints (`/OrderSend`, `/OpenedOrders`, `/OrderHistory`, `/GetQuote`, …) return UTC; `/v1/*` routes return the broker's server time. On the stream, `time`/`timeMsc` keep the broker's server time (unchanged, for existing clients) and every frame also carries UTC: QUOTE `timeUtc` + `timeMscUtc`, TRADE `timeUtc`, ORDERS `timeSetupUtc`, HEARTBEAT `lastTickTimeMscUtc`. Prefer the UTC fields.\n\n**Symbol & account fields:** `/SymbolParams` returns, inside `symbolInfo`, `stopsLevel` (minimum SL/TP distance from the current price, in points; `limitPoints` carries the same value) and `freezeLevel` (points within which an order can no longer be modified). `/AccountSummary` returns `synced`: `true` while the API connection is live at the broker, `false` means the values are the last known ones (reconnecting).\n\n**Read-after-write:** trade endpoints (`/OrderSend`, `/OrderClose`, `/OrderModify`, `/OrderDelete`) return the order (ticket + state) in their response — use `state` as your ack; for the authoritative open time and price read `/OpenedOrders`. If you do read `/OrderHistory` immediately after a trade, allow a brief (~250ms) settle window and retry once if empty.\n\n**Safe retries (clientOrderId):** add `clientOrderId=<your unique id>` (1-64 chars `A-Z a-z 0-9 _ . : -`, or the `Idempotency-Key` header) to `/OrderSend`. If your connection drops and you retry with the same id, you get the ORIGINAL result (header `Idempotent-Replay: true`) and no second order is sent. Ids are per account and kept 24 h. If the first attempt timed out after it was sent, a retry answers `409 IDEMPOTENCY_UNCERTAIN` instead of guessing -- check `/OpenedOrders` for your magic number, then use a new id. A broker rejection is a final result too: the same id returns the same rejection, so send a corrected or repeated order with a NEW id. Reusing an id with different order parameters answers `422 IDEMPOTENCY_KEY_REUSED` and sends nothing.\n\n**Maintenance:** every account gets its own isolated API connection. Upgrades are rolling and per-account: in-flight requests are always allowed to finish before a connection is replaced, and any connection that drops is restored automatically.\n\n**Private Hosting:** pass `privateHosting: true` (optionally `region`, e.g. `\"ash\"` for US/Ashburn) to `POST /v1/seats` to give an account a **unique dedicated IP and device id** — not shared with any other customer, for brokers or platforms that require a fixed IP per account. Billed at a flat $17/account per month (no discount) vs $14 for a standard shared seat. While a private connection is being prepared the seat reports `status: \"BUILDING_SERVER\"` (`serverBuilding: true`); poll `GET /v1/seats/:id` until `ACTIVE`.\n\n**Economic calendar:** `GET /news` (any valid API key) returns this week's events (`title, country, impact, time, forecast, previous`); filter with `?country=USD&impact=High`.\n\n**Platform notes (MT4 vs MT5):** the API is identical across both, except that MT4 has no stop-limit orders and no `/BalanceHistory`; `/SymbolSessions` returns empty session arrays and `/Mails` returns `[]` on both platforms. `operation` on `/OrderSend` accepts a name (`Buy`/`Sell`/`BuyLimit`…) or the numeric MT code on both platforms. WS frames are `{\"type\":\"QUOTE|POSITIONS|ORDERS|TRADE|CANDLE|HEARTBEAT\",\"data\":…}`; `ORDERS` frames and the snapshot frames after connecting are MT5-only. On a fresh fill, read `/OpenedOrders` for authoritative open time/price (the OrderSend ack is a fast confirmation)."
  },
  "servers": [
    {
      "url": "https://api.metatraderapi.net",
      "description": "MetaTrader API REST API"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      },
      "ManagementKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Management key (mt5mgmt_...): connection routes accept it besides an unscoped x-api-key."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ],
  "paths": {
    "/Account": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Account",
        "operationId": "Account",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/AccountSummary": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "AccountSummary",
        "operationId": "AccountSummary",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/AccountDetails": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "AccountDetails",
        "operationId": "AccountDetails",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/IsInvestor": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "IsInvestor",
        "operationId": "IsInvestor",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OpenedOrders": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "OpenedOrders",
        "operationId": "OpenedOrders",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OpenedOrder": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "OpenedOrder",
        "operationId": "OpenedOrder",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OpenedOrdersTickets": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "OpenedOrdersTickets",
        "operationId": "OpenedOrdersTickets",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/ClosedOrders": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "ClosedOrders",
        "operationId": "ClosedOrders",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/Symbols": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Symbols",
        "operationId": "Symbols",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/SymbolList": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "SymbolList",
        "operationId": "SymbolList",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/GetQuote": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "GetQuote",
        "operationId": "GetQuote",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cached",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`0` bypasses the 250 ms quote cache."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/GetQuoteMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "GetQuoteMany",
        "operationId": "GetQuoteMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/MarketWatchMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "MarketWatchMany",
        "operationId": "MarketWatchMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/SymbolParams": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "SymbolParams",
        "operationId": "SymbolParams",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/SymbolParamsMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "SymbolParamsMany",
        "operationId": "SymbolParamsMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/SymbolSessions": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "SymbolSessions",
        "operationId": "SymbolSessions",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/ServerTimezone": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "ServerTimezone",
        "operationId": "ServerTimezone",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/IsTradeSession": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "IsTradeSession",
        "operationId": "IsTradeSession",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/IsTradeSessionMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "IsTradeSessionMany",
        "operationId": "IsTradeSessionMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/IsQuoteSession": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "IsQuoteSession",
        "operationId": "IsQuoteSession",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/IsQuoteSessionMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "IsQuoteSessionMany",
        "operationId": "IsQuoteSessionMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/GetTickValueMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "GetTickValueMany",
        "operationId": "GetTickValueMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/TickValueWithSize": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "TickValueWithSize",
        "operationId": "TickValueWithSize",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/RequiredMargin": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "RequiredMargin",
        "operationId": "RequiredMargin",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lots",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/ServerTimezoneInfo": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "ServerTimezoneInfo",
        "operationId": "ServerTimezoneInfo",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/CheckConnect": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "CheckConnect",
        "operationId": "CheckConnect",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/Mails": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Mails",
        "operationId": "Mails",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/Ping": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Ping",
        "operationId": "Ping",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderHistory": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderHistory",
        "operationId": "OrderHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PendingOrderHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PendingOrderHistory",
        "operationId": "PendingOrderHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/BalanceHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "BalanceHistory",
        "operationId": "BalanceHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderHistoryPagination": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderHistoryPagination",
        "operationId": "OrderHistoryPagination",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          },
          {
            "name": "ordersPerPage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "pageNumber",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/HistoryDealsByPositionId": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "HistoryDealsByPositionId",
        "operationId": "HistoryDealsByPositionId",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "positionTicket",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of `ticket`."
          },
          {
            "name": "position",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of `ticket`."
          },
          {
            "name": "positionId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of `ticket`."
          },
          {
            "name": "ticket_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Alias of `ticket`."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/HistoryPositions": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "HistoryPositions",
        "operationId": "HistoryPositions",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/HistoryPositionsByCloseTime": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "HistoryPositionsByCloseTime",
        "operationId": "HistoryPositionsByCloseTime",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistory",
        "operationId": "PriceHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryMany": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryMany",
        "operationId": "PriceHistoryMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryToday": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryToday",
        "operationId": "PriceHistoryToday",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryTodayMany": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryTodayMany",
        "operationId": "PriceHistoryTodayMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryMonth": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryMonth",
        "operationId": "PriceHistoryMonth",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryMonthMany": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryMonthMany",
        "operationId": "PriceHistoryMonthMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryHighLow": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryHighLow",
        "operationId": "PriceHistoryHighLow",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryEx": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryEx",
        "operationId": "PriceHistoryEx",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "numBars",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PriceHistoryExMany": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PriceHistoryExMany",
        "operationId": "PriceHistoryExMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "numBars",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderSend": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderSend",
        "operationId": "OrderSend",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoploss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "takeprofit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stopLimitPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expirationType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "placedType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expertId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "magic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientOrderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your unique id for this order (1-64 characters of A-Z a-z 0-9 _ . : -). A retry with the same id returns the original result instead of a second order."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Same as clientOrderId."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "409": {
            "description": "IDEMPOTENCY_UNCERTAIN (OrderSend with clientOrderId)"
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED (OrderSend with clientOrderId)"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderModify": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderModify",
        "operationId": "OrderModify",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoploss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "takeprofit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expirationType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoplimit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderClose": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderClose",
        "operationId": "OrderClose",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lots",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderDelete": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderDelete",
        "operationId": "OrderDelete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderCloseBy": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderCloseBy",
        "operationId": "OrderCloseBy",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "opposite",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "oppositeTicket",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/Quote": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Quote",
        "operationId": "Quote",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cached",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`0` bypasses the 250 ms quote cache."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderSendSafe": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderSendSafe",
        "operationId": "OrderSendSafe",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoploss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "takeprofit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stopLimitPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expirationType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "placedType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expertId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "magic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientOrderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your unique id for this order (1-64 characters of A-Z a-z 0-9 _ . : -). A retry with the same id returns the original result instead of a second order."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Same as clientOrderId."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "409": {
            "description": "IDEMPOTENCY_UNCERTAIN (OrderSend with clientOrderId)"
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED (OrderSend with clientOrderId)"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderCloseSafe": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderCloseSafe",
        "operationId": "OrderCloseSafe",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lots",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderModifySafe": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderModifySafe",
        "operationId": "OrderModifySafe",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoploss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "takeprofit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expirationType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoplimit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/EquityHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "EquityHistory",
        "operationId": "EquityHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/TradeStats": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "TradeStats",
        "operationId": "TradeStats",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/TradeStatsEquityHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "TradeStatsEquityHistory",
        "operationId": "TradeStatsEquityHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrdersHistory": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrdersHistory",
        "operationId": "OrdersHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/AllHistoryOrders": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "AllHistoryOrders",
        "operationId": "AllHistoryOrders",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/DepositsWithdrawals": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "DepositsWithdrawals",
        "operationId": "DepositsWithdrawals",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/AccountHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "AccountHistory",
        "operationId": "AccountHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/PositionsHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "PositionsHistory",
        "operationId": "PositionsHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/OrderSendWithoutChecks": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "OrderSendWithoutChecks",
        "operationId": "OrderSendWithoutChecks",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "slippage",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stoploss",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "takeprofit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "comment",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stopLimitPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expiration",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expirationType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "placedType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expertId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "magic",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "clientOrderId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Your unique id for this order (1-64 characters of A-Z a-z 0-9 _ . : -). A retry with the same id returns the original result instead of a second order."
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Same as clientOrderId."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "409": {
            "description": "IDEMPOTENCY_UNCERTAIN (OrderSend with clientOrderId)"
          },
          "422": {
            "description": "IDEMPOTENCY_KEY_REUSED (OrderSend with clientOrderId)"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/QuoteMany": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "QuoteMany",
        "operationId": "QuoteMany",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          },
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Symbols: repeat the parameter (symbol=A&symbol=B) or comma-separate (symbols=A,B). `symbol` and `symbols` are aliases."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/QuoteHistory": {
      "get": {
        "tags": [
          "History"
        ],
        "summary": "QuoteHistory",
        "operationId": "QuoteHistory",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = from the beginning of the account's history."
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "ISO-8601 or unix seconds. Optional: omitted = now (+1 day for broker clocks ahead of UTC)."
          },
          {
            "name": "timeFrame",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/SymbolSelect": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "SymbolSelect",
        "operationId": "SymbolSelect",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID (from your dashboard)."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cached",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "`0` bypasses the 250 ms quote cache."
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "BAD_REQUEST / TRADE_REQUEST_ERROR / missing account id"
          },
          "401": {
            "description": "missing x-api-key header / invalid api key"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          },
          "403": {
            "description": "read-only or account-scoped key"
          },
          "404": {
            "description": "account not found"
          },
          "429": {
            "description": "RATE_LIMITED, or too many failed auth attempts"
          },
          "500": {
            "description": "TERMINAL_ERROR (unexpected fault of the account's connection)"
          },
          "501": {
            "description": "NOT_ON_THIS_TERMINAL (endpoint newer than the account's connection)"
          },
          "503": {
            "description": "API connection not connected yet / resuming"
          }
        }
      }
    },
    "/ConnectEx": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Connect an MT account (user, password, host|server[, port, platform, label, wait]) and return its id + trading key",
        "operationId": "ConnectEx",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "label",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Seconds to wait for the connection to become ACTIVE before answering (0-180)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/Connect": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Alias of /ConnectEx",
        "operationId": "Connect",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/ConnectProxy": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Connect on private hosting (dedicated IP) -- same parameters as /ConnectEx",
        "operationId": "ConnectProxy",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "password",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "host",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "port",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/ConnectByToken": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Ensure an existing account (by id) is connected; reconnects if it dropped",
        "operationId": "ConnectByToken",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID. Optional: defaults to the key's own account; /ConnectState without id lists all connections."
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Seconds to wait for the connection to become ACTIVE before answering (0-180)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/ConnectState": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Live state of one connection (?id=) or all connections of the tenant",
        "operationId": "ConnectState",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID. Optional: defaults to the key's own account; /ConnectState without id lists all connections."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/ConnectionStatus": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Alias of /ConnectState",
        "operationId": "ConnectionStatus",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID. Optional: defaults to the key's own account; /ConnectState without id lists all connections."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/Disconnect": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Remove a connection (soft delete; the paid billing month keeps running)",
        "operationId": "Disconnect",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/Reconnect": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Recreate the API connection for an account",
        "operationId": "Reconnect",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "wait",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Seconds to wait for the connection to become ACTIVE before answering (0-180)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/GetId": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Account id for a login (+ server) you already connected",
        "operationId": "GetId",
        "parameters": [
          {
            "name": "user",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "server",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/GetBrokerServersByBrokerName": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "Server names + access points for a broker name",
        "operationId": "GetBrokerServersByBrokerName",
        "parameters": [
          {
            "name": "brokerName",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/NewEndpoint": {
      "get": {
        "tags": [
          "Connection"
        ],
        "summary": "REST / WebSocket base URLs for this client",
        "operationId": "NewEndpoint",
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "security": [
          {
            "ApiKey": []
          },
          {
            "ManagementKey": []
          }
        ]
      }
    },
    "/AccountInfoDouble": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One account property (balance, equity, margin, profit, ...) by name",
        "operationId": "AccountInfoDouble",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/AccountInfoInteger": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One integer account property (login, leverage, ...)",
        "operationId": "AccountInfoInteger",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/AccountInfoString": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One string account property (currency, server, company, name)",
        "operationId": "AccountInfoString",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoDouble": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One numeric symbol property (point, tickValue, contractSize, ...)",
        "operationId": "SymbolInfoDouble",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoInteger": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One integer symbol property (digits, spread, ...)",
        "operationId": "SymbolInfoInteger",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoString": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "One string symbol property (base/profit/margin currency, description)",
        "operationId": "SymbolInfoString",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "property",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoTick": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Latest tick for a symbol (bid, ask, time) -- alias of /GetQuote",
        "operationId": "SymbolInfoTick",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoMarginRate": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Initial/maintenance margin rate for a symbol",
        "operationId": "SymbolInfoMarginRate",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolsTotal": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Number of symbols available",
        "operationId": "SymbolsTotal",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolExist": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Whether a symbol exists on this account",
        "operationId": "SymbolExist",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolName": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Symbol name at a given index",
        "operationId": "SymbolName",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolIsSynchronized": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Whether a symbol is quoting (synchronized)",
        "operationId": "SymbolIsSynchronized",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/PositionsTotal": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Number of open positions",
        "operationId": "PositionsTotal",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/TradeUnrealizedPL": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Total, max and min unrealized profit across open positions",
        "operationId": "TradeUnrealizedPL",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/OrderCalcMargin": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Margin required for a hypothetical order",
        "operationId": "OrderCalcMargin",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/OrderCheck": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Whether an order can be placed (margin vs free margin)",
        "operationId": "OrderCheck",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "price",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/OrderCalcProfit": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Profit for a hypothetical trade (symbol, operation, volume, openPrice, closePrice)",
        "operationId": "OrderCalcProfit",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "operation",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "volume",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "openPrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "closePrice",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/OrderCloseDelete": {
      "get": {
        "tags": [
          "Trading"
        ],
        "summary": "Close a position or delete a pending order by ticket (MT4 name)",
        "operationId": "OrderCloseDelete",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "ticket",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoSessionQuote": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Quote session times for a symbol",
        "operationId": "SymbolInfoSessionQuote",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/SymbolInfoSessionTrade": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Trade session times for a symbol",
        "operationId": "SymbolInfoSessionTrade",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/Logs/Journal": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "Recent MetaTrader Journal entries (connection, network, server messages). ?lines= up to 5000",
        "operationId": "Logs_Journal",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "lines",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "How many recent lines (default 200, max 5000)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/Logs/Experts": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "Recent Expert Advisor / script log entries (what your EAs Print). Empty until an EA has written something — the EA load line itself is in /Logs/Journal. ?lines= up to 5000",
        "operationId": "Logs_Experts",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "lines",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "How many recent lines (default 200, max 5000)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/MarketBookAdd": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Subscribe to a symbol's Depth of Market",
        "operationId": "MarketBookAdd",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/MarketBookGet": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Current Depth of Market (bids/asks) for a symbol",
        "operationId": "MarketBookGet",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/MarketBookRelease": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Unsubscribe from a symbol's Depth of Market",
        "operationId": "MarketBookRelease",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/Screenshot": {
      "get": {
        "tags": [
          "Charts"
        ],
        "summary": "PNG (base64) screenshot of the account's chart display",
        "operationId": "Screenshot",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "width",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "height",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/CopyTicks": {
      "get": {
        "tags": [
          "Account & Market"
        ],
        "summary": "Tick history with trade flags (bid/ask/last/volume/volumeReal/flags). mode=all|trade",
        "operationId": "CopyTicks",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "count",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fromMsc",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/OpenTerminalChartWithEa": {
      "get": {
        "tags": [
          "Expert Advisors"
        ],
        "summary": "Attach an uploaded EA (eaId) to a chart (symbol, timeframe, params JSON)",
        "operationId": "OpenTerminalChartWithEa",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "eaId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "From POST /EaUpload."
            }
          },
          {
            "name": "symbol",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeframe",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "M1, M5, M15, M30, H1, H4, D1 (also 5m, 1h)."
            }
          },
          {
            "name": "params",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/GetEaParams": {
      "get": {
        "tags": [
          "Expert Advisors"
        ],
        "summary": "Read the input parameters of an uploaded EA (eaId)",
        "operationId": "GetEaParams",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Account UUID."
          },
          {
            "name": "eaId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "From POST /EaUpload."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      }
    },
    "/EaUpload": {
      "get": {
        "tags": [
          "Expert Advisors"
        ],
        "operationId": "EaUpload_get",
        "summary": "List your uploaded Expert Advisors (eaId, name, size, sha256). Upload with POST /EaUpload {fileName, fileBase64} — see the POST operation.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "{ eas: [...] }"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        }
      },
      "post": {
        "tags": [
          "Expert Advisors"
        ],
        "operationId": "EaUpload_post",
        "summary": "Upload a compiled Expert Advisor (.ex5/.ex4, max about 750 KB) → { eaId }. Then GET /OpenTerminalChartWithEa?id=&eaId=… and /Reconnect to activate.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "fileName",
                  "fileBase64"
                ],
                "properties": {
                  "fileName": {
                    "type": "string",
                    "example": "MyRobot.ex5"
                  },
                  "fileBase64": {
                    "type": "string",
                    "description": "the compiled EA, base64"
                  },
                  "name": {
                    "type": "string"
                  },
                  "mt5AccountId": {
                    "type": "string",
                    "description": "defaults to the key's account"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "{ eaId, fileName, sizeBytes, sha256 }"
          },
          "400": {
            "description": "not a compiled EA / too large"
          },
          "401": {
            "description": "Auth required"
          },
          "402": {
            "description": "Subscription required (NO_SUBSCRIPTION)"
          }
        },
        "parameters": []
      }
    }
  }
}
