{
  "openapi": "3.1.0",
  "info": {
    "title": "Algo Trader Tools API",
    "version": "1.0.0",
    "description": "Connect MetaTrader 4 and 5 accounts, set up trade copiers and attach followers with their own rules, from your own code.\n\n* Authenticate with `Authorization: Bearer att_…` (or `X-API-Key`). Create keys in the app under **API keys**.\n* Errors are RFC 9457 problem details (`application/problem+json`) with a stable `code`.\n* Lists are cursor-paginated: `limit` (1 to 100) and `cursor`; read `has_more` and `next_cursor`.\n* Rate limits: 120 requests a minute per key, and 5 account connects, reconnects and disconnects a minute per user. Headers: `RateLimit-Policy`, `RateLimit`, and `Retry-After` on 429.\n",
    "contact": {
      "name": "Algo Trader Tools",
      "url": "https://algotradertools.com"
    }
  },
  "servers": [
    {
      "url": "https://api.algotradertools.com",
      "description": "Production"
    }
  ],
  "externalDocs": {
    "description": "Documentation",
    "url": "https://algotradertools.com/docs"
  },
  "security": [
    {
      "ApiKey": []
    },
    {
      "ApiKeyHeader": []
    }
  ],
  "tags": [
    {
      "name": "Accounts",
      "description": "MetaTrader 4 and 5 accounts, each running in its own hosted terminal."
    },
    {
      "name": "Copiers",
      "description": "A master account and the followers that copy it."
    },
    {
      "name": "Followers",
      "description": "Accounts that copy a copier's master, each with its own rules."
    },
    {
      "name": "Copy events",
      "description": "What the copier engine did on each follower, kept for 90 days."
    }
  ],
  "paths": {
    "/v1/accounts": {
      "get": {
        "operationId": "list_accounts",
        "tags": [
          "Accounts"
        ],
        "summary": "List accounts",
        "description": "Your connected MetaTrader accounts, newest first.\n\nScope: `accounts:read`.",
        "responses": {
          "200": {
            "description": "A page of accounts.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                      "object": "account",
                      "name": "Gold master",
                      "nickname": "Gold master",
                      "platform": "mt5",
                      "server": "ICMarketsSC-Demo",
                      "login": 51234567,
                      "credential_kind": "investor",
                      "can_trade": false,
                      "status": "connected",
                      "error": null,
                      "released": false,
                      "proxy_type": null,
                      "proxy_address": null,
                      "role": "master",
                      "figures": {
                        "balance": 10000.0,
                        "equity": 10250.5,
                        "profit": 250.5,
                        "margin": 400.0,
                        "free_margin": 9850.5,
                        "margin_level": 2562.63,
                        "currency": "USD",
                        "open_positions": 2,
                        "as_of": "2026-10-25T14:03:51.204Z",
                        "source": "live"
                      },
                      "created_at": "2026-10-20T09:12:44.512Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "- `invalid_cursor`: The cursor wasn't one this API returned.\n- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#invalid_cursor",
                  "title": "Invalid cursor",
                  "status": 400,
                  "code": "invalid_cursor",
                  "detail": "The cursor wasn't one this API returned.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#invalid_cursor"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the accounts:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "connect_account",
        "tags": [
          "Accounts"
        ],
        "summary": "Connect an account",
        "description": "Starts a hosted MetaTrader terminal for the account and logs it in. The answer comes at once with `status: connecting`; logging in takes two to three minutes. Poll the account every 15 seconds or slower until it's `connected` or `error`.\n\nEach connect counts against the plan's accounts and the limit of 5 connects, reconnects and disconnects a minute. Retrying is safe: a second attempt fails with `already_connected`.\n\nWith `proxy_address`, the terminal reaches the broker through your proxy, so the broker sees its IP address. The proxy is tried first; one that doesn't work fails with `proxy_unreachable` and nothing is connected.\n\nScope: `accounts:write`.",
        "responses": {
          "201": {
            "description": "Connecting.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                  "object": "account",
                  "name": "Follower 1",
                  "nickname": "Follower 1",
                  "platform": "mt5",
                  "server": "ICMarketsSC-Demo",
                  "login": 51234568,
                  "credential_kind": "master",
                  "can_trade": true,
                  "status": "connecting",
                  "error": null,
                  "released": false,
                  "proxy_type": null,
                  "proxy_address": null,
                  "role": null,
                  "figures": null,
                  "created_at": "2026-10-25T14:03:51.204Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.\n- `invalid_credentials`: The broker rejected the login and password.\n- `server_not_found`: No broker server has that name; copy it exactly as MetaTrader shows it.\n- `already_connected`: That MetaTrader account is already connected.\n- `proxy_unreachable`: Nothing could be reached through the account's proxy.\n- `connect_rejected`: The terminal host refused the account; see detail.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.\n- `plan_limit_reached`: Every account the plan allows is connected, or there is no plan yet.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the accounts:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "502": {
            "description": "- `terminal_unreachable`: The account's terminal couldn't be reached.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_unreachable",
                  "title": "Terminal unreachable",
                  "status": 502,
                  "code": "terminal_unreachable",
                  "detail": "The account's terminal couldn't be reached.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_unreachable"
                }
              }
            }
          },
          "503": {
            "description": "- `connect_unavailable`: New accounts can't be connected right now; retry later.\n- `terminal_unavailable`: The terminal is still starting up or busy; retry shortly.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#connect_unavailable",
                  "title": "Connecting unavailable",
                  "status": 503,
                  "code": "connect_unavailable",
                  "detail": "New accounts can't be connected right now; retry later.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#connect_unavailable"
                }
              }
            }
          },
          "504": {
            "description": "- `terminal_timeout`: The terminal didn't answer in time.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_timeout",
                  "title": "Terminal timeout",
                  "status": 504,
                  "code": "terminal_timeout",
                  "detail": "The terminal didn't answer in time.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_timeout"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectAccount"
              },
              "example": {
                "platform": "mt5",
                "server": "ICMarketsSC-Demo",
                "login": 51234568,
                "password": "your-trading-password",
                "credential_kind": "master",
                "nickname": "Follower 1"
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AccountId"
        }
      ],
      "get": {
        "operationId": "get_account",
        "tags": [
          "Accounts"
        ],
        "summary": "Retrieve an account",
        "description": "The account with its status, role and freshest figures.\n\nScope: `accounts:read`.",
        "responses": {
          "200": {
            "description": "The account.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                  "object": "account",
                  "name": "Gold master",
                  "nickname": "Gold master",
                  "platform": "mt5",
                  "server": "ICMarketsSC-Demo",
                  "login": 51234567,
                  "credential_kind": "investor",
                  "can_trade": false,
                  "status": "connected",
                  "error": null,
                  "released": false,
                  "proxy_type": null,
                  "proxy_address": null,
                  "role": "master",
                  "figures": {
                    "balance": 10000.0,
                    "equity": 10250.5,
                    "profit": 250.5,
                    "margin": 400.0,
                    "free_margin": 9850.5,
                    "margin_level": 2562.63,
                    "currency": "USD",
                    "open_positions": 2,
                    "as_of": "2026-10-25T14:03:51.204Z",
                    "source": "live"
                  },
                  "created_at": "2026-10-20T09:12:44.512Z"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the accounts:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "disconnect_account",
        "tags": [
          "Accounts"
        ],
        "summary": "Disconnect an account",
        "description": "Stops the account's terminal and deletes the account with its stored history. An account a copier uses is refused with `account_in_use`: delete the copier or remove the follower first.\n\nScope: `accounts:write`.",
        "responses": {
          "204": {
            "description": "Done. There is no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the accounts:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "409": {
            "description": "- `account_in_use`: The account is a master or follower in a copier; remove it there first.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#account_in_use",
                  "title": "Account in use",
                  "status": 409,
                  "code": "account_in_use",
                  "detail": "The account is a master or follower in a copier; remove it there first.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#account_in_use"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "502": {
            "description": "- `disconnect_failed`: The account's terminal couldn't be stopped; the account was kept.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#disconnect_failed",
                  "title": "Disconnect failed",
                  "status": 502,
                  "code": "disconnect_failed",
                  "detail": "The account's terminal couldn't be stopped; the account was kept.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#disconnect_failed"
                }
              }
            }
          },
          "503": {
            "description": "- `disconnect_failed`: The account's terminal couldn't be stopped; the account was kept.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#disconnect_failed",
                  "title": "Disconnect failed",
                  "status": 503,
                  "code": "disconnect_failed",
                  "detail": "The account's terminal couldn't be stopped; the account was kept.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#disconnect_failed"
                }
              }
            }
          },
          "504": {
            "description": "- `disconnect_failed`: The account's terminal couldn't be stopped; the account was kept.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#disconnect_failed",
                  "title": "Disconnect failed",
                  "status": 504,
                  "code": "disconnect_failed",
                  "detail": "The account's terminal couldn't be stopped; the account was kept.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#disconnect_failed"
                }
              }
            }
          }
        }
      }
    },
    "/v1/accounts/{account_id}/reconnect": {
      "parameters": [
        {
          "$ref": "#/components/parameters/AccountId"
        }
      ],
      "post": {
        "operationId": "reconnect_account",
        "tags": [
          "Accounts"
        ],
        "summary": "Reconnect a released account",
        "description": "Starts a new terminal for an account whose terminal was released after the subscription lapsed (`released: true`), keeping the account and its history. Like connecting, it answers with `status: connecting`.\n\nThe account keeps its proxy unless `proxy_address` is sent. A proxy that needs a username and password needs them again, since they went with the old terminal.\n\nScope: `accounts:write`.",
        "responses": {
          "200": {
            "description": "Connecting again.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                },
                "example": {
                  "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                  "object": "account",
                  "name": "Follower 1",
                  "nickname": "Follower 1",
                  "platform": "mt5",
                  "server": "ICMarketsSC-Demo",
                  "login": 51234568,
                  "credential_kind": "master",
                  "can_trade": true,
                  "status": "connecting",
                  "error": null,
                  "released": false,
                  "proxy_type": null,
                  "proxy_address": null,
                  "role": null,
                  "figures": null,
                  "created_at": "2026-10-25T14:03:51.204Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.\n- `invalid_credentials`: The broker rejected the login and password.\n- `server_not_found`: No broker server has that name; copy it exactly as MetaTrader shows it.\n- `already_connected`: That MetaTrader account is already connected.\n- `proxy_unreachable`: Nothing could be reached through the account's proxy.\n- `connect_rejected`: The terminal host refused the account; see detail.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.\n- `plan_limit_reached`: Every account the plan allows is connected, or there is no plan yet.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the accounts:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "409": {
            "description": "- `account_not_released`: Only an account whose terminal was released can be reconnected.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#account_not_released",
                  "title": "Account not released",
                  "status": 409,
                  "code": "account_not_released",
                  "detail": "Only an account whose terminal was released can be reconnected.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#account_not_released"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "502": {
            "description": "- `terminal_unreachable`: The account's terminal couldn't be reached.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_unreachable",
                  "title": "Terminal unreachable",
                  "status": 502,
                  "code": "terminal_unreachable",
                  "detail": "The account's terminal couldn't be reached.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_unreachable"
                }
              }
            }
          },
          "503": {
            "description": "- `connect_unavailable`: New accounts can't be connected right now; retry later.\n- `terminal_unavailable`: The terminal is still starting up or busy; retry shortly.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#connect_unavailable",
                  "title": "Connecting unavailable",
                  "status": 503,
                  "code": "connect_unavailable",
                  "detail": "New accounts can't be connected right now; retry later.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#connect_unavailable"
                }
              }
            }
          },
          "504": {
            "description": "- `terminal_timeout`: The terminal didn't answer in time.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_timeout",
                  "title": "Terminal timeout",
                  "status": 504,
                  "code": "terminal_timeout",
                  "detail": "The terminal didn't answer in time.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_timeout"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconnectAccount"
              },
              "example": {
                "password": "your-trading-password",
                "credential_kind": "master"
              }
            }
          }
        }
      }
    },
    "/v1/copiers": {
      "get": {
        "operationId": "list_copiers",
        "tags": [
          "Copiers"
        ],
        "summary": "List copiers",
        "description": "Your copiers with their followers, oldest first.\n\nScope: `copiers:read`.",
        "responses": {
          "200": {
            "description": "A page of copiers.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopierList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                      "object": "copier",
                      "name": "Gold strategy",
                      "is_active": true,
                      "master_id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                      "master": {
                        "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                        "name": "Gold master",
                        "platform": "mt5",
                        "server": "ICMarketsSC-Demo",
                        "login": 51234567,
                        "status": "connected"
                      },
                      "followers": [
                        {
                          "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                          "object": "follower",
                          "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                          "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                          "account": {
                            "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                            "name": "Follower 1",
                            "platform": "mt5",
                            "server": "ICMarketsSC-Demo",
                            "login": 51234568,
                            "status": "connected"
                          },
                          "is_active": true,
                          "magic": 1844674407,
                          "lot_mode": "equity_ratio",
                          "lot_value": 1.0,
                          "adjust_contract_size": true,
                          "below_minimum": "minimum",
                          "max_lot": 2.0,
                          "reverse": false,
                          "copy_stops": true,
                          "max_slippage_pips": null,
                          "max_delay_seconds": 60,
                          "copy_existing": false,
                          "copy_pending": false,
                          "symbol_filter": "include",
                          "symbols": [
                            "XAUUSD",
                            "EURUSD"
                          ],
                          "sessions": [
                            {
                              "days": [
                                0,
                                1,
                                2,
                                3,
                                4
                              ],
                              "start": "07:00",
                              "end": "16:30"
                            }
                          ],
                          "timezone": "broker",
                          "symbol_map": {
                            "XAUUSD": "GOLD.m"
                          },
                          "status": {
                            "state": "copying",
                            "message": "",
                            "master_connected": true,
                            "follower_connected": true,
                            "open_copies": 2,
                            "last_event_at": "2026-10-25T13:58:02.117Z",
                            "balance": 5000.0,
                            "equity": 5061.25,
                            "currency": "USD",
                            "heartbeat_at": "2026-10-25T14:03:51.204Z",
                            "engine_online": true
                          },
                          "created_at": "2026-10-21T10:00:00.000Z",
                          "updated_at": "2026-10-24T08:30:00.000Z"
                        }
                      ],
                      "open_copies": 2,
                      "created_at": "2026-10-21T09:58:12.000Z",
                      "updated_at": "2026-10-21T09:58:12.000Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "- `invalid_cursor`: The cursor wasn't one this API returned.\n- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#invalid_cursor",
                  "title": "Invalid cursor",
                  "status": 400,
                  "code": "invalid_cursor",
                  "detail": "The cursor wasn't one this API returned.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#invalid_cursor"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "create_copier",
        "tags": [
          "Copiers"
        ],
        "summary": "Create a copier",
        "description": "A copier copies one master account to its followers. It starts without any: add them next. Masters must be hedging accounts (all of MT4, and MT5 hedging accounts). Retrying a failed request can create a second copier; list your copiers first.\n\nScope: `copiers:write`.",
        "responses": {
          "201": {
            "description": "Created.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Copier"
                },
                "example": {
                  "id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "object": "copier",
                  "name": "Gold strategy",
                  "is_active": true,
                  "master_id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                  "master": {
                    "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                    "name": "Gold master",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234567,
                    "status": "connected"
                  },
                  "followers": [],
                  "open_copies": 0,
                  "created_at": "2026-10-21T09:58:12.000Z",
                  "updated_at": "2026-10-21T09:58:12.000Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "503": {
            "description": "- `terminal_unavailable`: The terminal is still starting up or busy; retry shortly.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_unavailable",
                  "title": "Terminal unavailable",
                  "status": 503,
                  "code": "terminal_unavailable",
                  "detail": "The terminal is still starting up or busy; retry shortly.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_unavailable"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCopier"
              },
              "example": {
                "name": "Gold strategy",
                "master_id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
              }
            }
          }
        }
      }
    },
    "/v1/copiers/{copier_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CopierId"
        }
      ],
      "get": {
        "operationId": "get_copier",
        "tags": [
          "Copiers"
        ],
        "summary": "Retrieve a copier",
        "description": "The copier with its master, its followers and what the engine reports about each.\n\nScope: `copiers:read`.",
        "responses": {
          "200": {
            "description": "The copier.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Copier"
                },
                "example": {
                  "id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "object": "copier",
                  "name": "Gold strategy",
                  "is_active": true,
                  "master_id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                  "master": {
                    "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                    "name": "Gold master",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234567,
                    "status": "connected"
                  },
                  "followers": [
                    {
                      "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                      "object": "follower",
                      "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                      "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                      "account": {
                        "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                        "name": "Follower 1",
                        "platform": "mt5",
                        "server": "ICMarketsSC-Demo",
                        "login": 51234568,
                        "status": "connected"
                      },
                      "is_active": true,
                      "magic": 1844674407,
                      "lot_mode": "equity_ratio",
                      "lot_value": 1.0,
                      "adjust_contract_size": true,
                      "below_minimum": "minimum",
                      "max_lot": 2.0,
                      "reverse": false,
                      "copy_stops": true,
                      "max_slippage_pips": null,
                      "max_delay_seconds": 60,
                      "copy_existing": false,
                      "copy_pending": false,
                      "symbol_filter": "include",
                      "symbols": [
                        "XAUUSD",
                        "EURUSD"
                      ],
                      "sessions": [
                        {
                          "days": [
                            0,
                            1,
                            2,
                            3,
                            4
                          ],
                          "start": "07:00",
                          "end": "16:30"
                        }
                      ],
                      "timezone": "broker",
                      "symbol_map": {
                        "XAUUSD": "GOLD.m"
                      },
                      "status": {
                        "state": "copying",
                        "message": "",
                        "master_connected": true,
                        "follower_connected": true,
                        "open_copies": 2,
                        "last_event_at": "2026-10-25T13:58:02.117Z",
                        "balance": 5000.0,
                        "equity": 5061.25,
                        "currency": "USD",
                        "heartbeat_at": "2026-10-25T14:03:51.204Z",
                        "engine_online": true
                      },
                      "created_at": "2026-10-21T10:00:00.000Z",
                      "updated_at": "2026-10-24T08:30:00.000Z"
                    }
                  ],
                  "open_copies": 2,
                  "created_at": "2026-10-21T09:58:12.000Z",
                  "updated_at": "2026-10-21T09:58:12.000Z"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_copier",
        "tags": [
          "Copiers"
        ],
        "summary": "Update a copier",
        "description": "Rename, pause or resume a copier. Pausing stops new copies on every follower; copies already open stay and still follow the master's closes and changes. Resuming copies only what the master opens from then on.\n\nScope: `copiers:write`.",
        "responses": {
          "200": {
            "description": "The copier as it is now.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Copier"
                },
                "example": {
                  "id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "object": "copier",
                  "name": "Gold strategy",
                  "is_active": true,
                  "master_id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                  "master": {
                    "id": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f",
                    "name": "Gold master",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234567,
                    "status": "connected"
                  },
                  "followers": [
                    {
                      "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                      "object": "follower",
                      "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                      "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                      "account": {
                        "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                        "name": "Follower 1",
                        "platform": "mt5",
                        "server": "ICMarketsSC-Demo",
                        "login": 51234568,
                        "status": "connected"
                      },
                      "is_active": true,
                      "magic": 1844674407,
                      "lot_mode": "equity_ratio",
                      "lot_value": 1.0,
                      "adjust_contract_size": true,
                      "below_minimum": "minimum",
                      "max_lot": 2.0,
                      "reverse": false,
                      "copy_stops": true,
                      "max_slippage_pips": null,
                      "max_delay_seconds": 60,
                      "copy_existing": false,
                      "copy_pending": false,
                      "symbol_filter": "include",
                      "symbols": [
                        "XAUUSD",
                        "EURUSD"
                      ],
                      "sessions": [
                        {
                          "days": [
                            0,
                            1,
                            2,
                            3,
                            4
                          ],
                          "start": "07:00",
                          "end": "16:30"
                        }
                      ],
                      "timezone": "broker",
                      "symbol_map": {
                        "XAUUSD": "GOLD.m"
                      },
                      "status": {
                        "state": "copying",
                        "message": "",
                        "master_connected": true,
                        "follower_connected": true,
                        "open_copies": 2,
                        "last_event_at": "2026-10-25T13:58:02.117Z",
                        "balance": 5000.0,
                        "equity": 5061.25,
                        "currency": "USD",
                        "heartbeat_at": "2026-10-25T14:03:51.204Z",
                        "engine_online": true
                      },
                      "created_at": "2026-10-21T10:00:00.000Z",
                      "updated_at": "2026-10-24T08:30:00.000Z"
                    }
                  ],
                  "open_copies": 2,
                  "created_at": "2026-10-21T09:58:12.000Z",
                  "updated_at": "2026-10-21T09:58:12.000Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCopier"
              },
              "example": {
                "is_active": false
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_copier",
        "tags": [
          "Copiers"
        ],
        "summary": "Delete a copier",
        "description": "Deletes the copier, its followers and their activity log. The accounts stay connected. With `close_positions=true` every copy is closed first.\n\nScope: `copiers:write`.",
        "responses": {
          "204": {
            "description": "Done. There is no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "502": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 502,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          },
          "503": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 503,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          },
          "504": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 504,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ClosePositions"
          }
        ]
      }
    },
    "/v1/copiers/{copier_id}/followers": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CopierId"
        }
      ],
      "get": {
        "operationId": "list_followers",
        "tags": [
          "Followers"
        ],
        "summary": "List followers",
        "description": "The copier's followers, oldest first.\n\nScope: `copiers:read`.",
        "responses": {
          "200": {
            "description": "A page of followers.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowerList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                      "object": "follower",
                      "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                      "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                      "account": {
                        "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                        "name": "Follower 1",
                        "platform": "mt5",
                        "server": "ICMarketsSC-Demo",
                        "login": 51234568,
                        "status": "connected"
                      },
                      "is_active": true,
                      "magic": 1844674407,
                      "lot_mode": "equity_ratio",
                      "lot_value": 1.0,
                      "adjust_contract_size": true,
                      "below_minimum": "minimum",
                      "max_lot": 2.0,
                      "reverse": false,
                      "copy_stops": true,
                      "max_slippage_pips": null,
                      "max_delay_seconds": 60,
                      "copy_existing": false,
                      "copy_pending": false,
                      "symbol_filter": "include",
                      "symbols": [
                        "XAUUSD",
                        "EURUSD"
                      ],
                      "sessions": [
                        {
                          "days": [
                            0,
                            1,
                            2,
                            3,
                            4
                          ],
                          "start": "07:00",
                          "end": "16:30"
                        }
                      ],
                      "timezone": "broker",
                      "symbol_map": {
                        "XAUUSD": "GOLD.m"
                      },
                      "status": {
                        "state": "copying",
                        "message": "",
                        "master_connected": true,
                        "follower_connected": true,
                        "open_copies": 2,
                        "last_event_at": "2026-10-25T13:58:02.117Z",
                        "balance": 5000.0,
                        "equity": 5061.25,
                        "currency": "USD",
                        "heartbeat_at": "2026-10-25T14:03:51.204Z",
                        "engine_online": true
                      },
                      "created_at": "2026-10-21T10:00:00.000Z",
                      "updated_at": "2026-10-24T08:30:00.000Z"
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "- `invalid_cursor`: The cursor wasn't one this API returned.\n- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#invalid_cursor",
                  "title": "Invalid cursor",
                  "status": 400,
                  "code": "invalid_cursor",
                  "detail": "The cursor wasn't one this API returned.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#invalid_cursor"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      },
      "post": {
        "operationId": "add_follower",
        "tags": [
          "Followers"
        ],
        "summary": "Add a follower",
        "description": "Attaches one of your accounts to the copier with its own rules; leave a rule out for its default. Copying starts at once (unless `is_active` is false), with what the master opens from then on. Retrying is safe: a second attempt fails with `already_following`.\n\nScope: `copiers:write`.",
        "responses": {
          "201": {
            "description": "Added.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Follower"
                },
                "example": {
                  "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                  "object": "follower",
                  "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                  "account": {
                    "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                    "name": "Follower 1",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234568,
                    "status": "connected"
                  },
                  "is_active": true,
                  "magic": 1844674407,
                  "lot_mode": "equity_ratio",
                  "lot_value": 1.0,
                  "adjust_contract_size": true,
                  "below_minimum": "minimum",
                  "max_lot": 2.0,
                  "reverse": false,
                  "copy_stops": true,
                  "max_slippage_pips": null,
                  "max_delay_seconds": 60,
                  "copy_existing": false,
                  "copy_pending": false,
                  "symbol_filter": "include",
                  "symbols": [
                    "XAUUSD",
                    "EURUSD"
                  ],
                  "sessions": [
                    {
                      "days": [
                        0,
                        1,
                        2,
                        3,
                        4
                      ],
                      "start": "07:00",
                      "end": "16:30"
                    }
                  ],
                  "timezone": "broker",
                  "symbol_map": {
                    "XAUUSD": "GOLD.m"
                  },
                  "status": null,
                  "created_at": "2026-10-21T10:00:00.000Z",
                  "updated_at": "2026-10-24T08:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "503": {
            "description": "- `terminal_unavailable`: The terminal is still starting up or busy; retry shortly.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#terminal_unavailable",
                  "title": "Terminal unavailable",
                  "status": 503,
                  "code": "terminal_unavailable",
                  "detail": "The terminal is still starting up or busy; retry shortly.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#terminal_unavailable"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddFollower"
              },
              "example": {
                "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                "lot_mode": "equity_ratio",
                "lot_value": 1,
                "max_lot": 2,
                "symbol_filter": "include",
                "symbols": [
                  "XAUUSD",
                  "EURUSD"
                ],
                "symbol_map": {
                  "XAUUSD": "GOLD.m"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copiers/{copier_id}/followers/{follower_id}": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CopierId"
        },
        {
          "$ref": "#/components/parameters/FollowerId"
        }
      ],
      "get": {
        "operationId": "get_follower",
        "tags": [
          "Followers"
        ],
        "summary": "Retrieve a follower",
        "description": "The follower's rules and what the engine reports about it.\n\nScope: `copiers:read`.",
        "responses": {
          "200": {
            "description": "The follower.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Follower"
                },
                "example": {
                  "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                  "object": "follower",
                  "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                  "account": {
                    "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                    "name": "Follower 1",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234568,
                    "status": "connected"
                  },
                  "is_active": true,
                  "magic": 1844674407,
                  "lot_mode": "equity_ratio",
                  "lot_value": 1.0,
                  "adjust_contract_size": true,
                  "below_minimum": "minimum",
                  "max_lot": 2.0,
                  "reverse": false,
                  "copy_stops": true,
                  "max_slippage_pips": null,
                  "max_delay_seconds": 60,
                  "copy_existing": false,
                  "copy_pending": false,
                  "symbol_filter": "include",
                  "symbols": [
                    "XAUUSD",
                    "EURUSD"
                  ],
                  "sessions": [
                    {
                      "days": [
                        0,
                        1,
                        2,
                        3,
                        4
                      ],
                      "start": "07:00",
                      "end": "16:30"
                    }
                  ],
                  "timezone": "broker",
                  "symbol_map": {
                    "XAUUSD": "GOLD.m"
                  },
                  "status": {
                    "state": "copying",
                    "message": "",
                    "master_connected": true,
                    "follower_connected": true,
                    "open_copies": 2,
                    "last_event_at": "2026-10-25T13:58:02.117Z",
                    "balance": 5000.0,
                    "equity": 5061.25,
                    "currency": "USD",
                    "heartbeat_at": "2026-10-25T14:03:51.204Z",
                    "engine_online": true
                  },
                  "created_at": "2026-10-21T10:00:00.000Z",
                  "updated_at": "2026-10-24T08:30:00.000Z"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "update_follower",
        "tags": [
          "Followers"
        ],
        "summary": "Update a follower",
        "description": "Change rules, or pause and resume this follower. Changes apply to what's copied from then on.\n\nScope: `copiers:write`.",
        "responses": {
          "200": {
            "description": "The follower as it is now.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Follower"
                },
                "example": {
                  "id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                  "object": "follower",
                  "copier_id": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
                  "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                  "account": {
                    "id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                    "name": "Follower 1",
                    "platform": "mt5",
                    "server": "ICMarketsSC-Demo",
                    "login": 51234568,
                    "status": "connected"
                  },
                  "is_active": true,
                  "magic": 1844674407,
                  "lot_mode": "equity_ratio",
                  "lot_value": 1.0,
                  "adjust_contract_size": true,
                  "below_minimum": "minimum",
                  "max_lot": 2.0,
                  "reverse": false,
                  "copy_stops": true,
                  "max_slippage_pips": null,
                  "max_delay_seconds": 60,
                  "copy_existing": false,
                  "copy_pending": false,
                  "symbol_filter": "include",
                  "symbols": [
                    "XAUUSD",
                    "EURUSD"
                  ],
                  "sessions": [
                    {
                      "days": [
                        0,
                        1,
                        2,
                        3,
                        4
                      ],
                      "start": "07:00",
                      "end": "16:30"
                    }
                  ],
                  "timezone": "broker",
                  "symbol_map": {
                    "XAUUSD": "GOLD.m"
                  },
                  "status": {
                    "state": "copying",
                    "message": "",
                    "master_connected": true,
                    "follower_connected": true,
                    "open_copies": 2,
                    "last_event_at": "2026-10-25T13:58:02.117Z",
                    "balance": 5000.0,
                    "equity": 5061.25,
                    "currency": "USD",
                    "heartbeat_at": "2026-10-25T14:03:51.204Z",
                    "engine_online": true
                  },
                  "created_at": "2026-10-21T10:00:00.000Z",
                  "updated_at": "2026-10-24T08:30:00.000Z"
                }
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFollower"
              },
              "example": {
                "lot_mode": "fixed",
                "lot_value": 0.1
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "remove_follower",
        "tags": [
          "Followers"
        ],
        "summary": "Remove a follower",
        "description": "Detaches the account from the copier and deletes its activity log. The account stays connected. With `close_positions=true` its copies are closed first.\n\nScope: `copiers:write`.",
        "responses": {
          "204": {
            "description": "Done. There is no body.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            }
          },
          "400": {
            "description": "- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#validation_failed",
                  "title": "Validation failed",
                  "status": 400,
                  "code": "validation_failed",
                  "detail": "lot_value: Use a number above 0 and up to 1000.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#validation_failed",
                  "errors": [
                    {
                      "path": "/lot_value",
                      "code": "invalid",
                      "message": "Use a number above 0 and up to 1000."
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:write scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          },
          "502": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 502,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          },
          "503": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 503,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          },
          "504": {
            "description": "- `close_failed`: The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#close_failed",
                  "title": "Copies not closed",
                  "status": 504,
                  "code": "close_failed",
                  "detail": "The copies couldn't all be closed. Nothing was deleted; the followers handled up to the failure were paused.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#close_failed"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ClosePositions"
          }
        ]
      }
    },
    "/v1/copiers/{copier_id}/events": {
      "parameters": [
        {
          "$ref": "#/components/parameters/CopierId"
        }
      ],
      "get": {
        "operationId": "list_copy_events",
        "tags": [
          "Copy events"
        ],
        "summary": "List copy events",
        "description": "What the copier engine did, or decided not to do, on the copier's followers, newest first. Events are kept for 90 days.\n\nScope: `copiers:read`.",
        "responses": {
          "200": {
            "description": "A page of events.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "RateLimit-Policy": {
                "$ref": "#/components/headers/RateLimit-Policy"
              },
              "RateLimit": {
                "$ref": "#/components/headers/RateLimit"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyEventList"
                },
                "example": {
                  "object": "list",
                  "data": [
                    {
                      "id": 48213,
                      "object": "copy_event",
                      "follower_id": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d",
                      "account_id": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c",
                      "master_ticket": 771203398,
                      "action": "open",
                      "ok": true,
                      "message": "Opened 0.20 lots XAUUSD",
                      "detail": {
                        "symbol": "XAUUSD",
                        "side": "buy",
                        "volume": 0.2,
                        "ticket": 99120443
                      },
                      "received_at": "2026-10-25T14:03:51.204Z",
                      "engine_ms": 0.42,
                      "execution_ms": 182.6,
                      "total_ms": 183.02
                    }
                  ],
                  "has_more": false,
                  "next_cursor": null
                }
              }
            }
          },
          "400": {
            "description": "- `invalid_cursor`: The cursor wasn't one this API returned.\n- `validation_failed`: A field is missing or invalid; see errors.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#invalid_cursor",
                  "title": "Invalid cursor",
                  "status": 400,
                  "code": "invalid_cursor",
                  "detail": "The cursor wasn't one this API returned.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#invalid_cursor"
                }
              }
            }
          },
          "401": {
            "description": "- `authentication_required`: No API key was sent.\n- `invalid_api_key`: The API key is unknown or malformed.\n- `api_key_revoked`: The API key was revoked.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#authentication_required",
                  "title": "Authentication required",
                  "status": 401,
                  "code": "authentication_required",
                  "detail": "No API key was sent.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#authentication_required"
                }
              }
            }
          },
          "403": {
            "description": "- `insufficient_scope`: The API key lacks the scope this endpoint needs.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#insufficient_scope",
                  "title": "Insufficient scope",
                  "status": 403,
                  "code": "insufficient_scope",
                  "detail": "This API key doesn't have the copiers:read scope. Create a key that has it.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#insufficient_scope"
                }
              }
            }
          },
          "404": {
            "description": "- `not_found`: No such resource or endpoint.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#not_found",
                  "title": "Not found",
                  "status": 404,
                  "code": "not_found",
                  "detail": "No such resource or endpoint.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#not_found"
                }
              }
            }
          },
          "429": {
            "description": "- `rate_limited`: Wait for the number of seconds in Retry-After.",
            "headers": {
              "X-Request-Id": {
                "$ref": "#/components/headers/X-Request-Id"
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                },
                "example": {
                  "type": "https://algotradertools.com/docs/errors#rate_limited",
                  "title": "Too many requests",
                  "status": 429,
                  "code": "rate_limited",
                  "detail": "Request was throttled. Expected available in 21 seconds.",
                  "request_id": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e",
                  "doc_url": "https://algotradertools.com/docs/errors#rate_limited"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/FollowerIdFilter"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/Cursor"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "att_…",
        "description": "`Authorization: Bearer att_…`"
      },
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "For tools that can only set a custom header."
      }
    },
    "parameters": {
      "AccountId": {
        "name": "account_id",
        "in": "path",
        "required": true,
        "description": "The account's ID.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
        }
      },
      "CopierId": {
        "name": "copier_id",
        "in": "path",
        "required": true,
        "description": "The copier's ID.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a"
        }
      },
      "FollowerId": {
        "name": "follower_id",
        "in": "path",
        "required": true,
        "description": "The follower's ID (not its account's).",
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d"
        }
      },
      "FollowerIdFilter": {
        "name": "follower_id",
        "in": "query",
        "description": "Only this follower's events.",
        "schema": {
          "type": "string",
          "format": "uuid",
          "example": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d"
        }
      },
      "Limit": {
        "name": "limit",
        "in": "query",
        "description": "Items per page, 1 to 100 (default 50).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 50
        }
      },
      "Cursor": {
        "name": "cursor",
        "in": "query",
        "description": "The `next_cursor` of the previous page. Leave it out for the first page.",
        "schema": {
          "type": "string"
        }
      },
      "ClosePositions": {
        "name": "close_positions",
        "in": "query",
        "description": "`true` pauses copying and closes every copy at market before deleting; if a terminal refuses, nothing is deleted (`close_failed`). `false` leaves the copies open on the followers as ordinary positions.",
        "schema": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "headers": {
      "X-Request-Id": {
        "description": "The request's ID, an opaque string, also in error bodies. Include it in support requests. An `X-Request-Id` you send is replaced.",
        "schema": {
          "type": "string",
          "example": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e"
        }
      },
      "RateLimit-Policy": {
        "description": "The key's limit and window in seconds.",
        "schema": {
          "type": "string",
          "example": "120;w=60"
        }
      },
      "RateLimit": {
        "description": "What's left of the limit, and seconds until the window has room again.",
        "schema": {
          "type": "string",
          "example": "limit=120, remaining=119, reset=60"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before trying again.",
        "schema": {
          "type": "integer",
          "example": 21
        }
      }
    },
    "schemas": {
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The account's ID.",
            "format": "uuid",
            "example": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
          },
          "object": {
            "type": "string",
            "enum": [
              "account"
            ],
            "description": "What this object is."
          },
          "name": {
            "type": "string",
            "description": "Its nickname, or the platform and login.",
            "example": "Gold master"
          },
          "nickname": {
            "type": "string",
            "description": "Empty when none was given.",
            "example": "Gold master"
          },
          "platform": {
            "type": "string",
            "enum": [
              "mt4",
              "mt5"
            ]
          },
          "server": {
            "type": "string",
            "description": "The broker's server.",
            "example": "ICMarketsSC-Demo"
          },
          "login": {
            "type": "integer",
            "description": "The MetaTrader account number.",
            "example": 51234567
          },
          "credential_kind": {
            "type": "string",
            "enum": [
              "investor",
              "master"
            ],
            "description": "Which password it was connected with: `master` can trade, `investor` only reads."
          },
          "can_trade": {
            "type": "boolean",
            "description": "Whether it can place trades, so it can be a follower. Any account can be a master."
          },
          "status": {
            "type": "string",
            "enum": [
              "connecting",
              "connected",
              "error",
              "disconnected"
            ],
            "description": "`connecting` while its terminal starts and logs in (two to three minutes), `connected` once it's ready, `error` when the login failed (see `error`), `disconnected` when its terminal lost the broker or was released."
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Why it's in `error` or `disconnected`, if known."
          },
          "released": {
            "type": "boolean",
            "description": "Its terminal was released after the subscription lapsed. The account and its history are kept: reconnect it to resume."
          },
          "proxy_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "socks5",
              "socks4",
              "http",
              null
            ],
            "description": "The proxy's protocol; null without one."
          },
          "proxy_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "The proxy its terminal reaches the broker through, as `host:port`; null for a direct connection.",
            "example": "198.51.100.10:1080"
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "master",
              "follower",
              null
            ],
            "description": "Whether a copier uses it, and how. An account is never both."
          },
          "figures": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AccountFigures"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          }
        },
        "description": "A MetaTrader 4 or 5 account, connected through its own hosted terminal.",
        "required": [
          "id",
          "object",
          "name",
          "nickname",
          "platform",
          "server",
          "login",
          "credential_kind",
          "can_trade",
          "status",
          "error",
          "released",
          "proxy_type",
          "proxy_address",
          "role",
          "figures",
          "created_at"
        ]
      },
      "AccountFigures": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "number",
            "example": 10000.0
          },
          "equity": {
            "type": "number",
            "example": 10250.5
          },
          "profit": {
            "type": "number",
            "description": "Floating profit or loss of the open positions.",
            "example": 250.5
          },
          "margin": {
            "type": "number",
            "example": 400.0
          },
          "free_margin": {
            "type": "number",
            "example": 9850.5
          },
          "margin_level": {
            "type": [
              "number",
              "null"
            ],
            "description": "In percent; null while no margin is used."
          },
          "currency": {
            "type": "string",
            "description": "As the broker reports it: usually ISO 4217, but also codes such as `USC` (US cents) or `USDT`.",
            "example": "USD"
          },
          "open_positions": {
            "type": "integer",
            "example": 2
          },
          "as_of": {
            "type": "string",
            "description": "When the terminal reported these figures.",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "source": {
            "type": "string",
            "enum": [
              "live",
              "snapshot"
            ],
            "description": "`live`: streamed by the copier engine, at most 30 seconds old. `snapshot`: the last stored snapshot, taken every few minutes."
          }
        },
        "description": "The account's freshest figures.",
        "required": [
          "balance",
          "equity",
          "profit",
          "margin",
          "free_margin",
          "margin_level",
          "currency",
          "open_positions",
          "as_of",
          "source"
        ]
      },
      "AccountRef": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The account's ID.",
            "format": "uuid",
            "example": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
          },
          "name": {
            "type": "string",
            "description": "Its nickname, or the platform and login.",
            "example": "Gold master"
          },
          "platform": {
            "type": "string",
            "enum": [
              "mt4",
              "mt5"
            ]
          },
          "server": {
            "type": "string",
            "description": "The broker's server.",
            "example": "ICMarketsSC-Demo"
          },
          "login": {
            "type": "integer",
            "description": "The MetaTrader account number.",
            "example": 51234567
          },
          "status": {
            "type": "string",
            "enum": [
              "connecting",
              "connected",
              "error",
              "disconnected"
            ],
            "description": "Whether its terminal is connected."
          }
        },
        "description": "An account as other objects show it. Get the account for the rest.",
        "required": [
          "id",
          "name",
          "platform",
          "server",
          "login",
          "status"
        ]
      },
      "AccountList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ],
            "description": "Always `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            },
            "description": "Newest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there's another page: pass `next_cursor` as `cursor`."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next page; null on the last one."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "ConnectAccount": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "enum": [
              "mt4",
              "mt5"
            ],
            "description": "MetaTrader 4 or 5."
          },
          "server": {
            "type": "string",
            "description": "The broker's server, exactly as MetaTrader shows it.",
            "maxLength": 64,
            "example": "ICMarketsSC-Demo"
          },
          "login": {
            "type": "integer",
            "description": "The MetaTrader account number.",
            "example": 51234568
          },
          "password": {
            "type": "string",
            "description": "The master (trading) or investor (read-only) password. It's stored encrypted with the account's terminal and never shown again.",
            "format": "password",
            "writeOnly": true,
            "example": "your-trading-password"
          },
          "credential_kind": {
            "type": "string",
            "enum": [
              "investor",
              "master"
            ],
            "description": "Which password this is. Followers need `master`; a master can be either."
          },
          "nickname": {
            "type": "string",
            "description": "A name to tell it apart.",
            "maxLength": 64,
            "example": "Follower 1"
          },
          "proxy_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "socks5",
              "socks4",
              "http",
              null
            ],
            "description": "The proxy's protocol: `socks5` when there's a proxy but no type."
          },
          "proxy_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "A proxy for the account's terminal to reach the broker through, as `host:port`, so the broker sees the proxy's IP address instead of ours. It's tried before the terminal starts. Left out, empty or null: a direct connection.",
            "maxLength": 255,
            "example": "198.51.100.10:1080"
          },
          "proxy_username": {
            "type": "string",
            "description": "The proxy's username, if it needs one. Stored encrypted with the terminal, like the password, and never shown again.",
            "maxLength": 255,
            "writeOnly": true,
            "example": "trader-de"
          },
          "proxy_password": {
            "type": "string",
            "description": "The proxy's password, if it needs one. Like the username, stored encrypted and never shown again.",
            "format": "password",
            "maxLength": 255,
            "writeOnly": true,
            "example": "your-proxy-password"
          }
        },
        "required": [
          "platform",
          "server",
          "login",
          "password",
          "credential_kind"
        ]
      },
      "ReconnectAccount": {
        "type": "object",
        "properties": {
          "password": {
            "type": "string",
            "description": "The master (trading) or investor (read-only) password. It's stored encrypted with the account's terminal and never shown again.",
            "format": "password",
            "writeOnly": true,
            "example": "your-trading-password"
          },
          "credential_kind": {
            "type": "string",
            "enum": [
              "investor",
              "master"
            ],
            "description": "Which password this is. Followers need `master`; a master can be either."
          },
          "proxy_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "socks5",
              "socks4",
              "http",
              null
            ],
            "description": "Left out: the account's own, or `socks5` for a new proxy."
          },
          "proxy_address": {
            "type": [
              "string",
              "null"
            ],
            "description": "Left out: the account keeps its proxy. A new `host:port` changes it; empty or null connects directly.",
            "maxLength": 255,
            "example": "198.51.100.10:1080"
          },
          "proxy_username": {
            "type": "string",
            "description": "The proxy's username, if it needs one. It wasn't stored, so send it again.",
            "maxLength": 255,
            "writeOnly": true,
            "example": "trader-de"
          },
          "proxy_password": {
            "type": "string",
            "description": "The proxy's password, if it needs one. It wasn't stored either.",
            "format": "password",
            "maxLength": 255,
            "writeOnly": true,
            "example": "your-proxy-password"
          }
        },
        "required": [
          "password",
          "credential_kind"
        ]
      },
      "Copier": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The copier's ID.",
            "format": "uuid",
            "example": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a"
          },
          "object": {
            "type": "string",
            "enum": [
              "copier"
            ],
            "description": "What this object is."
          },
          "name": {
            "type": "string",
            "example": "Gold strategy"
          },
          "is_active": {
            "type": "boolean",
            "description": "False while the copier is paused."
          },
          "master_id": {
            "type": "string",
            "description": "The account that is copied.",
            "format": "uuid",
            "example": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
          },
          "master": {
            "$ref": "#/components/schemas/AccountRef"
          },
          "followers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Follower"
            },
            "description": "Oldest first."
          },
          "open_copies": {
            "type": "integer",
            "description": "Copies open across all followers now.",
            "example": 2
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          }
        },
        "description": "One master account and the followers that copy it.",
        "required": [
          "id",
          "object",
          "name",
          "is_active",
          "master_id",
          "master",
          "followers",
          "open_copies",
          "created_at",
          "updated_at"
        ]
      },
      "CopierList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ],
            "description": "Always `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Copier"
            },
            "description": "Oldest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there's another page: pass `next_cursor` as `cursor`."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next page; null on the last one."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "CreateCopier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "A name to tell it apart.",
            "minLength": 1,
            "maxLength": 64,
            "example": "Gold strategy"
          },
          "master_id": {
            "type": "string",
            "description": "One of your connected accounts that doesn't follow anything. Investor-password accounts can be masters. Several copiers can share a master.",
            "format": "uuid",
            "example": "6f1c2d4e-8a9b-4c3d-9e2f-1a2b3c4d5e6f"
          },
          "is_active": {
            "type": "boolean",
            "description": "Start paused with `false`.",
            "default": true
          }
        },
        "required": [
          "name",
          "master_id"
        ]
      },
      "UpdateCopier": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "example": "Gold strategy v2"
          },
          "is_active": {
            "type": "boolean",
            "description": "Pause every follower with `false`. Copies already open stay and still follow the master's closes and changes. Resuming copies only what the master opens from then on."
          }
        },
        "description": "Only the fields you send change. The master can't change."
      },
      "Follower": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "The follower's ID.",
            "format": "uuid",
            "example": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d"
          },
          "object": {
            "type": "string",
            "enum": [
              "follower"
            ],
            "description": "What this object is."
          },
          "copier_id": {
            "type": "string",
            "description": "Its copier.",
            "format": "uuid",
            "example": "3d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a"
          },
          "account_id": {
            "type": "string",
            "description": "The account that copies.",
            "format": "uuid",
            "example": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c"
          },
          "account": {
            "$ref": "#/components/schemas/AccountRef"
          },
          "is_active": {
            "type": "boolean",
            "description": "False while this follower is paused."
          },
          "magic": {
            "type": "integer",
            "description": "The magic number on every order placed for this follower. Each copy's comment is `att:` and the master's ticket in base 36.",
            "example": 1844674407
          },
          "lot_mode": {
            "type": "string",
            "enum": [
              "multiplier",
              "fixed",
              "balance_ratio",
              "equity_ratio",
              "risk_percent"
            ],
            "description": "How each copy is sized. `multiplier`: the master's lots times `lot_value`. `fixed`: `lot_value` lots on every copy. `balance_ratio` / `equity_ratio`: the master's lots scaled by this account's balance or equity against the master's, times `lot_value`. `risk_percent`: sized so the master's stop loss risks `lot_value` percent of this account's equity; trades without a stop loss are skipped."
          },
          "lot_value": {
            "type": "number",
            "description": "The multiplier, the lot size or the risk percentage, by `lot_mode`. Above 0 and up to 1000; up to 100 for `risk_percent`. Up to four decimal places.",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "example": 1
          },
          "adjust_contract_size": {
            "type": "boolean",
            "description": "Even out different contract sizes between the brokers (gold can be 100 oz a lot at one broker and 10 oz at another). Applies to `multiplier` and the ratio modes."
          },
          "below_minimum": {
            "type": "string",
            "enum": [
              "minimum",
              "skip"
            ],
            "description": "When a copy comes out below the broker's minimum lot: trade the minimum, or skip it."
          },
          "max_lot": {
            "type": [
              "number",
              "null"
            ],
            "description": "The most lots one copy may have; null for no limit.",
            "exclusiveMinimum": 0
          },
          "reverse": {
            "type": "boolean",
            "description": "Sell when the master buys and the other way round; stop loss and take profit swap."
          },
          "copy_stops": {
            "type": "boolean",
            "description": "Copy stop loss and take profit, including later changes."
          },
          "max_slippage_pips": {
            "type": [
              "number",
              "null"
            ],
            "description": "The slippage allowed per order; null uses the broker's default.",
            "minimum": 0
          },
          "max_delay_seconds": {
            "type": "integer",
            "description": "How late a master trade may still be copied, for example after a reconnect; older ones are skipped.",
            "minimum": 0,
            "maximum": 3600
          },
          "copy_existing": {
            "type": "boolean",
            "description": "Also copy the positions and pending orders the master already has when the follower is attached. Nothing the master opens or places during a pause is ever copied."
          },
          "copy_pending": {
            "type": "boolean",
            "description": "Place the master's pending orders on the follower as pending orders, and follow their changes, rather than copying them once they fill. Needs both terminals on the current version."
          },
          "symbol_filter": {
            "type": "string",
            "enum": [
              "all",
              "include",
              "exclude"
            ],
            "description": "`all` copies every symbol, `include` only those in `symbols`, `exclude` all but them."
          },
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "maxItems": 200,
            "description": "The master's symbol names for `symbol_filter`, which needs at least one unless it is `all`. `XAUUSD` also covers decorated names such as `XAUUSD.m`.",
            "example": [
              "XAUUSD",
              "EURUSD"
            ]
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            },
            "maxItems": 14,
            "description": "When new trades are copied; empty means any time. Closes and changes to copies already open are always copied."
          },
          "timezone": {
            "type": "string",
            "description": "The clock `sessions` are read on: `broker` (the master broker's server time, as its MetaTrader charts show it) or a time zone name such as `Europe/London`.",
            "example": "broker"
          },
          "symbol_map": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 32
            },
            "maxProperties": 200,
            "description": "Master symbol to follower symbol, for names that don't match by themselves. Matching tries this map, then the same name, the name without the broker's decorations (`EURUSD.m`, `US30.cash`), then known aliases (`XAUUSD` and `GOLD`); anything still ambiguous is skipped, never guessed.",
            "example": {
              "XAUUSD": "GOLD.m"
            }
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FollowerStatus"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          }
        },
        "description": "An account that copies a copier's master, with its own rules.",
        "required": [
          "id",
          "object",
          "copier_id",
          "account_id",
          "account",
          "is_active",
          "magic",
          "lot_mode",
          "lot_value",
          "adjust_contract_size",
          "below_minimum",
          "max_lot",
          "reverse",
          "copy_stops",
          "max_slippage_pips",
          "max_delay_seconds",
          "copy_existing",
          "copy_pending",
          "symbol_filter",
          "symbols",
          "sessions",
          "timezone",
          "symbol_map",
          "status",
          "created_at",
          "updated_at"
        ]
      },
      "FollowerStatus": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "starting",
              "copying",
              "paused",
              "error"
            ],
            "description": "`starting` while the engine connects, `copying`, `paused` (the follower or its copier is paused, or Equity Guard holds copying back), or `error` (see `message`)."
          },
          "message": {
            "type": "string",
            "description": "Why it needs attention, or `Paused by Equity Guard.` while Equity Guard holds copying back; empty otherwise."
          },
          "master_connected": {
            "type": "boolean",
            "description": "The engine's stream from the master's terminal is up."
          },
          "follower_connected": {
            "type": "boolean",
            "description": "The engine's stream from this account's terminal is up."
          },
          "open_copies": {
            "type": "integer",
            "description": "Copies open on this account now.",
            "example": 2
          },
          "last_event_at": {
            "type": [
              "string",
              "null"
            ],
            "description": "When the engine last did something here.",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "balance": {
            "type": [
              "number",
              "null"
            ],
            "description": "This account's balance as the engine last saw it."
          },
          "equity": {
            "type": [
              "number",
              "null"
            ],
            "description": "This account's equity as the engine last saw it."
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "heartbeat_at": {
            "type": "string",
            "description": "When the engine last reported; at least every 15 seconds.",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "engine_online": {
            "type": "boolean",
            "description": "False when the engine hasn't reported for 60 seconds."
          }
        },
        "description": "What the copier engine reports about a follower, as of `heartbeat_at`.",
        "required": [
          "state",
          "message",
          "master_connected",
          "follower_connected",
          "open_copies",
          "last_event_at",
          "balance",
          "equity",
          "currency",
          "heartbeat_at",
          "engine_online"
        ]
      },
      "FollowerList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ],
            "description": "Always `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Follower"
            },
            "description": "Oldest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there's another page: pass `next_cursor` as `cursor`."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next page; null on the last one."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "AddFollower": {
        "type": "object",
        "properties": {
          "account_id": {
            "type": "string",
            "description": "One of your connected accounts: connected with its master password, not this copier's master, not a master anywhere and not already copying this master.",
            "format": "uuid",
            "example": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c"
          },
          "is_active": {
            "type": "boolean",
            "description": "Start paused with `false`.",
            "default": true
          },
          "lot_mode": {
            "type": "string",
            "enum": [
              "multiplier",
              "fixed",
              "balance_ratio",
              "equity_ratio",
              "risk_percent"
            ],
            "description": "How each copy is sized. `multiplier`: the master's lots times `lot_value`. `fixed`: `lot_value` lots on every copy. `balance_ratio` / `equity_ratio`: the master's lots scaled by this account's balance or equity against the master's, times `lot_value`. `risk_percent`: sized so the master's stop loss risks `lot_value` percent of this account's equity; trades without a stop loss are skipped.",
            "default": "multiplier"
          },
          "lot_value": {
            "type": "number",
            "description": "The multiplier, the lot size or the risk percentage, by `lot_mode`. Above 0 and up to 1000; up to 100 for `risk_percent`. Up to four decimal places.",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "default": 1,
            "example": 1
          },
          "adjust_contract_size": {
            "type": "boolean",
            "description": "Even out different contract sizes between the brokers (gold can be 100 oz a lot at one broker and 10 oz at another). Applies to `multiplier` and the ratio modes.",
            "default": true
          },
          "below_minimum": {
            "type": "string",
            "enum": [
              "minimum",
              "skip"
            ],
            "description": "When a copy comes out below the broker's minimum lot: trade the minimum, or skip it.",
            "default": "minimum"
          },
          "max_lot": {
            "type": [
              "number",
              "null"
            ],
            "description": "The most lots one copy may have; null for no limit.",
            "exclusiveMinimum": 0,
            "default": null
          },
          "reverse": {
            "type": "boolean",
            "description": "Sell when the master buys and the other way round; stop loss and take profit swap.",
            "default": false
          },
          "copy_stops": {
            "type": "boolean",
            "description": "Copy stop loss and take profit, including later changes.",
            "default": true
          },
          "max_slippage_pips": {
            "type": [
              "number",
              "null"
            ],
            "description": "The slippage allowed per order; null uses the broker's default.",
            "minimum": 0
          },
          "max_delay_seconds": {
            "type": "integer",
            "description": "How late a master trade may still be copied, for example after a reconnect; older ones are skipped.",
            "minimum": 0,
            "maximum": 3600,
            "default": 60
          },
          "copy_existing": {
            "type": "boolean",
            "description": "Also copy the positions and pending orders the master already has when the follower is attached. Nothing the master opens or places during a pause is ever copied.",
            "default": false
          },
          "copy_pending": {
            "type": "boolean",
            "description": "Place the master's pending orders on the follower as pending orders, and follow their changes, rather than copying them once they fill. Needs both terminals on the current version.",
            "default": false
          },
          "symbol_filter": {
            "type": "string",
            "enum": [
              "all",
              "include",
              "exclude"
            ],
            "description": "`all` copies every symbol, `include` only those in `symbols`, `exclude` all but them.",
            "default": "all"
          },
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "maxItems": 200,
            "default": [],
            "description": "The master's symbol names for `symbol_filter`, which needs at least one unless it is `all`. `XAUUSD` also covers decorated names such as `XAUUSD.m`.",
            "example": [
              "XAUUSD",
              "EURUSD"
            ]
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            },
            "maxItems": 14,
            "default": [],
            "description": "When new trades are copied; empty means any time. Closes and changes to copies already open are always copied."
          },
          "timezone": {
            "type": "string",
            "description": "The clock `sessions` are read on: `broker` (the master broker's server time, as its MetaTrader charts show it) or a time zone name such as `Europe/London`.",
            "default": "broker",
            "example": "broker"
          },
          "symbol_map": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 32
            },
            "maxProperties": 200,
            "default": {},
            "description": "Master symbol to follower symbol, for names that don't match by themselves. Matching tries this map, then the same name, the name without the broker's decorations (`EURUSD.m`, `US30.cash`), then known aliases (`XAUUSD` and `GOLD`); anything still ambiguous is skipped, never guessed.",
            "example": {
              "XAUUSD": "GOLD.m"
            }
          }
        },
        "required": [
          "account_id"
        ]
      },
      "UpdateFollower": {
        "type": "object",
        "properties": {
          "is_active": {
            "type": "boolean",
            "description": "Pause with `false`. Resuming copies only what the master opens from then on, also with `copy_existing`."
          },
          "lot_mode": {
            "type": "string",
            "enum": [
              "multiplier",
              "fixed",
              "balance_ratio",
              "equity_ratio",
              "risk_percent"
            ],
            "description": "How each copy is sized. `multiplier`: the master's lots times `lot_value`. `fixed`: `lot_value` lots on every copy. `balance_ratio` / `equity_ratio`: the master's lots scaled by this account's balance or equity against the master's, times `lot_value`. `risk_percent`: sized so the master's stop loss risks `lot_value` percent of this account's equity; trades without a stop loss are skipped."
          },
          "lot_value": {
            "type": "number",
            "description": "The multiplier, the lot size or the risk percentage, by `lot_mode`. Above 0 and up to 1000; up to 100 for `risk_percent`. Up to four decimal places.",
            "exclusiveMinimum": 0,
            "maximum": 1000,
            "example": 1
          },
          "adjust_contract_size": {
            "type": "boolean",
            "description": "Even out different contract sizes between the brokers (gold can be 100 oz a lot at one broker and 10 oz at another). Applies to `multiplier` and the ratio modes."
          },
          "below_minimum": {
            "type": "string",
            "enum": [
              "minimum",
              "skip"
            ],
            "description": "When a copy comes out below the broker's minimum lot: trade the minimum, or skip it."
          },
          "max_lot": {
            "type": [
              "number",
              "null"
            ],
            "description": "The most lots one copy may have; null for no limit.",
            "exclusiveMinimum": 0
          },
          "reverse": {
            "type": "boolean",
            "description": "Sell when the master buys and the other way round; stop loss and take profit swap."
          },
          "copy_stops": {
            "type": "boolean",
            "description": "Copy stop loss and take profit, including later changes."
          },
          "max_slippage_pips": {
            "type": [
              "number",
              "null"
            ],
            "description": "The slippage allowed per order; null uses the broker's default.",
            "minimum": 0
          },
          "max_delay_seconds": {
            "type": "integer",
            "description": "How late a master trade may still be copied, for example after a reconnect; older ones are skipped.",
            "minimum": 0,
            "maximum": 3600
          },
          "copy_existing": {
            "type": "boolean",
            "description": "Also copy the positions and pending orders the master already has when the follower is attached. Nothing the master opens or places during a pause is ever copied."
          },
          "copy_pending": {
            "type": "boolean",
            "description": "Place the master's pending orders on the follower as pending orders, and follow their changes, rather than copying them once they fill. Needs both terminals on the current version."
          },
          "symbol_filter": {
            "type": "string",
            "enum": [
              "all",
              "include",
              "exclude"
            ],
            "description": "`all` copies every symbol, `include` only those in `symbols`, `exclude` all but them."
          },
          "symbols": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 32
            },
            "maxItems": 200,
            "description": "The master's symbol names for `symbol_filter`, which needs at least one unless it is `all`. `XAUUSD` also covers decorated names such as `XAUUSD.m`.",
            "example": [
              "XAUUSD",
              "EURUSD"
            ]
          },
          "sessions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Session"
            },
            "maxItems": 14,
            "description": "When new trades are copied; empty means any time. Closes and changes to copies already open are always copied."
          },
          "timezone": {
            "type": "string",
            "description": "The clock `sessions` are read on: `broker` (the master broker's server time, as its MetaTrader charts show it) or a time zone name such as `Europe/London`.",
            "example": "broker"
          },
          "symbol_map": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "maxLength": 32
            },
            "maxProperties": 200,
            "description": "Master symbol to follower symbol, for names that don't match by themselves. Matching tries this map, then the same name, the name without the broker's decorations (`EURUSD.m`, `US30.cash`), then known aliases (`XAUUSD` and `GOLD`); anything still ambiguous is skipped, never guessed.",
            "example": {
              "XAUUSD": "GOLD.m"
            }
          }
        },
        "description": "Only the fields you send change. The account can't change."
      },
      "Session": {
        "type": "object",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            },
            "minItems": 1,
            "description": "0 is Monday, 6 Sunday.",
            "example": [
              0,
              1,
              2,
              3,
              4
            ]
          },
          "start": {
            "type": "string",
            "description": "`HH:MM`, 24-hour.",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "example": "07:00"
          },
          "end": {
            "type": "string",
            "description": "`HH:MM`. An end before its start runs past midnight.",
            "pattern": "^([01]\\d|2[0-3]):[0-5]\\d$",
            "example": "16:30"
          }
        },
        "description": "A window in which new trades are copied.",
        "required": [
          "days",
          "start",
          "end"
        ]
      },
      "CopyEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 48213
          },
          "object": {
            "type": "string",
            "enum": [
              "copy_event"
            ],
            "description": "What this object is."
          },
          "follower_id": {
            "type": "string",
            "description": "The follower it happened on.",
            "format": "uuid",
            "example": "9a8b7c6d-5e4f-4a3b-9c2d-1e0f9a8b7c6d"
          },
          "account_id": {
            "type": "string",
            "description": "That follower's account.",
            "format": "uuid",
            "example": "0b7e5c1a-2f3d-4e6a-8b9c-7d6e5f4a3b2c"
          },
          "master_ticket": {
            "type": "integer",
            "description": "The master position it's about.",
            "example": 771203398
          },
          "action": {
            "type": "string",
            "enum": [
              "open",
              "close",
              "partial_close",
              "modify",
              "skip",
              "adopt",
              "place",
              "cancel"
            ],
            "description": "`open`, `close`, `partial_close`, `modify` (stop loss or take profit, or a pending order moved), `skip` (decided not to copy; see `message`), `adopt` (took over a copy it found on the follower after a restart), `place` (placed a pending order for the master's) or `cancel` (cancelled one)."
          },
          "ok": {
            "type": "boolean",
            "description": "Whether it worked."
          },
          "message": {
            "type": "string",
            "example": "Opened 0.20 lots XAUUSD"
          },
          "detail": {
            "type": "object",
            "additionalProperties": true,
            "description": "The request and the terminal's answer. Keys vary by action, for example `symbol`, `side`, `volume`, `price`, `ticket`, `stopLoss`, `takeProfit`, `retcode` and `outcome`.",
            "example": {
              "symbol": "XAUUSD",
              "side": "buy",
              "volume": 0.2,
              "ticket": 99120443
            }
          },
          "received_at": {
            "type": "string",
            "description": "When the engine heard about the master's change.",
            "format": "date-time",
            "example": "2026-10-25T14:03:51.204Z"
          },
          "engine_ms": {
            "type": [
              "number",
              "null"
            ],
            "description": "The engine's own time to the order going out."
          },
          "execution_ms": {
            "type": [
              "number",
              "null"
            ],
            "description": "The follower broker's time to answer the order."
          },
          "total_ms": {
            "type": [
              "number",
              "null"
            ],
            "description": "Both together."
          }
        },
        "description": "One thing the copier engine did, or decided not to do, on a follower.",
        "required": [
          "id",
          "object",
          "follower_id",
          "account_id",
          "master_ticket",
          "action",
          "ok",
          "message",
          "detail",
          "received_at",
          "engine_ms",
          "execution_ms",
          "total_ms"
        ]
      },
      "CopyEventList": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "list"
            ],
            "description": "Always `list`."
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopyEvent"
            },
            "description": "Newest first."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there's another page: pass `next_cursor` as `cursor`."
          },
          "next_cursor": {
            "type": [
              "string",
              "null"
            ],
            "description": "The cursor of the next page; null on the last one."
          }
        },
        "required": [
          "object",
          "data",
          "has_more",
          "next_cursor"
        ]
      },
      "Problem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Where this code is documented.",
            "format": "uri"
          },
          "title": {
            "type": "string",
            "description": "A short summary of the code."
          },
          "status": {
            "type": "integer",
            "description": "The HTTP status, repeated."
          },
          "code": {
            "type": "string",
            "enum": [
              "validation_failed",
              "invalid_json",
              "invalid_cursor",
              "invalid_credentials",
              "server_not_found",
              "already_connected",
              "proxy_unreachable",
              "connect_rejected",
              "authentication_required",
              "invalid_api_key",
              "api_key_revoked",
              "insufficient_scope",
              "plan_limit_reached",
              "not_found",
              "method_not_allowed",
              "not_acceptable",
              "account_in_use",
              "account_not_released",
              "unsupported_media_type",
              "rate_limited",
              "internal_error",
              "close_failed",
              "disconnect_failed",
              "terminal_unreachable",
              "terminal_unavailable",
              "connect_unavailable",
              "terminal_timeout"
            ],
            "description": "What went wrong. Branch on this, not on `title` or `detail`."
          },
          "detail": {
            "type": "string",
            "description": "What went wrong in this case."
          },
          "errors": {
            "type": "array",
            "description": "Only for `validation_failed`: one entry per problem.",
            "items": {
              "type": "object",
              "properties": {
                "path": {
                  "type": "string",
                  "description": "JSON Pointer to the field, such as `/lot_value` (`/close_positions` for a query parameter); `\"\"` for the request as a whole.",
                  "example": "/lot_value"
                },
                "code": {
                  "type": "string",
                  "description": "A stable code: ours (`already_connected`, `account_released`, `account_not_connected`, `account_is_master`, `account_is_follower`, `already_following`, `self_copy`, `read_only_account`, `netting_account`, `automated_trading_off`, `immutable`, `unknown_field`) or a generic one such as `required`, `invalid`, `invalid_choice` or `does_not_exist`.",
                  "example": "invalid"
                },
                "message": {
                  "type": "string",
                  "example": "Use a number above 0 and up to 1000."
                }
              },
              "required": [
                "path",
                "code",
                "message"
              ]
            }
          },
          "request_id": {
            "type": "string",
            "example": "b7c1e2d4-5f6a-4b8c-9d0e-1f2a3b4c5d6e"
          },
          "doc_url": {
            "type": "string",
            "description": "Same as `type`.",
            "format": "uri"
          }
        },
        "description": "RFC 9457 problem details, served as `application/problem+json`.",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "detail",
          "request_id",
          "doc_url"
        ]
      }
    }
  }
}
