{
  "openapi": "3.0.0",
  "info": {
    "title": "Sigrex API",
    "version": "2.1.0",
    "description": "\n            ## Sigrex API\n\n{% hint style=\"info\" %}\nThis API uses **HMAC or ML-DSA44 authentication**.  \nEvery request must be signed using your API secret.\n{% endhint %}\n\n{% tabs %}\n\n{% tab title=\"Production\" %}\n\n**Base URL**\n\n`https://api.sigrex.io/api/v2`\n\n{% endtab %}\n\n{% endtabs %}\n\n---\n\n### Getting Started\n\n{% stepper %}\n\n{% step %}\n\n### Create an account\n\nCreate a Sigrex account in the dashboard.\n\n{% endstep %}\n\n{% step %}\n\n### Generate an API key\n\nNavigate to **API Management** and create a new key.\n\n{% endstep %}\n\n{% step %}\n\n### Sign your request\n\nAll requests must include the following headers:\n\n| Header | Description |\n|------|------|\n| `api-key` | Your public API key |\n| `timestamp` | Current unix timestamp |\n| `signature` | HMAC SHA256 or ML-DSA44 signature |\n\n{% endstep %}\n\n{% step %}\n\n### Make your first request\n\n`GET strategy/llm-session`\n\n{% endstep %}\n\n{% endstepper %}\n\n---\n\n### Signature generation examples\n\n{% hint style=\"info\" %}\nSignatures are generated using **HMAC SHA256** or **ML-DSA44** and your API secret.\n\nGET / DELETE requests use:\n\nMETHOD + PATH + TIMESTAMP\n\nPOST / PUT requests use:\n\nMETHOD + PATH + BODY + TIMESTAMP\n{% endhint %}\n\n#### HMAC SHA256 (GET request)\n\n```ts\nimport crypto from \"crypto\"\n\nconst API_KEY = \"your_public_api_key\"\nconst API_SECRET = \"your_private_api_secret\"\n\nconst method = \"GET\"\nconst path = \"/api/v2/strategy/llm-session\"\nconst timestamp = Math.floor(Date.now() / 1000).toString()\n\nconst message = method + path + timestamp\n\nconst signature = crypto\n  .createHmac(\"sha256\", API_SECRET)\n  .update(message)\n  .digest(\"hex\")\n\n```\n\n#### ML-DSA44 (GET request)\n\n```ts\nimport { createMLDSA44 } from \"@oqs/liboqs-js\"\n\nconst API_KEY = \"your_public_api_key\"\nconst PRIVATE_KEY_B64 = \"your_private_key_base64\"\n\nconst method = \"GET\"\nconst path = \"/api/v2/strategy/llm-session\"\nconst timestamp = Math.floor(Date.now() / 1000).toString()\n\nconst message = new TextEncoder().encode(\n  method + path + timestamp\n)\n\nconst sig = await createMLDSA44()\n\nconst signature = sig.sign(\n  message,\n  Uint8Array.from(Buffer.from(PRIVATE_KEY_B64, \"base64\"))\n)\n\nconst signatureB64 = Buffer.from(signature).toString(\"base64\")\n\nsig.destroy()\n\n```\n\n#### HMAC SHA256 (POST request)\n\n```ts\nimport crypto from \"crypto\"\n\nconst API_KEY = \"your_public_api_key\"\nconst API_SECRET = \"your_private_api_secret\"\n\nconst method = \"POST\"\nconst path = \"/api/v2/strategy/llm-session\"\n\nconst body = {\n  name: \"My Strategy\",\n  cron_interval: \"15M\"\n}\n\nconst timestamp = Math.floor(Date.now() / 1000).toString()\n\nconst payload =\n   method + path + JSON.stringify(body) + timestamp\n\nconst signature = crypto\n  .createHmac(\"sha256\", API_SECRET)\n  .update(payload)\n  .digest(\"hex\")\n  \n```\n\n#### ML-DSA44 (POST request)\n\n```ts\nimport { createMLDSA44 } from \"@oqs/liboqs-js\"\n\nconst API_KEY = \"your_public_api_key\"\nconst PRIVATE_KEY_B64 = \"your_private_key_base64\"\n\nconst method = \"POST\"\nconst path = \"/api/v2/strategy/llm-session\"\n\nconst body = {\n  name: \"My Strategy\",\n  cron_interval: \"15M\"\n}\n\nconst timestamp = Math.floor(Date.now() / 1000).toString()\n\nconst payload =\n  method + path + JSON.stringify(body) + timestamp\n\nconst message = new TextEncoder().encode(payload)\n\nconst sig = await createMLDSA44()\n\nconst signature = sig.sign(\n  message,\n  Uint8Array.from(Buffer.from(PRIVATE_KEY_B64, \"base64\"))\n)\n\nconst signatureB64 = Buffer.from(signature).toString(\"base64\")\n\nsig.destroy()\n  \n```\n\n---\n\n### Example request\n\n```bash\ncurl https://api.sigrex.io/api/v2/strategy/sessions \\\n  -H \"api-key: YOUR_API_KEY\" \\\n  -H \"timestamp: 1700000000\" \\\n  -H \"signature: GENERATED_SIGNATURE\"\n```\n\n{% hint style=\"warning\" %}\nNever expose your **API secret** in frontend code.  \nAlways generate signatures on your backend.\n{% endhint %}\n"
  },
  "servers": [
    {
      "url": "https://api.sigrex.io"
    }
  ],
  "security": [
    {
      "ApiKey": [],
      "Signature": [],
      "Timestamp": []
    }
  ],
  "tags": [
    {
      "name": "exchanges",
      "x-page-title": "Exchanges",
      "x-page-icon": "building-columns"
    },
    {
      "name": "strategies",
      "x-page-title": "Strategies",
      "x-page-icon": "chart-line"
    },
    {
      "name": "llm-session",
      "x-parent": "strategies",
      "x-page-title": "LLM Sessions"
    },
    {
      "name": "code",
      "x-parent": "strategies",
      "x-page-title": "Code Strategies"
    },
    {
      "name": "reaction",
      "x-parent": "strategies",
      "x-page-title": "Reactions"
    },
    {
      "name": "llm-reaction",
      "x-parent": "reaction",
      "x-page-title": "LLM Reaction"
    },
    {
      "name": "code-reaction",
      "x-parent": "reaction",
      "x-page-title": "Code Reaction"
    },
    {
      "name": "signal-bot",
      "x-page-title": "Signal Bots",
      "x-page-icon": "robot"
    },
    {
      "name": "cex-bot",
      "x-parent": "signal-bot",
      "x-page-title": "CEX Bot"
    },
    {
      "name": "dex-bot",
      "x-parent": "signal-bot",
      "x-page-title": "DEX Bot"
    },
    {
      "name": "prediction-bot",
      "x-parent": "signal-bot",
      "x-page-title": "Prediction Bot"
    },
    {
      "name": "hooks",
      "x-page-title": "Hooks",
      "x-page-icon": "webhook"
    },
    {
      "name": "bot-hook",
      "x-parent": "hooks",
      "x-page-title": "Bot Hooks"
    },
    {
      "name": "data-hook",
      "x-parent": "hooks",
      "x-page-title": "Data Hooks"
    },
    {
      "name": "api-keys",
      "x-page-title": "API Keys",
      "x-page-icon": "key"
    },
    {
      "name": "llm-api-keys",
      "x-parent": "api-keys",
      "x-page-title": "LLM API Keys"
    },
    {
      "name": "exchange-api-keys",
      "x-parent": "api-keys",
      "x-page-title": "Exchange API Keys"
    },
    {
      "name": "prediction-api-keys",
      "x-parent": "api-keys",
      "x-page-title": "Prediction API Keys"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "api-key",
        "description": "Your public API key"
      },
      "Signature": {
        "type": "apiKey",
        "in": "header",
        "name": "signature",
        "description": "HMAC SHA256 or ML-DSA44 signature of the request"
      },
      "Timestamp": {
        "type": "apiKey",
        "in": "header",
        "name": "timestamp",
        "description": "Unix timestamp used for request signing"
      }
    },
    "schemas": {
      "SuccessResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Success"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Error"
          }
        }
      },
      "UpdateStatusRequest": {
        "type": "object",
        "required": [
          "status"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ],
            "example": "ACTIVE"
          }
        }
      },
      "CreateFolderRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "example": "My Folder"
          }
        }
      },
      "UpdateFolderRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "example": "My Folder"
          }
        }
      },
      "CreateExchangeApiKeyRequest": {
        "type": "object",
        "required": [
          "exchangeId",
          "publicKey",
          "privateKey"
        ],
        "properties": {
          "exchangeId": {
            "type": "number",
            "description": "The id of a CEX exchange",
            "example": "1"
          },
          "name": {
            "type": "string",
            "description": "The name of the API key max 255 characters",
            "example": "My API Key"
          },
          "publicKey": {
            "type": "string",
            "example": "mx0vglashYu7egJuhnN0"
          },
          "privateKey": {
            "type": "string",
            "example": "745c547aSBp89bs450fb1dfacf86af8ed32"
          },
          "extra": {
            "type": "string",
            "description": "Some extra value if required, depends on the exchange",
            "example": "Bd8r9sf97rLqZ7"
          }
        }
      },
      "TestApiKeyRequest": {
        "type": "object",
        "required": [
          "exchangeId",
          "publicKey",
          "privateKey"
        ],
        "properties": {
          "exchangeId": {
            "type": "number",
            "description": "The id of a CEX exchange",
            "example": "1"
          },
          "publicKey": {
            "type": "string",
            "example": "mx0vglashYu7egJuhnN0"
          },
          "privateKey": {
            "type": "string",
            "example": "745c547aSBp89bs450fb1dfacf86af8ed32"
          },
          "extra": {
            "type": "sting",
            "description": "Some extra value if required, depends on the exchange",
            "example": "Bd8r9sf97rLqZ7"
          }
        }
      },
      "UpdateModelRequest": {
        "type": "object",
        "required": [
          "modelId"
        ],
        "properties": {
          "modelId": {
            "type": "number",
            "description": "The id of a LLM model",
            "example": "3"
          }
        }
      },
      "CreateLLMApiKeyRequest": {
        "type": "object",
        "required": [
          "serviceId",
          "modelId",
          "apiKey"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the API key max 255 characters",
            "example": "My API Key"
          },
          "serviceId": {
            "type": "number",
            "description": "The id of a LLM service",
            "example": "1"
          },
          "modelId": {
            "type": "number",
            "description": "The id of a LLM model",
            "example": "5"
          },
          "apiKey": {
            "type": "string",
            "example": "745c547aSBp89bs450fb1dfacf86af8ed32"
          }
        }
      },
      "CreatePredictionApiKeyRequest": {
        "type": "object",
        "required": [
          "exchangeId",
          "funderAddress",
          "walletPrivateKey"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the API key max 255 characters",
            "example": "My API Key"
          },
          "exchangeId": {
            "type": "number",
            "description": "The id of a Exchange",
            "example": "1"
          },
          "funderAddress": {
            "type": "string",
            "description": "PolyMarket platform funder address",
            "example": "0x0fca5sdvv94baa59a362a83sdf31d9c4a25970effe68"
          },
          "walletPrivateKey": {
            "type": "string",
            "description": "Signer wallet private key",
            "example": "dfgsdfgsdfmnc3n39745c547aSBp89bs450fb1dfacf86af8ed32"
          }
        }
      },
      "TestPredictionApiKeyRequest": {
        "type": "object",
        "required": [
          "exchangeId",
          "funderAddress",
          "walletPrivateKey"
        ],
        "properties": {
          "exchangeId": {
            "type": "number",
            "description": "The id of a Exchange",
            "example": "1"
          },
          "funderAddress": {
            "type": "number",
            "description": "PolyMarket platform funder address",
            "example": "0x0fca5sdvv94baa59a362a83sdf31d9c4a25970effe68"
          },
          "walletPrivateKey": {
            "type": "string",
            "description": "Signer wallet private key",
            "example": "dfgsdfgsdfmnc3n39745c547aSBp89bs450fb1dfacf86af8ed32"
          }
        }
      },
      "CreateCexSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "api_id",
          "symbol",
          "amount_from_signal"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "api_id": {
            "type": "number",
            "description": "The id of a bot CEX API key",
            "example": "2"
          },
          "symbol": {
            "type": "string",
            "description": "The symbol of the bot",
            "example": "BTCUSDT"
          },
          "pair_base": {
            "type": "string",
            "description": "The base currency of the pair (On ALPACA not required)",
            "example": "BTC"
          },
          "pair_quote": {
            "type": "string",
            "description": "The quote currency of the pair (On ALPACA not required)",
            "example": "USDT"
          },
          "amount_from_signal": {
            "type": "boolean",
            "description": "Set if amount is coming from signal",
            "example": false
          },
          "amount": {
            "type": "number",
            "description": "The amount to trade (if amount_from_signal is false)",
            "example": 150
          },
          "is_quote": {
            "type": "boolean",
            "description": "Set if the amount is in quote currency",
            "example": true
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "UpdateCexSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "api_id",
          "symbol",
          "amount_from_signal"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "api_id": {
            "type": "number",
            "description": "The id of a bot CEX API key",
            "example": "2"
          },
          "symbol": {
            "type": "string",
            "description": "The symbol of the bot",
            "example": "BTCUSDT"
          },
          "pair_base": {
            "type": "string",
            "description": "The base currency of the pair (On ALPACA not required)",
            "example": "BTC"
          },
          "pair_quote": {
            "type": "string",
            "description": "The quote currency of the pair (On ALPACA not required)",
            "example": "USDT"
          },
          "amount_from_signal": {
            "type": "boolean",
            "description": "Set if amount is coming from signal",
            "example": false
          },
          "amount": {
            "type": "number",
            "description": "The amount to trade (if amount_from_signal is false)",
            "example": 150
          },
          "is_quote": {
            "type": "boolean",
            "description": "Set if the amount is in quote currency",
            "example": true
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "CreateDexSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "factory_id",
          "chain_id",
          "symbol",
          "address"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "factory_id": {
            "type": "number",
            "description": "The id of a bot factory",
            "example": "1"
          },
          "chain_id": {
            "type": "number",
            "description": "The id of a chain",
            "example": "137"
          },
          "address": {
            "type": "string",
            "description": "The address of the bot",
            "example": "0x1234567890123456789012345678901234567890"
          },
          "symbol": {
            "type": "string",
            "description": "The symbol of the bot",
            "example": "BTC"
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "UpdateDexSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "symbol"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "symbol": {
            "type": "string",
            "description": "The symbol of the bot",
            "example": "BTC"
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "CreatePredictionSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "api_id",
          "url",
          "amount_from_signal",
          "amount"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "api_id": {
            "type": "number",
            "description": "The id of a bot Prediction API key",
            "example": "2"
          },
          "url": {
            "type": "string",
            "description": "The market url",
            "example": "https://polymarket.com/event/elon-musk-of-tweets-april-21-april-28/elon-musk-of-tweets-april-21-april-28-180-199#xpkQ2pz"
          },
          "amount_from_signal": {
            "type": "boolean",
            "description": "Set if amount is coming from signal",
            "example": false
          },
          "amount": {
            "type": "number",
            "description": "The amount of the bot in USDC (if amount_from_signal is false)",
            "example": 100
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "UpdatePredictionSignalBotRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "api_id",
          "url",
          "amount_from_signal",
          "amount"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot max 255 characters",
            "example": "My bot"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the bot",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of a bot webhook",
            "example": "1"
          },
          "api_id": {
            "type": "number",
            "description": "The id of a bot Prediction API key",
            "example": "2"
          },
          "url": {
            "type": "string",
            "description": "The market url",
            "example": "https://polymarket.com/event/elon-musk-of-tweets-april-21-april-28/elon-musk-of-tweets-april-21-april-28-180-199#xpkQ2pz"
          },
          "amount_from_signal": {
            "type": "boolean",
            "description": "Set if amount is coming from signal",
            "example": false
          },
          "amount": {
            "type": "number",
            "description": "The amount of the bot in USDC (if amount_from_signal is false)",
            "example": 100
          },
          "delay": {
            "type": "number",
            "description": "Set how often the bot will check for new signals. eg. 10 means 10 in 1 second",
            "example": 10
          }
        }
      },
      "ShareWebhookRequest": {
        "type": "object",
        "required": [
          "userId"
        ],
        "properties": {
          "userId": {
            "type": "string",
            "description": "The user id of the user to share the webhook with",
            "example": "23n9c22c2vjk2cjn2opv8l2vhi"
          }
        }
      },
      "CreateBotWebhookRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot hook max 255 characters",
            "example": "My bot hook"
          },
          "description": {
            "type": "string",
            "description": "The description of the bot hook max 255 characters",
            "example": "My bot hook description"
          },
          "is_safe": {
            "type": "boolean",
            "description": "Set it true if want to set hash key",
            "example": false
          },
          "has_key": {
            "type": "string",
            "description": "The key of the bot hook",
            "example": "23n9c22c2vjk2cjn2opv8l2vhi"
          }
        }
      },
      "UpdateBotWebhookRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the bot hook max 255 characters",
            "example": "My bot hook"
          },
          "description": {
            "type": "string",
            "description": "The description of the bot hook max 255 characters",
            "example": "My bot hook description"
          },
          "is_safe": {
            "type": "boolean",
            "description": "Set it true if want to set hash key",
            "example": false
          },
          "has_key": {
            "type": "string",
            "description": "The key of the bot hook",
            "example": "23n9c22c2vjk2cjn2opv8l2vhi"
          }
        }
      },
      "CreateDataWebhookRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the data hook max 255 characters",
            "example": "My data hook"
          },
          "description": {
            "type": "string",
            "description": "The description of the data hook max 255 characters",
            "example": "My data hook description"
          },
          "is_safe": {
            "type": "boolean",
            "description": "Set it true if want to set hash key",
            "example": false
          },
          "has_key": {
            "type": "string",
            "description": "The key of the data hook",
            "example": "23n9c22c2vjk2cjn2opv8l2vhi"
          }
        }
      },
      "UpdateDataWebhookRequest": {
        "type": "object",
        "required": [],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the data hook max 255 characters",
            "example": "My data hook"
          },
          "description": {
            "type": "string",
            "description": "The description of the data hook max 255 characters",
            "example": "My data hook description"
          },
          "is_safe": {
            "type": "boolean",
            "description": "Set it true if want to set hash key",
            "example": false
          },
          "has_key": {
            "type": "string",
            "description": "The key of the data hook",
            "example": "23n9c22c2vjk2cjn2opv8l2vhi"
          }
        }
      },
      "UpdatePublicRequest": {
        "type": "object",
        "required": [
          "isPublic"
        ],
        "properties": {
          "isPublic": {
            "type": "boolean",
            "description": "Set true to make the strategy public",
            "example": true
          }
        }
      },
      "CreateCodeStrategyRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "symbol",
          "code"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the strategy",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent",
            "example": 12
          },
          "symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "code": {
            "type": "string",
            "description": "The JavaScript code of the strategy",
            "example": "(()=>{ $.Strategy.action($.Action.LONG); })();"
          },
          "use_price": {
            "type": "boolean",
            "description": "Set true if you want to use price ($.Price) in code",
            "example": true
          },
          "exchange_id": {
            "type": "number",
            "description": "The id of the exchange where the price is fetched (required exchange with hasExchangeRate set to true)",
            "example": 12
          },
          "price_symbol": {
            "type": "string",
            "description": "The symbol of the price (required if use_price is true)",
            "example": "BTCUSDT"
          }
        }
      },
      "UpdateCodeStrategyRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "symbol",
          "code"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the strategy",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent",
            "example": 12
          },
          "symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "code": {
            "type": "string",
            "description": "The JavaScript code of the strategy",
            "example": "(()=>{ $.Strategy.action($.Action.LONG); })();"
          },
          "use_price": {
            "type": "boolean",
            "description": "Set true if you want to use price ($.Price) in code",
            "example": true
          },
          "exchange_id": {
            "type": "number",
            "description": "The id of the exchange where the price is fetched (required exchange with hasExchangeRate set to true)",
            "example": 12
          },
          "price_symbol": {
            "type": "string",
            "description": "The symbol of the price (required if use_price is true)",
            "example": "BTCUSDT"
          }
        }
      },
      "ResetCodeTriggersRequest": {
        "type": "object",
        "required": [
          "resetTriggers",
          "resetStore"
        ],
        "properties": {
          "resetTriggers": {
            "type": "boolean",
            "description": "Set true to reset triggers",
            "example": true
          },
          "resetStore": {
            "type": "boolean",
            "description": "Set true to reset store",
            "example": true
          }
        }
      },
      "CreateLLMSessionRequest": {
        "type": "object",
        "required": [
          "llm_api_id",
          "cron_interval",
          "prompt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the strategy",
            "example": 12
          },
          "llm_api_id": {
            "type": "number",
            "description": "The main LLM Api key id used for the strategy",
            "example": 14
          },
          "fallback_api_id": {
            "type": "number",
            "description": "The fallback LLM Api key id used for the strategy if main is not available",
            "example": 15
          },
          "cron_interval": {
            "type": "string",
            "description": "The schedule interval of the strategy",
            "enum": [
              "3M",
              "5M",
              "15M",
              "30M",
              "1H",
              "2H",
              "4H",
              "8H",
              "12H",
              "1D"
            ],
            "example": "5M"
          },
          "use_chart": {
            "type": "boolean",
            "description": "Set true if you want to send chart image with the strategy prompt",
            "example": true
          },
          "chart_symbol": {
            "type": "string",
            "description": "The Tradingview symbol of the chart (required if use_chart is true)",
            "example": "BINANCE:BTCUSDT"
          },
          "chart_interval": {
            "type": "string",
            "description": "The interval of the chart (required if use_chart is true)",
            "enum": [
              "1",
              "3",
              "5",
              "15",
              "30",
              "60",
              "120",
              "240",
              "D"
            ],
            "example": "5"
          },
          "chart_studies": {
            "type": "array",
            "description": "The studies of the chart (optional if use_chart is true)",
            "maxItems": 2,
            "items": {
              "type": "string",
              "enum": [
                "ACCD@tv-basicstudies",
                "studyADR@tv-basicstudies",
                "AROON@tv-basicstudies",
                "ATR@tv-basicstudies",
                "AwesomeOscillator@tv-basicstudies",
                "BB@tv-basicstudies",
                "BollingerBandsR@tv-basicstudies",
                "BollingerBandsWidth@tv-basicstudies",
                "CMF@tv-basicstudies",
                "ChaikinOscillator@tv-basicstudies",
                "chandeMO@tv-basicstudies",
                "ChoppinessIndex@tv-basicstudies",
                "CCI@tv-basicstudies",
                "CRSI@tv-basicstudies",
                "CorrelationCoefficient@tv-basicstudies",
                "DetrendedPriceOscillator@tv-basicstudies",
                "DM@tv-basicstudies",
                "DONCH@tv-basicstudies",
                "DoubleEMA@tv-basicstudies",
                "EaseOfMovement@tv-basicstudies",
                "EFI@tv-basicstudies",
                "ENV@tv-basicstudies",
                "FisherTransform@tv-basicstudies",
                "HV@tv-basicstudies",
                "hullMA@tv-basicstudies",
                "IchimokuCloud@tv-basicstudies",
                "KLTNR@tv-basicstudies",
                "KST@tv-basicstudies",
                "LinearRegression@tv-basicstudies",
                "MACD@tv-basicstudies",
                "MOM@tv-basicstudies",
                "MF@tv-basicstudies",
                "MoonPhases@tv-basicstudies",
                "MASimple@tv-basicstudies",
                "MAExp@tv-basicstudies",
                "MAWeighted@tv-basicstudies",
                "OBV@tv-basicstudies",
                "PSAR@tv-basicstudies",
                "PivotPointsHighLow@tv-basicstudies",
                "PivotPointsStandard@tv-basicstudies",
                "PriceOsc@tv-basicstudies",
                "PriceVolumeTrend@tv-basicstudies",
                "ROC@tv-basicstudies",
                "RSI@tv-basicstudies",
                "VigorIndex@tv-basicstudies",
                "VolatilityIndex@tv-basicstudies",
                "SMIErgodicIndicator@tv-basicstudies",
                "SMIErgodicOscillator@tv-basicstudies",
                "Stochastic@tv-basicstudies",
                "StochasticRSI@tv-basicstudies",
                "TripleEMA@tv-basicstudies",
                "Trix@tv-basicstudies",
                "UltimateOsc@tv-basicstudies",
                "VSTOP@tv-basicstudies",
                "Volume@tv-basicstudies",
                "VWAP@tv-basicstudies",
                "MAVolumeWeighted@tv-basicstudies",
                "WilliamR@tv-basicstudies",
                "WilliamsAlligator@tv-basicstudies",
                "WilliamsFractal@tv-basicstudies",
                "ZigZag@tv-basicstudies"
              ]
            },
            "example": [
              "RSI@tv-basicstudies",
              "MACD@tv-basicstudies"
            ]
          },
          "chart_data_range": {
            "type": "string",
            "description": "The data range of the chart (optional if use_chart is true)",
            "enum": [
              "1D",
              "5D",
              "1M",
              "3M",
              "6M",
              "YTD",
              "12M",
              "60M",
              "ALL"
            ],
            "example": "1D"
          },
          "prompt": {
            "type": "string",
            "description": "The strategy prompt minimum length is 20 characters maximum length is 1000000000 characters",
            "example": "Generate a report about the current market conditions"
          },
          "send_signal": {
            "type": "boolean",
            "description": "Set true to send signal to bot hook",
            "example": true
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent (required if send_signal is true)",
            "example": 12
          },
          "signal_symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "send_email": {
            "type": "boolean",
            "description": "Set true to send the LLM response to the user email",
            "example": true
          }
        }
      },
      "UpdateLLMSessionRequest": {
        "type": "object",
        "required": [
          "llm_api_id",
          "cron_interval",
          "prompt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the strategy",
            "example": 12
          },
          "llm_api_id": {
            "type": "number",
            "description": "The main LLM Api key id used for the strategy",
            "example": 14
          },
          "fallback_api_id": {
            "type": "number",
            "description": "The fallback LLM Api key id used for the strategy if main is not available",
            "example": 15
          },
          "cron_interval": {
            "type": "string",
            "description": "The schedule interval of the strategy",
            "enum": [
              "3M",
              "5M",
              "15M",
              "30M",
              "1H",
              "2H",
              "4H",
              "8H",
              "12H",
              "1D"
            ],
            "example": "5M"
          },
          "use_chart": {
            "type": "boolean",
            "description": "Set true if you want to send chart image with the strategy prompt",
            "example": true
          },
          "chart_symbol": {
            "type": "string",
            "description": "The Tradingview symbol of the chart (required if use_chart is true)",
            "example": "BINANCE:BTCUSDT"
          },
          "chart_interval": {
            "type": "string",
            "description": "The interval of the chart (required if use_chart is true)",
            "enum": [
              "1",
              "3",
              "5",
              "15",
              "30",
              "60",
              "120",
              "240",
              "D"
            ],
            "example": "5"
          },
          "chart_studies": {
            "type": "array",
            "description": "The studies of the chart (optional if use_chart is true)",
            "maxItems": 2,
            "items": {
              "type": "string",
              "enum": [
                "ACCD@tv-basicstudies",
                "studyADR@tv-basicstudies",
                "AROON@tv-basicstudies",
                "ATR@tv-basicstudies",
                "AwesomeOscillator@tv-basicstudies",
                "BB@tv-basicstudies",
                "BollingerBandsR@tv-basicstudies",
                "BollingerBandsWidth@tv-basicstudies",
                "CMF@tv-basicstudies",
                "ChaikinOscillator@tv-basicstudies",
                "chandeMO@tv-basicstudies",
                "ChoppinessIndex@tv-basicstudies",
                "CCI@tv-basicstudies",
                "CRSI@tv-basicstudies",
                "CorrelationCoefficient@tv-basicstudies",
                "DetrendedPriceOscillator@tv-basicstudies",
                "DM@tv-basicstudies",
                "DONCH@tv-basicstudies",
                "DoubleEMA@tv-basicstudies",
                "EaseOfMovement@tv-basicstudies",
                "EFI@tv-basicstudies",
                "ENV@tv-basicstudies",
                "FisherTransform@tv-basicstudies",
                "HV@tv-basicstudies",
                "hullMA@tv-basicstudies",
                "IchimokuCloud@tv-basicstudies",
                "KLTNR@tv-basicstudies",
                "KST@tv-basicstudies",
                "LinearRegression@tv-basicstudies",
                "MACD@tv-basicstudies",
                "MOM@tv-basicstudies",
                "MF@tv-basicstudies",
                "MoonPhases@tv-basicstudies",
                "MASimple@tv-basicstudies",
                "MAExp@tv-basicstudies",
                "MAWeighted@tv-basicstudies",
                "OBV@tv-basicstudies",
                "PSAR@tv-basicstudies",
                "PivotPointsHighLow@tv-basicstudies",
                "PivotPointsStandard@tv-basicstudies",
                "PriceOsc@tv-basicstudies",
                "PriceVolumeTrend@tv-basicstudies",
                "ROC@tv-basicstudies",
                "RSI@tv-basicstudies",
                "VigorIndex@tv-basicstudies",
                "VolatilityIndex@tv-basicstudies",
                "SMIErgodicIndicator@tv-basicstudies",
                "SMIErgodicOscillator@tv-basicstudies",
                "Stochastic@tv-basicstudies",
                "StochasticRSI@tv-basicstudies",
                "TripleEMA@tv-basicstudies",
                "Trix@tv-basicstudies",
                "UltimateOsc@tv-basicstudies",
                "VSTOP@tv-basicstudies",
                "Volume@tv-basicstudies",
                "VWAP@tv-basicstudies",
                "MAVolumeWeighted@tv-basicstudies",
                "WilliamR@tv-basicstudies",
                "WilliamsAlligator@tv-basicstudies",
                "WilliamsFractal@tv-basicstudies",
                "ZigZag@tv-basicstudies"
              ]
            },
            "example": [
              "RSI@tv-basicstudies",
              "MACD@tv-basicstudies"
            ]
          },
          "chart_data_range": {
            "type": "string",
            "description": "The data range of the chart (optional if use_chart is true)",
            "enum": [
              "1D",
              "5D",
              "1M",
              "3M",
              "6M",
              "YTD",
              "12M",
              "60M",
              "ALL"
            ],
            "example": "1D"
          },
          "prompt": {
            "type": "string",
            "description": "The strategy prompt minimum length is 20 characters maximum length is 1000000000 characters",
            "example": "Generate a report about the current market conditions"
          },
          "send_signal": {
            "type": "boolean",
            "description": "Set true to send signal to bot hook",
            "example": true
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent (required if send_signal is true)",
            "example": 12
          },
          "signal_symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "send_email": {
            "type": "boolean",
            "description": "Set true to send the LLM response to the user email",
            "example": true
          }
        }
      },
      "ResetLLMTriggersRequest": {
        "type": "object",
        "required": [
          "resetTriggers",
          "resetStorage",
          "resetResponse"
        ],
        "properties": {
          "resetTriggers": {
            "type": "boolean",
            "description": "Set true to reset triggers",
            "example": true
          },
          "resetStorage": {
            "type": "boolean",
            "description": "Set true to reset storage",
            "example": true
          },
          "resetResponse": {
            "type": "boolean",
            "description": "Set true to reset response history",
            "example": true
          }
        }
      },
      "CreateCodeReactionRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "data_webhook_id",
          "symbol",
          "code"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the reaction",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent",
            "example": 12
          },
          "data_webhook_id": {
            "type": "number",
            "description": "The id of the data hook witch will be used to get data",
            "example": 13
          },
          "symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "code": {
            "type": "string",
            "description": "The JavaScript code of the strategy",
            "example": "(()=>{ $.Strategy.action($.Action.LONG); })();"
          },
          "use_price": {
            "type": "boolean",
            "description": "Set true if you want to use price ($.Price) in code",
            "example": true
          },
          "exchange_id": {
            "type": "number",
            "description": "The id of the exchange where the price is fetched (required exchange with hasExchangeRate set to true)",
            "example": 12
          },
          "price_symbol": {
            "type": "string",
            "description": "The symbol of the price (required if use_price is true)",
            "example": "BTCUSDT"
          }
        }
      },
      "UpdateCodeReactionRequest": {
        "type": "object",
        "required": [
          "webhook_id",
          "data_webhook_id",
          "symbol",
          "code"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the reaction",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent",
            "example": 12
          },
          "data_webhook_id": {
            "type": "number",
            "description": "The id of the data hook witch will be used to get data",
            "example": 13
          },
          "symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "code": {
            "type": "string",
            "description": "The JavaScript code of the strategy",
            "example": "(()=>{ $.Strategy.action($.Action.LONG); })();"
          },
          "use_price": {
            "type": "boolean",
            "description": "Set true if you want to use price ($.Price) in code",
            "example": true
          },
          "exchange_id": {
            "type": "number",
            "description": "The id of the exchange where the price is fetched (required exchange with hasExchangeRate set to true)",
            "example": 12
          },
          "price_symbol": {
            "type": "string",
            "description": "The symbol of the price (required if use_price is true)",
            "example": "BTCUSDT"
          }
        }
      },
      "CreateLLMReactionRequest": {
        "type": "object",
        "required": [
          "data_webhook_id",
          "llm_api_id",
          "prompt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the reaction",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent (required if send_signal is true)",
            "example": 12
          },
          "data_webhook_id": {
            "type": "number",
            "description": "The id of the data hook witch will be used to get data",
            "example": 13
          },
          "llm_api_id": {
            "type": "number",
            "description": "The main LLM Api key id used for the strategy",
            "example": 14
          },
          "fallback_api_id": {
            "type": "number",
            "description": "The fallback LLM Api key id used for the strategy if main is not available",
            "example": 15
          },
          "prompt": {
            "type": "string",
            "description": "The prompt used for the strategy",
            "example": "Analyze the incoming data and give me a signal"
          },
          "send_signal": {
            "type": "boolean",
            "description": "Set true if you want to send a signal to the bot hook",
            "example": true
          },
          "signal_symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "send_email": {
            "type": "boolean",
            "description": "Set true if you want to send the LLM response to the user email",
            "example": true
          }
        }
      },
      "UpdateLLMReactionRequest": {
        "type": "object",
        "required": [
          "data_webhook_id",
          "llm_api_id",
          "prompt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the strategy max 255 characters",
            "example": "My strategy"
          },
          "folder_id": {
            "type": "number",
            "description": "The folder id of the reaction",
            "example": 12
          },
          "webhook_id": {
            "type": "number",
            "description": "The id of the bot hook where signal will be sent (required if send_signal is true)",
            "example": 12
          },
          "data_webhook_id": {
            "type": "number",
            "description": "The id of the data hook witch will be used to get data",
            "example": 13
          },
          "llm_api_id": {
            "type": "number",
            "description": "The main LLM Api key id used for the strategy",
            "example": 14
          },
          "fallback_api_id": {
            "type": "number",
            "description": "The fallback LLM Api key id used for the strategy if main is not available",
            "example": 15
          },
          "prompt": {
            "type": "string",
            "description": "The prompt used for the strategy",
            "example": "Analyze the incoming data and give me a signal"
          },
          "send_signal": {
            "type": "boolean",
            "description": "Set true if you want to send a signal to the bot hook",
            "example": true
          },
          "signal_symbol": {
            "type": "string",
            "description": "The signal symbol or symbols of the strategy separated by comma",
            "example": "BTCUSDT,ETHUSDT"
          },
          "send_email": {
            "type": "boolean",
            "description": "Set true if you want to send the LLM response to the user email",
            "example": true
          }
        }
      },
      "Exchange": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Exchange identifier",
            "example": 1
          },
          "type": {
            "type": "string",
            "description": "Exchange type e.g. CEX, DEX, PREDICTION",
            "example": "CEX"
          },
          "name": {
            "type": "string",
            "description": "Exchange name e.g. Binance",
            "example": "binance"
          },
          "service": {
            "type": "string",
            "description": "Exchange service e.g. spot, futures",
            "example": "spot"
          },
          "enabled": {
            "type": "boolean",
            "description": "Whether the exchange is enabled",
            "example": true
          },
          "hasExchangeRate": {
            "type": "boolean",
            "description": "Whether the exchange provides exchange rates to the system",
            "example": true
          },
          "extra": {
            "type": "boolean",
            "description": "Whether the exchange API keys need extra information other than the API key and secret",
            "example": false
          }
        }
      }
    }
  },
  "paths": {
    "/api/v2/exchange": {
      "get": {
        "summary": "Get all exchanges with optional filtering",
        "tags": [
          "exchanges"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "enabled",
            "schema": {
              "type": "boolean"
            },
            "description": "Filter by enabled status"
          },
          {
            "in": "query",
            "name": "chainId",
            "schema": {
              "type": "string"
            },
            "description": "Filter by blockchain chain ID"
          }
        ],
        "responses": {
          "200": {
            "description": "List of exchanges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Exchange"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v2/exchange/cex": {
      "get": {
        "summary": "Get all CEX exchanges",
        "tags": [
          "exchanges"
        ],
        "responses": {
          "200": {
            "description": "List of enabled CEX exchanges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Exchange"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v2/exchange/dex/{chain}": {
      "get": {
        "summary": "Get all DEX exchanges by chain ID",
        "tags": [
          "exchanges"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "chain",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Blockchain chain ID"
          }
        ],
        "responses": {
          "200": {
            "description": "List of DEX exchanges for the specified chain",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Exchange"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing chain ID"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v2/exchange/prediction": {
      "get": {
        "summary": "Get all Prediction exchanges",
        "tags": [
          "exchanges"
        ],
        "responses": {
          "200": {
            "description": "List of prediction exchanges",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Exchange"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v2/exchange/with-exchange-rate": {
      "get": {
        "summary": "Get all exchanges with exchange rates",
        "tags": [
          "exchanges"
        ],
        "responses": {
          "200": {
            "description": "List of enabled exchanges with exchange rates",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Exchange"
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/v2/strategy/llm-session": {
      "get": {
        "summary": "Get all LLM sessions",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "List of user's LLM sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMSession"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new LLM session",
        "tags": [
          "llm-session"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLLMSessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "LLM session created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMSession"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid configuration, or session limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Session limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Package or LLM API not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/total": {
      "get": {
        "summary": "Get the total number of LLM sessions",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "Number of LLM Sessions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/{id}": {
      "get": {
        "summary": "Get LLM session by ID",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "LLM session details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMSession"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update LLM session",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLLMSessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "LLM session updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid configuration, or validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session, webhook, or LLM API not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete LLM session",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "LLM session deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/duplicate": {
      "post": {
        "summary": "Duplicate an LLM session",
        "tags": [
          "llm-session"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Session ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "LLM session duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMSession"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or session limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/{id}/reset": {
      "put": {
        "summary": "Reset LLM session triggers, history or responses",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetLLMTriggersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Triggers and/or history reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid options, or nothing to reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/{id}/status": {
      "put": {
        "summary": "Update LLM session status",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid status, or session limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Active session limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/{id}/public": {
      "put": {
        "summary": "Update LLM session public visibility",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public visibility updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or invalid public flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Session not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/folder": {
      "get": {
        "summary": "Get all LLM session folders",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "List of user's LLM session folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMSessionFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new LLM session folder",
        "tags": [
          "llm-session"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMSessionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/folder/root": {
      "get": {
        "summary": "Get LLM Sessions from root folder",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "List",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMSession"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/llm-session/folder/{id}": {
      "get": {
        "summary": "Get LLM session folder by ID",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMSessionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update LLM session folder",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete LLM session folder",
        "tags": [
          "llm-session"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm": {
      "get": {
        "summary": "Get all LLM reactions",
        "tags": [
          "llm-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of user's LLM reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMReaction"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new LLM reaction",
        "tags": [
          "llm-reaction"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLLMReactionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "LLM reaction created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMReaction"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid prompt, or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Data webhook, bot webhook, or LLM API not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/{id}": {
      "get": {
        "summary": "Get LLM reaction by ID",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "LLM reaction details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMReaction"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update LLM reaction",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateLLMReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "LLM reaction updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid prompt, or validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction, webhook, or LLM API not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete LLM reaction",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "LLM reaction deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/total": {
      "get": {
        "summary": "Get the total number of LLM Reaction",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "Number of LLM Reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/duplicate": {
      "post": {
        "summary": "Duplicate an LLM reaction",
        "tags": [
          "llm-reaction"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Reaction ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "LLM reaction duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMReaction"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/{id}/reset": {
      "put": {
        "summary": "Reset LLM reaction triggers, history or responses",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetLLMTriggersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Triggers and/or history reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid options, or nothing to reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/{id}/status": {
      "put": {
        "summary": "Update LLM reaction status",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid status, or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Active reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/{id}/public": {
      "put": {
        "summary": "Update LLM reaction public visibility",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public visibility updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or invalid public flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/folder": {
      "get": {
        "summary": "Get all LLM reaction folders",
        "tags": [
          "llm-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of user's LLM reaction folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMReactionFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new LLM reaction folder",
        "tags": [
          "llm-reaction"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMReactionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/folder/root": {
      "get": {
        "summary": "Get LLM reactions from root folder",
        "tags": [
          "llm-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of LLM reactions in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMReaction"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/llm/folder/{id}": {
      "get": {
        "summary": "Get LLM reaction folder by ID",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LLMReactionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update LLM reaction folder",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete LLM reaction folder",
        "tags": [
          "llm-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code": {
      "get": {
        "summary": "Get all code reactions",
        "tags": [
          "code-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of user's code reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeReaction"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new code reaction",
        "tags": [
          "code-reaction"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCodeReactionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Code reaction created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeReaction"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid code, or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Exchange, webhook, or data hook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/total": {
      "get": {
        "summary": "Get the total number of Code Reactions",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "Number of Code Reactions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/{id}": {
      "get": {
        "summary": "Get code reaction by ID",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Code reaction details with storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeReactionWithStorage"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update code reaction",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCodeReactionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Code reaction updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid code, or validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Reaction, exchange, webhook, or data hook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete code reaction",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Code reaction deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/duplicate": {
      "post": {
        "summary": "Duplicate a code reaction",
        "tags": [
          "code-reaction"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Reaction ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Code reaction duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeReaction"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/{id}/reset": {
      "put": {
        "summary": "Reset code reaction triggers and/or storage",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetCodeTriggersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Triggers and/or storage reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid options, or nothing to reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/{id}/status": {
      "put": {
        "summary": "Update code reaction status",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid status, or reaction limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/{id}/public": {
      "put": {
        "summary": "Update code reaction public visibility",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public visibility updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or invalid public flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/{id}/store": {
      "delete": {
        "summary": "Delete code reaction storage",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storage deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/folder": {
      "get": {
        "summary": "Get all code reaction folders",
        "tags": [
          "code-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of user's code reaction folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeReactionFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new code reaction folder",
        "tags": [
          "code-reaction"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeReactionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/folder/root": {
      "get": {
        "summary": "Get code reactions from root folder",
        "tags": [
          "code-reaction"
        ],
        "responses": {
          "200": {
            "description": "List of code reactions in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeReaction"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/reaction/code/folder/{id}": {
      "get": {
        "summary": "Get code reaction folder by ID",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeReactionFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update code reaction folder",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete code reaction folder",
        "tags": [
          "code-reaction"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/strategy/code": {
      "get": {
        "summary": "Get all code strategies",
        "tags": [
          "code"
        ],
        "responses": {
          "200": {
            "description": "List of user's code strategies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeStrategy"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new code strategy",
        "tags": [
          "code"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCodeStrategyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Code strategy created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeStrategy"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid code, or strategy limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Exchange or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/total": {
      "get": {
        "summary": "Get the total number of Code Strategies",
        "tags": [
          "llm-session"
        ],
        "responses": {
          "200": {
            "description": "Number of Code Strategies",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/{id}": {
      "get": {
        "summary": "Get code strategy by ID",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Code strategy details with storage",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeStrategyWithStorage"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update code strategy",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCodeStrategyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Code strategy updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid code, or validation errors",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy, exchange, or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete code strategy",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Code strategy deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/duplicate": {
      "post": {
        "summary": "Duplicate a code strategy",
        "tags": [
          "code"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Strategy ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Code strategy duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeStrategy"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or strategy limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/{id}/reset": {
      "put": {
        "summary": "Reset code strategy triggers and/or storage",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetCodeTriggersRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Triggers and/or storage reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid options, or nothing to reset",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/{id}/status": {
      "put": {
        "summary": "Update code strategy status",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid status, status already set, or strategy limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/{id}/public": {
      "put": {
        "summary": "Update code strategy public visibility",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePublicRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Public visibility updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or invalid public flag",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/{id}/store": {
      "delete": {
        "summary": "Delete code strategy storage",
        "tags": [
          "code"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Storage deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Strategy not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/folder": {
      "get": {
        "summary": "Get all code strategy folders",
        "tags": [
          "code-strategy"
        ],
        "responses": {
          "200": {
            "description": "List of user's code strategy folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeStrategyFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new code strategy folder",
        "tags": [
          "code-strategy"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeStrategyFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/strategy/code/folder/root": {
      "get": {
        "summary": "Get code strategies from root folder",
        "tags": [
          "code-strategy"
        ],
        "responses": {
          "200": {
            "description": "List of code strategies in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CodeStrategy"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/strategy/code/folder/{id}": {
      "get": {
        "summary": "Get code strategy folder by ID",
        "tags": [
          "code-strategy"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CodeStrategyFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update code strategy folder",
        "tags": [
          "code-strategy"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete code strategy folder",
        "tags": [
          "code-strategy"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/bot/signal/cex": {
      "get": {
        "summary": "Get all CEX signal bots",
        "tags": [
          "cex-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's CEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CexSignalBot"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new CEX signal bot",
        "tags": [
          "cex-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCexSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "CEX signal bot created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/total": {
      "get": {
        "summary": "Get the total number of CEX signal bots",
        "tags": [
          "cex-bot"
        ],
        "responses": {
          "200": {
            "description": "Total number of CEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/{id}": {
      "get": {
        "summary": "Get CEX signal bot by ID",
        "tags": [
          "cex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CEX signal bot details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update CEX signal bot",
        "tags": [
          "cex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCexSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "CEX signal bot updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id or invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot, API key, or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete CEX signal bot",
        "tags": [
          "cex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CEX signal bot deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/{id}/status": {
      "put": {
        "summary": "Update CEX signal bot status",
        "tags": [
          "cex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id or invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Bot limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot or package not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/duplicate": {
      "post": {
        "summary": "Duplicate a CEX signal bot",
        "tags": [
          "cex-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Bot ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "CEX signal bot duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id or bot limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/folder": {
      "get": {
        "summary": "Get all CEX signal bot folders",
        "tags": [
          "cex-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's CEX signal bot folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CexSignalBotFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new CEX signal bot folder",
        "tags": [
          "cex-signal-bot"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CexSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/folder/root": {
      "get": {
        "summary": "Get CEX signal bots from root folder",
        "tags": [
          "cex-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of CEX signal bots in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/CexSignalBot"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/cex/folder/{id}": {
      "get": {
        "summary": "Get CEX signal bot folder by ID",
        "tags": [
          "cex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CexSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update CEX signal bot folder",
        "tags": [
          "cex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete CEX signal bot folder",
        "tags": [
          "cex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/market/{slug}": {
      "get": {
        "summary": "Get prediction market by slug",
        "tags": [
          "prediction-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prediction market data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionMarket"
                }
              }
            }
          },
          "400": {
            "description": "Missing slug or invalid slug",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction": {
      "get": {
        "summary": "Get all prediction signal bots",
        "tags": [
          "prediction-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's prediction signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredictionSignalBot"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new prediction signal bot",
        "tags": [
          "prediction-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePredictionSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bot created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid data, or limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/total": {
      "get": {
        "summary": "Get the total number of Prediction signal bots",
        "tags": [
          "prediction-bot"
        ],
        "responses": {
          "200": {
            "description": "Total number of Prediction signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/{id}": {
      "get": {
        "summary": "Get prediction signal bot by ID",
        "tags": [
          "prediction-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Prediction signal bot data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update prediction signal bot",
        "tags": [
          "prediction-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePredictionSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bot updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot, API key, or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete prediction signal bot",
        "tags": [
          "prediction-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bot deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/{id}/status": {
      "put": {
        "summary": "Update prediction signal bot status",
        "tags": [
          "prediction-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot ID, invalid status, or limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Bot limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/duplicate": {
      "post": {
        "summary": "Duplicate a prediction signal bot",
        "tags": [
          "prediction-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "id"
                ],
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "Bot ID to duplicate"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bot duplicated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot ID, bot not found, or limit exceeded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/folder": {
      "get": {
        "summary": "Get all prediction signal bot folders",
        "tags": [
          "prediction-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's prediction signal bot folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredictionSignalBotFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new prediction signal bot folder",
        "tags": [
          "prediction-signal-bot"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/folder/root": {
      "get": {
        "summary": "Get prediction signal bots from root folder",
        "tags": [
          "prediction-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of prediction signal bots in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredictionSignalBot"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/prediction/folder/{id}": {
      "get": {
        "summary": "Get prediction signal bot folder by ID",
        "tags": [
          "prediction-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update prediction signal bot folder",
        "tags": [
          "prediction-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete prediction signal bot folder",
        "tags": [
          "prediction-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/bot/signal/dex": {
      "get": {
        "summary": "Get all DEX signal bots",
        "tags": [
          "dex-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's DEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DexSignalBot"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new DEX signal bot",
        "tags": [
          "dex-bot"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDexSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "DEX signal bot created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing parameters, invalid data, or invalid contract address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Factory or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/total": {
      "get": {
        "summary": "Get the total number of DEX signal bots",
        "tags": [
          "dex-bot"
        ],
        "responses": {
          "200": {
            "description": "Total number of DEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "number",
                      "example": 10
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/{id}": {
      "get": {
        "summary": "Get DEX signal bot by ID",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DEX signal bot details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update DEX signal bot",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDexSignalBotRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "DEX signal bot updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id or invalid data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot or webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete DEX signal bot",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DEX signal bot deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/{chainId}/{address}": {
      "get": {
        "summary": "Get DEX signal bot by chain and address",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "chainId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "address",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "DEX signal bot details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexSignalBot"
                }
              }
            }
          },
          "400": {
            "description": "Missing chain id or address",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/factory/{chainId}/{exchangeId}": {
      "get": {
        "summary": "Get bot factory by chain and exchange",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "chainId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "exchangeId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Factory details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotFactory"
                }
              }
            }
          },
          "400": {
            "description": "Missing chain or exchange",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Factory not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/{id}/status": {
      "put": {
        "summary": "Update DEX signal bot status",
        "tags": [
          "dex-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing bot id, invalid status, or status already set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "DEX bot limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/folder": {
      "get": {
        "summary": "Get all DEX signal bot folders",
        "tags": [
          "dex-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of user's DEX signal bot folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DexSignalBotFolder"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new DEX signal bot folder",
        "tags": [
          "dex-signal-bot"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Folder created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Invalid name or max folder limit reached"
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/folder/root": {
      "get": {
        "summary": "Get DEX signal bots from root folder",
        "tags": [
          "dex-signal-bot"
        ],
        "responses": {
          "200": {
            "description": "List of DEX signal bots in root folder",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DexSignalBot"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/bot/signal/dex/folder/{id}": {
      "get": {
        "summary": "Get DEX signal bot folder by ID",
        "tags": [
          "dex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder with its items",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DexSignalBotFolder"
                }
              }
            }
          },
          "400": {
            "description": "Missing id"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "put": {
        "summary": "Update DEX signal bot folder",
        "tags": [
          "dex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "New folder name (optional, auto-generated if not provided)"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Folder updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid name, or folder not found"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      },
      "delete": {
        "summary": "Delete DEX signal bot folder",
        "tags": [
          "dex-signal-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Folder ID"
          }
        ],
        "responses": {
          "200": {
            "description": "Folder deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing id, folder not found, or folder is not empty"
          },
          "404": {
            "description": "Folder not found"
          }
        }
      }
    },
    "/api/v2/webhook/bot": {
      "get": {
        "summary": "Get all bot webhooks",
        "tags": [
          "bot-hook"
        ],
        "responses": {
          "200": {
            "description": "List of user's bot webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/BotWebhook"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new bot webhook",
        "tags": [
          "bot-hook"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBotWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Bot webhook created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid password, or webhook limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Webhook limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Package not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/{id}": {
      "get": {
        "summary": "Get bot webhook by ID",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bot webhook details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BotWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Bot webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update bot webhook",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBotWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Bot webhook updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id or invalid password",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete bot webhook",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Bot webhook deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": "Deleted"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Webhook is in use by bots or strategies",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/{id}/shares": {
      "get": {
        "summary": "Get webhook shares",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhook shares",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/WebhookShare"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/share/{id}": {
      "post": {
        "summary": "Share webhook with user",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook shared successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookShare"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook/user id, invalid permission, or not friends",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Remove webhook share",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "description": "User ID to unshare with"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Share removed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook/user id or not friends",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/bot/signal/{id}/cex": {
      "get": {
        "summary": "Get CEX signal bots for webhook",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated CEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSignalBots"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/bot/signal/{id}/dex": {
      "get": {
        "summary": "Get DEX signal bots for webhook",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated DEX signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedSignalBots"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/bot/signal/{id}/prediction": {
      "get": {
        "summary": "Get prediction signal bots by webhook ID",
        "tags": [
          "webhook-bot"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated prediction signal bot data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedPredictionSignalBots"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/{id}/status": {
      "put": {
        "summary": "Update webhook status",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, invalid status, or status already set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Webhook limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook or package not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/shared": {
      "get": {
        "summary": "Get all shared webhooks for user",
        "tags": [
          "bot-hook"
        ],
        "responses": {
          "200": {
            "description": "List of shared webhooks accessible to user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedWebhook"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/shared/with/{id}": {
      "get": {
        "summary": "Get webhooks shared with specific user",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User ID to get webhooks shared with"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhooks shared with specified user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedWebhook"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing user id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Friendship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/bot/shared/by/{id}": {
      "get": {
        "summary": "Get webhooks shared by specific user",
        "tags": [
          "bot-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User ID to get webhooks shared by"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhooks shared by specified user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedWebhook"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing user id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Friendship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data": {
      "get": {
        "summary": "Get all data webhooks",
        "tags": [
          "data-hook"
        ],
        "responses": {
          "200": {
            "description": "List of user's data webhooks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataWebhook"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new data webhook",
        "tags": [
          "data-hook"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateDataWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Data webhook created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid password",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Webhook limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Package not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/{id}": {
      "get": {
        "summary": "Get data webhook by ID",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data webhook details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "put": {
        "summary": "Update data webhook",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateDataWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Data webhook updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataWebhook"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id or invalid password",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Delete data webhook",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Data webhook deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Webhook is in use by reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/{id}/shares": {
      "get": {
        "summary": "Get webhook shares",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of webhook shares",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DataWebhookShare"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/{id}/llm-reactions": {
      "get": {
        "summary": "Get LLM reactions for webhook",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated LLM reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReactions"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/{id}/code-reactions": {
      "get": {
        "summary": "Get code reactions for webhook",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated code reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedReactions"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/share/{id}": {
      "post": {
        "summary": "Share webhook with user",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShareWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Webhook shared successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataWebhookShare"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook/user id, invalid permission, or not friends",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      },
      "delete": {
        "summary": "Remove webhook share",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "userId"
                ],
                "properties": {
                  "userId": {
                    "type": "string",
                    "description": "User ID to unshare with"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Share removed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook/user id or not friends",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/{id}/status": {
      "put": {
        "summary": "Update webhook status",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing webhook id or invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "402": {
            "description": "Webhook limit reached",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Webhook not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/shared": {
      "get": {
        "summary": "Get all shared data webhooks for user",
        "tags": [
          "data-hook"
        ],
        "responses": {
          "200": {
            "description": "List of shared data webhooks accessible to user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedDataWebhook"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/shared/with/{id}": {
      "get": {
        "summary": "Get data webhooks shared with specific user",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User ID to get data webhooks shared with"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of data webhooks shared with specified user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedDataWebhook"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing user id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Friendship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/webhook/data/shared/by/{id}": {
      "get": {
        "summary": "Get data webhooks shared by specific user",
        "tags": [
          "data-hook"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "description": "User ID to get data webhooks shared by"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of data webhooks shared by specified user",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SharedDataWebhook"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing user id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Friendship not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/exchange": {
      "get": {
        "summary": "Get all exchange API keys for user",
        "tags": [
          "exchange-api-keys"
        ],
        "responses": {
          "200": {
            "description": "List of user's exchange API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ExchangeApiKey"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new exchange API key",
        "tags": [
          "exchange-api-keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExchangeApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API key created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Exchange not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/exchange/bot/signal/{id}": {
      "get": {
        "summary": "Get signal bots that use an API key",
        "tags": [
          "exchange-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated signal bot data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignalBots"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, page, or limit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/exchange/{id}/status": {
      "put": {
        "summary": "Update API key status",
        "tags": [
          "exchange-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or invalid status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/exchange/{id}": {
      "delete": {
        "summary": "Delete an exchange API key",
        "tags": [
          "exchange-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing api id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "API key is in use by signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/exchange/test": {
      "post": {
        "summary": "Test exchange API key credentials",
        "tags": [
          "exchange-api-keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API key is valid",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TestResponse"
                }
              }
            }
          },
          "404": {
            "description": "Exchange not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/llm/services": {
      "get": {
        "summary": "Get all enabled LLM services",
        "tags": [
          "llm-api-keys"
        ],
        "responses": {
          "200": {
            "description": "List of enabled services",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMService"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/llm/models/{serviceId}": {
      "get": {
        "summary": "Get models for a specific service",
        "tags": [
          "llm-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "serviceId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of models for the service",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing serviceId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/llm/{id}/model": {
      "put": {
        "summary": "Update model for an API key",
        "tags": [
          "llm-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateModelRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Model updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or modelId",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key or model not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/llm": {
      "get": {
        "summary": "Get all LLM API keys for user",
        "tags": [
          "llm-api-keys"
        ],
        "responses": {
          "200": {
            "description": "List of user's API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/LLMApiKey"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new LLM API key",
        "tags": [
          "llm-api-keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLLMApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API key created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields or invalid API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service or model not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/llm/{id}": {
      "delete": {
        "summary": "Delete an LLM API key",
        "tags": [
          "llm-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": "Deleted"
                }
              }
            }
          },
          "400": {
            "description": "Missing id or API key is in use",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/prediction": {
      "get": {
        "summary": "Get all prediction API keys",
        "tags": [
          "prediction-api-keys"
        ],
        "responses": {
          "200": {
            "description": "List of user's prediction API keys",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PredictionApiKey"
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create a new prediction API key",
        "tags": [
          "prediction-api-keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePredictionApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "API key created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PredictionApiKey"
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid name, or invalid credentials",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Exchange not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/prediction/bot/signal/{id}": {
      "get": {
        "summary": "Get prediction signal bots by API ID",
        "tags": [
          "prediction-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": true,
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of prediction signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PredictionSignalBot"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing required parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/prediction/{id}/status": {
      "put": {
        "summary": "Update prediction API key status",
        "tags": [
          "prediction-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Status updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessResponse"
                }
              }
            }
          },
          "400": {
            "description": "Missing id, invalid status, or status already set",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/prediction/{id}": {
      "delete": {
        "summary": "Delete prediction API key",
        "tags": [
          "prediction-api-keys"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "example": "Deleted"
                }
              }
            }
          },
          "400": {
            "description": "Missing API ID",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "API key not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "API key is in use by signal bots",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/v2/api/prediction/test": {
      "post": {
        "summary": "Test prediction API credentials",
        "tags": [
          "prediction-api-keys"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TestPredictionApiKeyRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "API credentials are valid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "boolean",
                  "example": true
                }
              }
            }
          },
          "400": {
            "description": "Missing required fields, invalid credentials, or exchange not found",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "boolean",
                      "example": false
                    },
                    {
                      "$ref": "#/components/schemas/ErrorResponse"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    }
  }
}