{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fxsocket-com/json-schema/fxsocket-com-post-v1-orders-close-request-schema.json",
  "title": "PostV1OrdersCloseRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/fxsocket-com-openapi-generated.yml#/components/schemas/PostV1OrdersCloseRequest",
  "type": "object",
  "properties": {
    "defaults": {
      "type": "object",
      "description": "Selector values every account inherits: symbol, symbol_match, side, kind, magic, volume, slippage."
    },
    "accounts": {
      "type": "array",
      "description": "One entry per account."
    },
    "accounts[].account_id": {
      "type": "string",
      "description": "Account identifier."
    },
    "accounts[].symbol": {
      "type": "string",
      "description": "Symbol to close for this account."
    },
    "accounts[].symbol_match": {
      "type": "string",
      "description": "Match mode for symbol (exact or base)."
    },
    "accounts[].side": {
      "type": "string",
      "description": "long, short, or any."
    },
    "accounts[].kind": {
      "type": "string",
      "description": "position, pending, or any."
    },
    "accounts[].volume": {
      "type": "number",
      "description": "Partial close volume."
    },
    "accounts[].tickets": {
      "type": "array",
      "description": "Exact tickets to close on this account."
    },
    "accounts[].require_reachable": {
      "type": "boolean",
      "description": "Reject batch if any account has no terminal."
    }
  },
  "required": [
    "accounts",
    "accounts[].account_id"
  ]
}