{
  "openapi": "3.1.0",
  "info": {
    "title": "Legend API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "/api/rest"
    }
  ],
  "externalDocs": {
    "url": "https://legend.app/docs"
  },
  "paths": {
    "/v1/users/me": {
      "get": {
        "operationId": "v1-users-me",
        "summary": "Get current authenticated user",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserMe"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-users-update",
        "summary": "Update current user",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "username": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 15,
                    "pattern": "^[a-z0-9_]+$"
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 15,
                    "pattern": "^[a-zA-Z0-9_\\-$]+$"
                  },
                  "avatarUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "featureImageUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "bio": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 200
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "completedOnboarding": {
                    "type": "boolean"
                  },
                  "dismissedTradeNoteCta": {
                    "type": "boolean"
                  },
                  "networkMode": {
                    "type": "string",
                    "enum": [
                      "hyperliquid_mainnet",
                      "hyperliquid_testnet",
                      "hyperliquid_paper"
                    ]
                  },
                  "restrictDmsToFollowing": {
                    "type": "boolean"
                  },
                  "acknowledgedSeasonZero": {
                    "type": "boolean"
                  },
                  "traderLevelSeen": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "maxMarketOrderSlippage": {
                    "anyOf": [
                      {
                        "type": "number",
                        "minimum": 0.001,
                        "maximum": 0.25
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clearMaxMarketOrderSlippage": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-users-delete",
        "summary": "Permanently delete current user account",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "deleted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaderboard/users": {
      "get": {
        "operationId": "v1-users-leaderboard",
        "summary": "Get user leaderboard",
        "tags": [
          "user"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "default": "top-traders",
              "type": "string",
              "enum": [
                "top-traders",
                "friends",
                "clan"
              ]
            }
          },
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "profit",
              "type": "string",
              "enum": [
                "profit",
                "volume",
                "avgRoi",
                "name",
                "lastActive",
                "rank",
                "elo",
                "wins",
                "losses",
                "copiers"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "7d",
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          },
          {
            "in": "query",
            "name": "includePnlSparkline",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "includeFollowerCounts",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaderboard/users/me/rank": {
      "get": {
        "operationId": "v1-users-leaderboardRank",
        "summary": "Get current user leaderboard rank and stats",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "7d",
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "profit",
              "type": "string",
              "enum": [
                "profit",
                "volume",
                "avgRoi",
                "name",
                "lastActive",
                "rank",
                "elo",
                "wins",
                "losses",
                "copiers"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/LeaderboardMeRank"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaderboard/users/me/neighborhood": {
      "get": {
        "operationId": "v1-users-leaderboardNeighborhood",
        "summary": "Get current user leaderboard neighborhood",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_mainnet",
                "hyperliquid_testnet"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardNeighborhoodOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users": {
      "get": {
        "operationId": "v1-users-list",
        "summary": "List users",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "ids",
            "schema": {
              "maxItems": 100,
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "in": "query",
            "name": "excludeCurrentUser",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "excludeFollowing",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/online": {
      "get": {
        "operationId": "v1-users-listOnline",
        "summary": "Get online users",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetOnlineUsersOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/reset-stats": {
      "post": {
        "operationId": "v1-users-resetStats",
        "summary": "Reset all user stats and history (fresh start)",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "reset": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "reset"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/prepare-mfa-enrollment": {
      "post": {
        "operationId": "v1-users-prepareMfaEnrollment",
        "summary": "Prepare the main wallet for MFA enrollment",
        "tags": [
          "users"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepareMfaEnrollmentOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/complete-mfa-enrollment": {
      "post": {
        "operationId": "v1-users-completeMfaEnrollment",
        "summary": "Confirm Privy TOTP enrollment and enable wallet MFA",
        "tags": [
          "users"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CompleteMfaEnrollmentOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/disable-mfa": {
      "post": {
        "operationId": "v1-users-disableMfa",
        "summary": "Disable wallet MFA for the current user",
        "tags": [
          "users"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DisableMfaOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/profile-picture": {
      "post": {
        "operationId": "v1-users-uploadProfilePicture",
        "summary": "Get presigned URL for profile picture upload",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "mimeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "fileSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "filename",
                  "mimeType",
                  "fileSize"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserUploadImageOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/banner-picture": {
      "post": {
        "operationId": "v1-users-uploadBannerPicture",
        "summary": "Get presigned URL for banner picture upload",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "mimeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "fileSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "filename",
                  "mimeType",
                  "fileSize"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserUploadImageOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referral-code": {
      "post": {
        "operationId": "v1-users-setReferralCode",
        "summary": "Set custom referral code (one-time only)",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 12,
                    "pattern": "^[A-Z0-9]+$"
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "referral_code_alt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "referral_code_alt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referral": {
      "post": {
        "operationId": "v1-users-applyReferral",
        "summary": "Apply a referral code for an existing user (one-time only)",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplyReferralOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/onboarding": {
      "post": {
        "operationId": "v1-users-startOnboarding",
        "summary": "Called when user starts the onboarding flow",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/wallet-metrics/refresh": {
      "post": {
        "operationId": "v1-users-refreshWalletMetrics",
        "summary": "Refresh wallet performance metrics for the current user",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "refreshed": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "refreshed"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{userId}/referrals": {
      "get": {
        "operationId": "v1-users-referrals-list",
        "summary": "Get users referred by a specific user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "referrals": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReferralUser"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "referrals",
                    "total",
                    "hasMore"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/count": {
      "get": {
        "operationId": "v1-users-referrals-count",
        "summary": "Get the count of users referred by the current user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/rewards": {
      "get": {
        "operationId": "v1-users-referrals-rewards",
        "summary": "Get referral rewards for the current user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "number"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/claimable": {
      "get": {
        "operationId": "v1-users-referrals-claimable",
        "summary": "Get the claimable reward balance (referral + clan leader) for the current user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralClaimable"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/summary": {
      "get": {
        "operationId": "v1-users-referrals-summary",
        "summary": "Get the current user’s referral earn rate and 30-day volume tier progress",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralSummary"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/claim": {
      "post": {
        "operationId": "v1-users-referrals-claim",
        "summary": "Claim the full claimable reward balance (referral + clan leader)",
        "description": "Creates a payout for the entire claimable balance — referral earnings plus clan leader earnings when the user owns a clan — paid as a single USDC transfer to the user’s primary wallet on Hyperliquid. The amount is computed server-side. At most one claim can be in flight at a time.",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClaimReferralRewardsOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "409": {
            "description": "A previous claim is still being processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.CONFLICT"
                }
              }
            }
          },
          "412": {
            "description": "Nothing to claim or no payout wallet",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.PRECONDITION_FAILED"
                }
              }
            }
          },
          "503": {
            "description": "Reward payouts are temporarily unavailable (hot wallet cannot cover the claim)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.SERVICE_UNAVAILABLE"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/referrals/payouts": {
      "get": {
        "operationId": "v1-users-referrals-payouts",
        "summary": "List referral reward payouts for the current user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListReferralPayoutsOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/holders": {
      "get": {
        "operationId": "v1-users-holders-byAsset",
        "summary": "List users currently holding an asset",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 50
            },
            "required": true
          },
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FriendsPerformanceOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/holders/batch": {
      "post": {
        "operationId": "v1-users-holders-byAssets",
        "summary": "List top holders for multiple assets",
        "tags": [
          "user"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbols": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 50
                    }
                  },
                  "limit": {
                    "default": 3,
                    "type": "number",
                    "minimum": 1,
                    "maximum": 10
                  },
                  "filter": {
                    "default": "all",
                    "type": "string",
                    "enum": [
                      "all",
                      "friends",
                      "clan"
                    ]
                  },
                  "network": {
                    "default": "hyperliquid_mainnet",
                    "type": "string",
                    "enum": [
                      "hyperliquid_testnet",
                      "hyperliquid_mainnet",
                      "hyperliquid_paper"
                    ]
                  },
                  "marketType": {
                    "default": "perps",
                    "type": "string",
                    "enum": [
                      "perps",
                      "spot"
                    ]
                  }
                },
                "required": [
                  "symbols"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "object",
                    "properties": {
                      "holders": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "user": {
                              "$ref": "#/components/schemas/PublicUser"
                            },
                            "isLong": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "user",
                            "isLong"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "totalCount": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "holders",
                      "totalCount"
                    ],
                    "additionalProperties": false
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/preferences": {
      "get": {
        "operationId": "v1-users-preferences-get",
        "summary": "Get current user preferences",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferences"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-users-preferences-update",
        "summary": "Update current user preferences",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tokenSelectorSort": {
                    "$ref": "#/components/schemas/TokenSelectorSort"
                  },
                  "favoriteTimeframes": {
                    "maxItems": 24,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 8
                    }
                  },
                  "chartType": {
                    "type": "string",
                    "enum": [
                      "bars",
                      "candles",
                      "hollow-candles",
                      "line",
                      "area",
                      "baseline",
                      "heikin-ashi"
                    ]
                  },
                  "locale": {
                    "type": "string",
                    "enum": [
                      "en",
                      "fr",
                      "th",
                      "ko",
                      "ja",
                      "zh-CN"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserPreferences"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/batch": {
      "post": {
        "operationId": "v1-users-batch",
        "summary": "Get users by IDs (batch)",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ids": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "ids"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUser"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/trading-stats": {
      "post": {
        "operationId": "v1-users-tradingStats",
        "summary": "Get trading stats for users",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "period": {
                    "type": "string",
                    "enum": [
                      "24h",
                      "7d",
                      "30d",
                      "all"
                    ]
                  }
                },
                "required": [
                  "userIds",
                  "period"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserTradingStatsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/batch-by-usernames": {
      "post": {
        "operationId": "v1-users-batchByUsernames",
        "summary": "Get users by usernames (batch)",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "usernames": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 50
                    }
                  }
                },
                "required": [
                  "usernames"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUser"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{id}": {
      "get": {
        "operationId": "v1-users-get",
        "summary": "Get user by ID",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UserProfile"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/username/{username}": {
      "get": {
        "operationId": "v1-users-getByUsername",
        "summary": "Get user by username",
        "tags": [
          "user"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "username",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UserProfile"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{userId}/position": {
      "get": {
        "operationId": "v1-users-position",
        "summary": "Get a user's open position for a symbol",
        "tags": [
          "users"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionByUserOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/suggestions": {
      "get": {
        "operationId": "v1-chat-suggestions",
        "summary": "Get suggested new users to chat with",
        "description": "Returns a list of active real users ordered by most recently online. Excludes current user and NPCs.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicUser"
                      }
                    }
                  },
                  "required": [
                    "users"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages": {
      "get": {
        "operationId": "v1-chat-messages-list",
        "summary": "List messages in a chat room",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "fetchDirection",
            "schema": {
              "type": "string",
              "enum": [
                "older",
                "newer"
              ]
            }
          },
          {
            "in": "query",
            "name": "anchor",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "onlyTradeEvents",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "excludeTradeEvents",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v1-chat-messages-send",
        "summary": "Send a message to a chat room (creates room lazily if needed)",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messageType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "audio"
                    ]
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMessageId": {
                    "type": "string"
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "replyToId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "duel",
                      "group",
                      "swap",
                      "dm",
                      "post",
                      "clan"
                    ]
                  },
                  "roomId": {
                    "type": "string"
                  },
                  "channelName": {
                    "type": "string"
                  },
                  "user1Id": {
                    "type": "string"
                  },
                  "user2Id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "memberIds": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "groupId": {
                    "type": "string"
                  },
                  "tokenId": {
                    "type": "string"
                  },
                  "duelId": {
                    "type": "string"
                  },
                  "postId": {
                    "type": "string"
                  },
                  "clanId": {
                    "type": "string"
                  }
                },
                "required": [
                  "messageType",
                  "clientMessageId",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/batch": {
      "post": {
        "operationId": "v1-chat-messages-batch",
        "summary": "Get multiple messages by IDs",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messageIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "messageIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageGetByIdsOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/forward": {
      "post": {
        "operationId": "v1-chat-messages-forward",
        "summary": "Forward a chat message to another room with an optional comment",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messageId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "clientMessageId": {
                    "type": "string"
                  },
                  "roomId": {
                    "type": "string"
                  },
                  "channelName": {
                    "type": "string"
                  },
                  "comment": {
                    "type": "string"
                  }
                },
                "required": [
                  "messageId",
                  "clientMessageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ForwardMessageOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/{messageId}": {
      "delete": {
        "operationId": "v1-chat-messages-delete",
        "summary": "Soft delete a message",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-chat-messages-edit",
        "summary": "Edit a chat message",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatMessage"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/{messageId}/pin": {
      "patch": {
        "operationId": "v1-chat-messages-pin",
        "summary": "Pin or unpin a message",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "pinned": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "pinned"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "pinned": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success",
                    "pinned"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/pinned": {
      "get": {
        "operationId": "v1-chat-messages-pinned",
        "summary": "Get all pinned messages in a room",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PinnedMessagesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/search": {
      "get": {
        "operationId": "v1-chat-messages-search",
        "summary": "Search chat messages by text",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "required": true
          },
          {
            "in": "query",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "archived",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "acceptedOnly",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MessageSearchOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/{messageId}/reactions": {
      "post": {
        "operationId": "v1-chat-reactions-toggle",
        "summary": "Toggle a reaction on a message (add if not exists, remove if exists)",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "emoji": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 32
                  }
                },
                "required": [
                  "emoji"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "action": {
                      "type": "string",
                      "enum": [
                        "added",
                        "removed"
                      ]
                    },
                    "emoji": {
                      "type": "string"
                    },
                    "messageId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "action",
                    "emoji",
                    "messageId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/messages/{messageId}/like": {
      "post": {
        "operationId": "v1-chat-likes-toggle",
        "summary": "Toggle like on a message",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "liked": {
                      "type": "boolean"
                    },
                    "likeCount": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "liked",
                    "likeCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms": {
      "get": {
        "operationId": "v1-chat-rooms-list",
        "summary": "List chat rooms the user is a member of",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "dm",
                "group",
                "clan",
                "duel"
              ]
            }
          },
          {
            "in": "query",
            "name": "archived",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v1-chat-rooms-create",
        "summary": "Create a new group chat room",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memberIds": {
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "memberIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "roomId": {
                      "type": "string"
                    },
                    "channelName": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "roomId",
                    "channelName",
                    "name"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/search": {
      "get": {
        "operationId": "v1-chat-rooms-search",
        "summary": "Search sendable DM, group, and clan rooms by room or member name",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomSearchOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/requests": {
      "get": {
        "operationId": "v1-chat-rooms-listRequests",
        "summary": "List pending DM message requests",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoomListOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/global": {
      "get": {
        "operationId": "v1-chat-rooms-getGlobal",
        "summary": "Get the global chat room",
        "description": "Returns the global chat room, auto-joining the caller on first fetch. `otherMembers` is always empty for the global room (its membership is the entire userbase); `memberCount` carries the total instead. Subscribe to the returned `channelName` for real-time messages.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoom"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}": {
      "get": {
        "operationId": "v1-chat-rooms-get",
        "summary": "Get a user's chat room by ID",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoom"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-chat-rooms-update",
        "summary": "Update a group chat room (name, image)",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "imageUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/with-message": {
      "post": {
        "operationId": "v1-chat-rooms-createAndSendMessage",
        "summary": "Atomically create group chat and send first message",
        "description": "Creates a new group chat room and sends the first message in a single operation. This endpoint is designed for mobile clients to avoid race conditions.",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "memberIds": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "name": {
                    "type": "string"
                  },
                  "imageUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "messageType": {
                    "type": "string",
                    "enum": [
                      "text",
                      "audio"
                    ]
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "clientMessageId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "memberIds",
                  "messageType",
                  "clientMessageId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "room": {
                      "$ref": "#/components/schemas/ChatRoom"
                    },
                    "message": {
                      "$ref": "#/components/schemas/ChatMessage"
                    }
                  },
                  "required": [
                    "room",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/dm": {
      "post": {
        "operationId": "v1-chat-rooms-getOrCreateDM",
        "summary": "Get or create a DM room with another user",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "otherUserId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "otherUserId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomWithMessages"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/image": {
      "post": {
        "operationId": "v1-chat-rooms-uploadImage",
        "summary": "Get presigned URL for group chat image upload",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "mimeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "fileSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "filename",
                  "mimeType",
                  "fileSize"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uploadUrl": {
                      "type": "string"
                    },
                    "fileKey": {
                      "type": "string"
                    },
                    "mediaUrl": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "uploadUrl",
                    "fileKey",
                    "mediaUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members": {
      "post": {
        "operationId": "v1-chat-rooms-addMember",
        "summary": "Add a member to a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members/me": {
      "delete": {
        "operationId": "v1-chat-rooms-leave",
        "summary": "Leave a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members/{userId}": {
      "delete": {
        "operationId": "v1-chat-rooms-removeMember",
        "summary": "Remove a member from a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members/{userId}/ban": {
      "post": {
        "operationId": "v1-chat-rooms-banMember",
        "summary": "Ban a member from a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BanMemberOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members/{userId}/unban": {
      "post": {
        "operationId": "v1-chat-rooms-unbanMember",
        "summary": "Unban a member from a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UnbanMemberOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/banned-members": {
      "get": {
        "operationId": "v1-chat-rooms-bannedMembers",
        "summary": "List the user IDs currently banned from a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BannedMembersOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/members/{userId}/role": {
      "patch": {
        "operationId": "v1-chat-rooms-updateMemberRole",
        "summary": "Update a member role in a group chat",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/transfer": {
      "post": {
        "operationId": "v1-chat-rooms-transferOwnership",
        "summary": "Transfer ownership of a group chat to another member",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "newOwnerId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "newOwnerId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/request": {
      "post": {
        "operationId": "v1-chat-rooms-respondToRequest",
        "summary": "Accept or decline a message request for a room",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "accept",
                      "decline"
                    ]
                  }
                },
                "required": [
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/muted": {
      "patch": {
        "operationId": "v1-chat-rooms-setMuted",
        "summary": "Mute or unmute notifications for a chat room",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "muted": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "muted"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomMutedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/pin": {
      "post": {
        "operationId": "v1-chat-rooms-pin",
        "summary": "Pin a chat room to the top of the current user’s list",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomPinnedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/unpin": {
      "post": {
        "operationId": "v1-chat-rooms-unpin",
        "summary": "Unpin a chat room for the current user",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomPinnedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/archive": {
      "post": {
        "operationId": "v1-chat-rooms-archive",
        "summary": "Archive a chat room for the current user",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomArchivedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/unarchive": {
      "post": {
        "operationId": "v1-chat-rooms-unarchive",
        "summary": "Unarchive a chat room for the current user",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomArchivedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/hide": {
      "post": {
        "operationId": "v1-chat-rooms-hide",
        "summary": "Hide a chat room (\"delete for me\", or for everyone on a DM)",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "forEveryone": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomHiddenOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chat/rooms/{roomId}/read": {
      "post": {
        "operationId": "v1-chat-rooms-markRead",
        "summary": "Mark all messages in a chat room as read",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "roomId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChatRoomMarkReadOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/queue": {
      "post": {
        "operationId": "v1-arena-queue-enter",
        "summary": "Enter the 1v1 arena queue",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "maxBet": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "duelTime": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "chainTeamId": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "maxBet",
                  "duelTime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaEnter1v1QueueOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-arena-queue-cancel",
        "summary": "Cancel queue entry",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaCancelQueueOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-arena-queue-get",
        "summary": "Get queue status for the current user",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaQueueStatus"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/queue/count": {
      "get": {
        "operationId": "v1-arena-queue-count",
        "summary": "Get the number of users currently in queue with a sample for display",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaQueueCount"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels": {
      "get": {
        "operationId": "v1-arena-duels-list",
        "summary": "List duels (mine, active, recent, settled, or clan)",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "type": "string",
              "enum": [
                "mine",
                "active",
                "recent",
                "settled",
                "clan"
              ]
            },
            "required": true
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaListDuelsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}": {
      "get": {
        "operationId": "v1-arena-duels-get",
        "summary": "Get a duel by ID",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaGetDuelByIdOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/public": {
      "get": {
        "operationId": "v1-arena-duels-getPublic",
        "summary": "Get a duel by ID (public, no auth required)",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaGetPublicDuelOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/accept": {
      "post": {
        "operationId": "v1-arena-duels-accept",
        "summary": "Accept a pending duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaAcceptDuelOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/decline": {
      "post": {
        "operationId": "v1-arena-duels-decline",
        "summary": "Decline a pending duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaDeclineDuelOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/activity": {
      "get": {
        "operationId": "v1-arena-duels-getActivity",
        "summary": "Get activity log for a duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaActivityLogOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/pnl-chart": {
      "get": {
        "operationId": "v1-arena-duels-getPnlChart",
        "summary": "Get PNL % chart data for a duel",
        "tags": [
          "arena"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaDuelPnlChartOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/spotlight": {
      "get": {
        "operationId": "v1-arena-duels-spotlight",
        "summary": "Get the spotlight duel for notch and king of the hill",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaSpotlightOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/duels/{duelId}/fills": {
      "get": {
        "operationId": "v1-arena-duels-fills-list",
        "summary": "List fills for a duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaDuelFillsListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/wallets": {
      "post": {
        "operationId": "v1-arena-wallets-createOrGet",
        "summary": "Create or get arena wallet",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "walletAddress": {
                    "type": "string",
                    "minLength": 1
                  },
                  "privyWalletId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "walletAddress"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaCreateOrGetWalletOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/wallets/has-wagered": {
      "get": {
        "operationId": "v1-arena-wallets-hasWagered",
        "summary": "Check if user has participated in a wagered duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaHasWageredOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/wallets/return-funds": {
      "post": {
        "operationId": "v1-arena-wallets-returnFunds",
        "summary": "Return arena wallet funds to main wallet",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaReturnFundsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/wallets/update-signer-quorum": {
      "post": {
        "operationId": "v1-arena-wallets-updateSignerQuorum",
        "summary": "Record signer quorum attachment for a wallet",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "walletType": {
                    "type": "string",
                    "enum": [
                      "arena",
                      "main"
                    ]
                  },
                  "quorumId": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "walletType",
                  "quorumId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaUpdateSignerQuorumOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/wallets/{userId}": {
      "get": {
        "operationId": "v1-arena-wallets-get",
        "summary": "Get arena wallet address by user ID",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaWalletAddress"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/settlements/unseen": {
      "get": {
        "operationId": "v1-arena-settlements-getUnseen",
        "summary": "Get unseen settlement for the current user",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaGetUnseenSettlementOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/settlements/{duelId}/seen": {
      "post": {
        "operationId": "v1-arena-settlements-markSeen",
        "summary": "Mark a duel settlement as seen",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaMarkSettlementSeenOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/ensure-unified-account": {
      "post": {
        "operationId": "v1-arena-ensureUnifiedAccount",
        "summary": "Ensure arena wallet has unified account enabled",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaEnsureUnifiedAccountOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/competitions/leaderboard": {
      "get": {
        "operationId": "v1-arena-competitions-getLeaderboard",
        "summary": "Get live arena competition leaderboard",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "competitionId",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaCompetitionLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites": {
      "post": {
        "operationId": "v1-arena-invites-send",
        "summary": "Send a 1v1 arena challenge (direct or open)",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetUserId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "maxBet": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 100000
                  },
                  "duelTime": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "maxBet",
                  "duelTime"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaInviteSendOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites/{invitationId}/respond": {
      "post": {
        "operationId": "v1-arena-invites-respond",
        "summary": "Accept or decline a 1v1 arena invitation",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "invitationId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "response": {
                    "type": "string",
                    "enum": [
                      "accepted",
                      "declined"
                    ]
                  }
                },
                "required": [
                  "response"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaInviteRespondOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "409": {
            "description": "A previous claim is still being processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.CONFLICT"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites/{invitationId}/cancel": {
      "post": {
        "operationId": "v1-arena-invites-cancel",
        "summary": "Cancel a pending arena invitation you sent",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "invitationId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaInviteCancelOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "409": {
            "description": "A previous claim is still being processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.CONFLICT"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites/can-challenge": {
      "get": {
        "operationId": "v1-arena-invites-canChallenge",
        "summary": "Check whether the current user can challenge the target user",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "targetUserId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaInviteCanChallengeOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites/received": {
      "get": {
        "operationId": "v1-arena-invites-listReceived",
        "summary": "List pending arena invitations addressed to the current user",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaListReceivedInvitesOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/invites/sent": {
      "get": {
        "operationId": "v1-arena-invites-listSent",
        "summary": "List pending arena invitations the current user has sent",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaListSentInvitesOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/open-challenges/{inviteCode}": {
      "get": {
        "operationId": "v1-arena-openChallenges-get",
        "summary": "Get an open challenge by invite code",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "inviteCode",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 36
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaOpenChallengeGetOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/open-challenges": {
      "get": {
        "operationId": "v1-arena-openChallenges-list",
        "summary": "List active open challenges",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "number",
              "minimum": 1,
              "maximum": 50
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaOpenChallengeListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/open-challenges/accept": {
      "post": {
        "operationId": "v1-arena-openChallenges-accept",
        "summary": "Accept an open challenge by invite code",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "inviteCode": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 36
                  }
                },
                "required": [
                  "inviteCode"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaOpenChallengeAcceptOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/leaderboard": {
      "get": {
        "operationId": "v1-arena-leaderboard",
        "summary": "Get the all-time arena leaderboard",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "elo",
              "type": "string",
              "enum": [
                "elo",
                "wins",
                "losses",
                "totalPnl",
                "avgRoiPct"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/leaderboard/me/rank": {
      "get": {
        "operationId": "v1-arena-leaderboardRank",
        "summary": "Get current user all-time arena rank",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ArenaLeaderboardMeRank"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/season/leaderboard": {
      "get": {
        "operationId": "v1-arena-season-leaderboard",
        "summary": "Get a Season Zero week arena leaderboard",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "week",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "required": true
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "elo",
              "type": "string",
              "enum": [
                "elo",
                "wins",
                "losses",
                "totalPnl",
                "avgRoiPct"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arena/season/leaderboard/me/rank": {
      "get": {
        "operationId": "v1-arena-season-rank",
        "summary": "Get current user arena rank for a Season Zero week",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "week",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ArenaLeaderboardMeRank"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/friends": {
      "get": {
        "operationId": "v1-friends-list",
        "summary": "Get friends (mutual followers)",
        "tags": [
          "friends"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 200,
              "type": "integer",
              "minimum": 1,
              "maximum": 500
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FriendsListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/following": {
      "get": {
        "operationId": "v1-following-list",
        "summary": "Get users that a user is following (or the current user if authenticated)",
        "tags": [
          "following"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 50
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowingListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/followers": {
      "get": {
        "operationId": "v1-following-listFollowers",
        "summary": "Get followers for a user (or the current user if authenticated)",
        "tags": [
          "following"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FollowingListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/follow-suggestions": {
      "get": {
        "operationId": "v1-following-suggestions",
        "summary": "Get suggested users to follow",
        "description": "Returns top traders the user is not already following, ordered by performance.",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 5,
              "type": "number",
              "minimum": 1,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PublicUser"
                      }
                    }
                  },
                  "required": [
                    "users"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{targetId}/follow": {
      "post": {
        "operationId": "v1-following-follow",
        "summary": "Follow a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "user_id": {
                      "type": "string"
                    },
                    "target_id": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string",
                      "enum": [
                        "friend",
                        "follow",
                        "block",
                        "mute",
                        "notification_mute"
                      ]
                    },
                    "created_at": {
                      "type": "string"
                    },
                    "updated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "user_id",
                    "target_id",
                    "type",
                    "created_at",
                    "updated_at"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-following-unfollow",
        "summary": "Unfollow a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/following/check": {
      "post": {
        "operationId": "v1-following-check",
        "summary": "Check if current user is following multiple users",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetIds": {
                    "maxItems": 300,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "targetIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "$ref": "#/components/schemas/FollowCheckStatus"
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{targetId}/mute": {
      "post": {
        "operationId": "v1-following-mute",
        "summary": "Mute a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-following-unmute",
        "summary": "Unmute a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/following/check-mute": {
      "get": {
        "operationId": "v1-following-checkMute",
        "summary": "Check if current user has muted a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "isMuted": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "isMuted"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/muted": {
      "get": {
        "operationId": "v1-following-listMuted",
        "summary": "Get all users that the current user has muted",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMutedOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/{targetId}/notification-mute": {
      "post": {
        "operationId": "v1-following-notificationMute",
        "summary": "Mute trade notifications from a followed user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationMuteOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-following-notificationUnmute",
        "summary": "Unmute trade notifications from a followed user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationUnmuteOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/following/check-notification-mute": {
      "get": {
        "operationId": "v1-following-checkNotificationMute",
        "summary": "Check if current user has notification-muted a user",
        "tags": [
          "following"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CheckNotificationMuteOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/uploads": {
      "post": {
        "operationId": "v1-attachments-requestUpload",
        "summary": "Request a presigned URL for uploading an attachment",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filename": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 255
                  },
                  "mimeType": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "fileSize": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "image",
                      "video",
                      "file",
                      "audio",
                      "gif",
                      "sticker"
                    ]
                  },
                  "width": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "height": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "blurHash": {
                    "type": "string",
                    "maxLength": 50
                  },
                  "duration": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "filename",
                  "mimeType",
                  "fileSize",
                  "type"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "uploadUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "s3Key": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "attachmentId",
                    "uploadUrl",
                    "s3Key",
                    "url"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{attachmentId}/confirm": {
      "post": {
        "operationId": "v1-attachments-confirmUpload",
        "summary": "Confirm that an attachment has been uploaded to S3",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "attachmentId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "attachment": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "message_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "post_id": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "user_id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "image",
                            "video",
                            "file",
                            "audio",
                            "gif",
                            "sticker"
                          ]
                        },
                        "upload_status": {
                          "type": "string",
                          "enum": [
                            "pending",
                            "uploading",
                            "completed",
                            "failed"
                          ]
                        },
                        "url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "external_url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "s3_key": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "filename": {
                          "type": "string"
                        },
                        "mime_type": {
                          "type": "string"
                        },
                        "file_size": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "width": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "height": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "blur_hash": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "duration": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thumbnail_url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "order": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "uploaded_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "message_id",
                        "post_id",
                        "user_id",
                        "type",
                        "upload_status",
                        "url",
                        "external_url",
                        "s3_key",
                        "filename",
                        "mime_type",
                        "file_size",
                        "width",
                        "height",
                        "blur_hash",
                        "duration",
                        "thumbnail_url",
                        "order",
                        "created_at",
                        "uploaded_at"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "success",
                    "attachment"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{attachmentId}": {
      "delete": {
        "operationId": "v1-attachments-delete",
        "summary": "Delete an attachment that is not yet associated with a message",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "attachmentId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "deletedAttachmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "success",
                    "deletedAttachmentId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/{attachmentId}/download": {
      "get": {
        "operationId": "v1-attachments-download",
        "summary": "Get a presigned URL for downloading an attachment",
        "tags": [
          "attachments"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "attachmentId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "signedUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "filename": {
                      "type": "string"
                    },
                    "mimeType": {
                      "type": "string"
                    },
                    "expiresAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "signedUrl",
                    "filename",
                    "mimeType",
                    "expiresAt"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/gifs": {
      "post": {
        "operationId": "v1-attachments-createGif",
        "summary": "Create a GIF attachment from an external URL (Giphy)",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "externalUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "thumbnailUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "width": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "height": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "externalUrl",
                  "width",
                  "height"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "externalUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "thumbnailUrl": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uri"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "width": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "height": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "attachmentId",
                    "externalUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attachments/stickers": {
      "post": {
        "operationId": "v1-attachments-createSticker",
        "summary": "Create a sticker attachment from a known sticker URL",
        "tags": [
          "attachments"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stickerId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "externalUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "width": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "height": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "stickerId",
                  "externalUrl",
                  "width",
                  "height"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "attachmentId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "externalUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "width": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "height": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "attachmentId",
                    "externalUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/fills/history": {
      "get": {
        "operationId": "v1-fills-history",
        "summary": "Get fill history for a wallet",
        "tags": [
          "fills"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "aggregateByTime",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FillHistoryOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/eligibility": {
      "get": {
        "operationId": "v1-clans-eligibility",
        "summary": "Get current user's clan eligibility status",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canCreate": {
                      "type": "boolean"
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "not_found",
                        "already_in_clan",
                        "insufficient_volume"
                      ]
                    },
                    "currentVolume": {
                      "type": "number"
                    },
                    "requiredVolume": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "canCreate",
                    "currentVolume",
                    "requiredVolume"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans": {
      "post": {
        "operationId": "v1-clans-create",
        "summary": "Create a new clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 12,
                    "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$"
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 1000
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Clan"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-clans-list",
        "summary": "List all clans",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaderboard/clans": {
      "get": {
        "operationId": "v1-clans-leaderboard",
        "summary": "Get clan leaderboard with aggregated performance stats",
        "tags": [
          "clans"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "totalPnl",
              "type": "string",
              "enum": [
                "totalPnl",
                "totalValue",
                "memberCount",
                "name"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/leaderboard/clans/me/rank": {
      "get": {
        "operationId": "v1-clans-leaderboardRank",
        "summary": "Get the current user's clan rank on the clan leaderboard",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "24h",
                "7d",
                "30d",
                "all"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "totalPnl",
              "type": "string",
              "enum": [
                "totalPnl",
                "totalValue",
                "memberCount",
                "name"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ClanLeaderboardMeRank"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/incentives": {
      "get": {
        "operationId": "v1-clans-incentives",
        "summary": "Get clan volume incentive tier and member rebate details",
        "tags": [
          "clans",
          "rewards"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanIncentive"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/users/me/clan": {
      "get": {
        "operationId": "v1-clans-mine",
        "summary": "Get the current user's clan",
        "tags": [
          "clans",
          "users"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Clan"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/name/{name}": {
      "get": {
        "operationId": "v1-clans-getByName",
        "summary": "Get a clan by name",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "name",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Clan"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/requests": {
      "post": {
        "operationId": "v1-clans-requests-send",
        "summary": "Send a request to join a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-clans-requests-list",
        "summary": "Get pending membership requests for a clan (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "requests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "user": {
                            "$ref": "#/components/schemas/PublicUser"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "user",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "requests",
                    "total",
                    "hasMore"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/requests/me": {
      "delete": {
        "operationId": "v1-clans-requests-cancel",
        "summary": "Cancel a pending request to join a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-clans-requests-hasPending",
        "summary": "Check if user has a pending request to join a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasRequest": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "hasRequest"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/requests/{requestId}": {
      "get": {
        "operationId": "v1-clans-requests-isPending",
        "summary": "Check if a clan join request is still pending",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "requestId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "isPending": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "isPending"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/requests/{requestId}/approve": {
      "post": {
        "operationId": "v1-clans-requests-approve",
        "summary": "Approve a pending membership request (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "requestId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/requests/{requestId}/decline": {
      "post": {
        "operationId": "v1-clans-requests-decline",
        "summary": "Decline a pending membership request (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "requestId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/members/me": {
      "delete": {
        "operationId": "v1-clans-leave",
        "summary": "Leave a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/members": {
      "get": {
        "operationId": "v1-clans-members-list",
        "summary": "Get clan members",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanMembersOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v1-clans-join",
        "summary": "Join a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clanId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "userId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "role": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "admin",
                        "member"
                      ]
                    },
                    "channelName": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "clanId",
                    "userId",
                    "role",
                    "channelName"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/members/{userId}": {
      "delete": {
        "operationId": "v1-clans-members-remove",
        "summary": "Kick a member from a clan (admin/leader only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/members/{userId}/role": {
      "patch": {
        "operationId": "v1-clans-members-updateRole",
        "summary": "Update a member role (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "admin",
                      "member"
                    ]
                  }
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "newRole": {
                      "type": "string",
                      "enum": [
                        "admin",
                        "member"
                      ]
                    }
                  },
                  "required": [
                    "success",
                    "newRole"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/invites": {
      "post": {
        "operationId": "v1-clans-invites-send",
        "summary": "Send a clan invite to a user",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetUserId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "targetUserId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "success",
                    "message"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "409": {
            "description": "A previous claim is still being processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.CONFLICT"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-clans-invites-list",
        "summary": "Get pending invites for a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pendingInviteUserIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    },
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "pendingInviteUserIds",
                    "total",
                    "hasMore"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/invites/me": {
      "get": {
        "operationId": "v1-clans-invites-hasPending",
        "summary": "Check if current user has a pending invite to a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "hasInvite": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "hasInvite"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-clans-invites-decline",
        "summary": "Decline a pending clan invitation",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/invites/{userId}": {
      "delete": {
        "operationId": "v1-clans-invites-cancel",
        "summary": "Cancel a pending clan invitation (sender or admin/owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}": {
      "patch": {
        "operationId": "v1-clans-update",
        "summary": "Update clan details",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "anyOf": [
                      {
                        "type": "string",
                        "maxLength": 1000
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "imageUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bannerUrl": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uri"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "imageUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "bannerUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "description",
                    "imageUrl",
                    "bannerUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-clans-delete",
        "summary": "Disband/delete a clan (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{clanId}/image": {
      "post": {
        "operationId": "v1-clans-uploadImage",
        "summary": "Get presigned URL for uploading clan image",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {
                    "type": "string"
                  },
                  "contentType": {
                    "type": "string"
                  },
                  "imageType": {
                    "type": "string",
                    "enum": [
                      "avatar",
                      "banner"
                    ]
                  }
                },
                "required": [
                  "fileName",
                  "contentType",
                  "imageType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uploadUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "fileKey": {
                      "type": "string"
                    },
                    "mediaUrl": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "required": [
                    "uploadUrl",
                    "fileKey",
                    "mediaUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/clans/{id}": {
      "get": {
        "operationId": "v1-clans-get",
        "summary": "Get a clan by ID",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/Clan"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/favorites": {
      "get": {
        "operationId": "v1-favorites-list",
        "summary": "List favorite perps",
        "tags": [
          "favorites"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbols": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "symbols"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v1-favorites-add",
        "summary": "Add a perp to favorites",
        "tags": [
          "favorites"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  }
                },
                "required": [
                  "symbol"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "symbol"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/favorites/{symbol}": {
      "delete": {
        "operationId": "v1-favorites-remove",
        "summary": "Remove a perp from favorites",
        "tags": [
          "favorites"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "symbol",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "symbol"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search": {
      "get": {
        "operationId": "v1-search-all",
        "summary": "Unified search across users, tokens, and clans",
        "tags": [
          "search"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "users": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/UnifiedSearchUserResult"
                          }
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "items",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "clans": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SearchClanResult"
                          }
                        },
                        "hasMore": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "items",
                        "hasMore"
                      ],
                      "additionalProperties": false
                    },
                    "query": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "users",
                    "clans",
                    "query"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search/users": {
      "get": {
        "operationId": "v1-search-users",
        "summary": "Search for users by username or display name",
        "tags": [
          "search"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchUsersOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/search/clans": {
      "get": {
        "operationId": "v1-search-clans",
        "summary": "Search for clans by name",
        "tags": [
          "search"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "clans": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Clan"
                      }
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "clans",
                    "hasMore"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/mine": {
      "get": {
        "operationId": "v1-positions-mine",
        "summary": "Get my open position for a symbol",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MinePositionOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/history": {
      "get": {
        "operationId": "v1-positions-history",
        "summary": "Get position history for a wallet or copy profile",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "copyProfileId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "open",
                "closed"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "openedAt",
              "type": "string",
              "enum": [
                "openedAt",
                "realizedPnl",
                "funding"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "in": "query",
            "name": "openedAfter",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          },
          {
            "in": "query",
            "name": "openedBefore",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionHistoryOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/asset-performance": {
      "get": {
        "operationId": "v1-positions-assetPerformance",
        "summary": "Get per-asset performance aggregates for a wallet",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "default": "pnl",
              "type": "string",
              "enum": [
                "pnl",
                "trades",
                "winRate",
                "avgWin",
                "volume",
                "asset"
              ]
            }
          },
          {
            "in": "query",
            "name": "sortDirection",
            "schema": {
              "default": "desc",
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetPerformanceOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/recent-outcomes": {
      "get": {
        "operationId": "v1-positions-recentOutcomes",
        "summary": "Get recent trade outcomes (closed + open) for a wallet",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecentOutcomesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/trending": {
      "get": {
        "operationId": "v1-positions-trending",
        "summary": "Top trending open positions across the network",
        "tags": [
          "positions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "default": "everyone",
              "$ref": "#/components/schemas/PositionsTrendingScope"
            }
          },
          {
            "in": "query",
            "name": "board",
            "schema": {
              "$ref": "#/components/schemas/PositionsTrendingBoard"
            }
          },
          {
            "in": "query",
            "name": "take",
            "schema": {
              "default": 5,
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            }
          },
          {
            "in": "query",
            "name": "otherHoldersPreview",
            "schema": {
              "default": 4,
              "type": "integer",
              "minimum": 0,
              "maximum": 10
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionsTrendingOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/positioning": {
      "get": {
        "operationId": "v1-positions-positioning",
        "summary": "Positioning stats for a symbol (Legend users)",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositioningOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/board": {
      "get": {
        "operationId": "v1-positions-board",
        "summary": "List open and recently closed positions across a scope",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "$ref": "#/components/schemas/PositionsBoardScopeKind"
            }
          },
          {
            "in": "query",
            "name": "traderId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "$ref": "#/components/schemas/PositionsBoardStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionsBoardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/moves": {
      "get": {
        "operationId": "v1-positions-moves",
        "summary": "List fill-derived position moves across a scope",
        "tags": [
          "positions"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "scope",
            "schema": {
              "$ref": "#/components/schemas/PositionsMovesScope"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionsMovesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/move-lifecycle": {
      "get": {
        "operationId": "v1-positions-moveLifecycle",
        "summary": "Get the complete lifecycle containing a position move",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "positionId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionMoveLifecycleOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/{positionId}/pnl-sparkline": {
      "get": {
        "operationId": "v1-positions-pnlSparkline",
        "summary": "Get PnL sparkline for a position",
        "tags": [
          "positions"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "positionId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PnlSparklineOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/{positionId}": {
      "get": {
        "operationId": "v1-positions-get",
        "summary": "Get a shareable position by id",
        "tags": [
          "positions"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "positionId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionGetOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts": {
      "get": {
        "operationId": "v1-posts-list",
        "summary": "List posts for the feed",
        "tags": [
          "posts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "following",
                "clan"
              ]
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "fetchDirection",
            "schema": {
              "type": "string",
              "enum": [
                "older",
                "newer"
              ]
            }
          },
          {
            "in": "query",
            "name": "anchor",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPostsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "v1-posts-create",
        "summary": "Create a standalone post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "attachmentIds": {
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "clanId": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatRoomId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "postId",
                    "chatRoomId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/new-count": {
      "get": {
        "operationId": "v1-posts-newCount",
        "summary": "Count unseen feed posts newer than a timestamp",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "since",
            "schema": {
              "type": "string",
              "format": "date-time",
              "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NewPostsProbeOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/chart-notes": {
      "post": {
        "operationId": "v1-posts-createChartNote",
        "summary": "Create a chart note post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "chart_symbol": {
                    "type": "string"
                  },
                  "chart_timestamp": {
                    "type": "string"
                  },
                  "trade_action": {
                    "type": "string",
                    "enum": [
                      "close",
                      "flip",
                      "add",
                      "reduce"
                    ]
                  },
                  "attachmentIds": {
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "chart_symbol",
                  "chart_timestamp"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "postId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatRoomId": {
                      "anyOf": [
                        {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "postId",
                    "chatRoomId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-posts-listChartNotes",
        "summary": "List chart note posts for a symbol",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "startTime",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "endTime",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "following"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListChartPostsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/linked-posts": {
      "get": {
        "operationId": "v1-posts-linkedPosts",
        "summary": "Get linked chart note post IDs for a user",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkedPostsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/batch": {
      "post": {
        "operationId": "v1-posts-batch",
        "summary": "Get multiple posts by IDs",
        "tags": [
          "posts"
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "postIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "postIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPostsByIdsOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{postId}": {
      "patch": {
        "operationId": "v1-posts-update",
        "summary": "Edit a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string"
                  },
                  "attachmentIds": {
                    "maxItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdatePostOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "v1-posts-delete",
        "summary": "Delete a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-posts-get",
        "summary": "Get a post by ID",
        "tags": [
          "posts"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/GetPostOutput"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{postId}/comments": {
      "post": {
        "operationId": "v1-posts-comment",
        "summary": "Add a comment to a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {
                    "type": "string",
                    "minLength": 1
                  },
                  "attachmentIds": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "messageType": {
                    "default": "text",
                    "type": "string",
                    "enum": [
                      "text",
                      "audio"
                    ]
                  },
                  "clientMessageId": {
                    "type": "string"
                  },
                  "replyToId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  }
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "messageId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    "chatRoomId": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  },
                  "required": [
                    "messageId",
                    "chatRoomId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{postId}/comments/{messageId}": {
      "delete": {
        "operationId": "v1-posts-deleteComment",
        "summary": "Delete a comment on a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "messageId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteCommentOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{postId}/like": {
      "post": {
        "operationId": "v1-posts-like",
        "summary": "Toggle like on a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "liked": {
                      "type": "boolean"
                    },
                    "likeCount": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "liked",
                    "likeCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/posts/{postId}/likes": {
      "get": {
        "operationId": "v1-posts-getLikes",
        "summary": "Get users who liked a post",
        "tags": [
          "posts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "postId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetPostLikesOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/deposits/pending": {
      "get": {
        "operationId": "v1-deposits-pending",
        "summary": "Get pending and recent onramp transactions for the current user",
        "tags": [
          "deposits"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deposits": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OnrampTransaction"
                      }
                    }
                  },
                  "required": [
                    "deposits"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/withdrawals/notify-initiated": {
      "post": {
        "operationId": "v1-withdrawals-notifyInitiated",
        "summary": "Notify user that their withdrawal has been submitted (client-side trigger)",
        "tags": [
          "withdrawals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "type": "string"
                  },
                  "currencySymbol": {
                    "type": "string"
                  },
                  "destination": {
                    "type": "string",
                    "enum": [
                      "hyperliquid",
                      "arbitrum"
                    ]
                  }
                },
                "required": [
                  "amount",
                  "currencySymbol",
                  "destination"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "notified": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "notified"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/x-account/recommendations": {
      "get": {
        "operationId": "v1-xAccount-recommendations",
        "summary": "Get X friend recommendations",
        "tags": [
          "x-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "recommendations": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "user": {
                            "$ref": "#/components/schemas/PublicUser"
                          },
                          "isFollowing": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "user",
                          "isFollowing"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "totalXFollowings": {
                      "type": "number"
                    },
                    "matchedCount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "recommendations",
                    "totalXFollowings",
                    "matchedCount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/x-account/follow-recommendations": {
      "post": {
        "operationId": "v1-xAccount-followRecommendations",
        "summary": "Follow multiple users from X recommendations",
        "tags": [
          "x-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetIds": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    }
                  }
                },
                "required": [
                  "targetIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "followedCount": {
                      "type": "number"
                    },
                    "errors": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "followedCount",
                    "errors"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/x-account/link": {
      "post": {
        "operationId": "v1-xAccount-link",
        "summary": "Link X account: sync username from Privy after OAuth",
        "tags": [
          "x-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "synced": {
                      "type": "boolean"
                    },
                    "xUsername": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avatarUrl": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "synced",
                    "xUsername",
                    "avatarUrl"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/x-account": {
      "delete": {
        "operationId": "v1-xAccount-unlink",
        "summary": "Unlink X account: clear x_username and unlink from Privy",
        "tags": [
          "x-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unlinked": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "unlinked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/telegram-account/link": {
      "post": {
        "operationId": "v1-telegramAccount-link",
        "summary": "Link Telegram account: sync telegram_id from Privy after linking",
        "tags": [
          "telegram-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "synced": {
                      "type": "boolean"
                    },
                    "telegramId": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "synced",
                    "telegramId"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "409": {
            "description": "A previous claim is still being processed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.CONFLICT"
                }
              }
            }
          }
        }
      }
    },
    "/v1/telegram-account": {
      "delete": {
        "operationId": "v1-telegramAccount-unlink",
        "summary": "Unlink Telegram account: clear telegram_id",
        "tags": [
          "telegram-account"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "unlinked": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "unlinked"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/history/user": {
      "get": {
        "operationId": "v1-portfolio-history-user",
        "summary": "Get portfolio history for a single wallet address",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 1460
            }
          },
          {
            "in": "query",
            "name": "minutes",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "metricType",
            "schema": {
              "default": "accountValue",
              "type": "string",
              "enum": [
                "accountValue",
                "pnl"
              ]
            }
          },
          {
            "in": "query",
            "name": "singleWallet",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "includePositions",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "in": "query",
            "name": "includePositionSymbols",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          },
                          "positions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string"
                                },
                                "size": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "entry_price": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unrealized_pnl": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "leverage_type": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "leverage_value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "position_value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "margin_used": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "symbol",
                                "size",
                                "entry_price",
                                "unrealized_pnl",
                                "leverage_type",
                                "leverage_value",
                                "position_value",
                                "margin_used"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "position_symbols": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "time",
                          "value",
                          "positions"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "history"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/history/by-user": {
      "get": {
        "operationId": "v1-portfolio-history-byUser",
        "summary": "Get aggregate portfolio history across all of a user’s wallets",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 1460
            }
          },
          {
            "in": "query",
            "name": "minutes",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          {
            "in": "query",
            "name": "metricType",
            "schema": {
              "default": "accountValue",
              "type": "string",
              "enum": [
                "accountValue",
                "pnl"
              ]
            }
          },
          {
            "in": "query",
            "name": "includePositions",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "in": "query",
            "name": "includePositionSymbols",
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          },
                          "positions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "symbol": {
                                  "type": "string"
                                },
                                "size": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "entry_price": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "unrealized_pnl": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "leverage_type": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "leverage_value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "position_value": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "margin_used": {
                                  "anyOf": [
                                    {
                                      "type": "number"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                }
                              },
                              "required": [
                                "symbol",
                                "size",
                                "entry_price",
                                "unrealized_pnl",
                                "leverage_type",
                                "leverage_value",
                                "position_value",
                                "margin_used"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "position_symbols": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "time",
                          "value",
                          "positions"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "history"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/history/combined": {
      "get": {
        "operationId": "v1-portfolio-history-combined",
        "summary": "Get combined NW + PnL history aggregated across all user wallets",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 1460
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CombinedPortfolioHistoryOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/history/clan": {
      "get": {
        "operationId": "v1-portfolio-history-clan",
        "summary": "Get portfolio history for a clan (DEPRECATED — use /clan/combined)",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "deprecated": true,
        "parameters": [
          {
            "in": "query",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 1460
            }
          },
          {
            "in": "query",
            "name": "metricType",
            "schema": {
              "default": "accountValue",
              "type": "string",
              "enum": [
                "accountValue",
                "pnl"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "history": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "time",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "history"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/history/clan/combined": {
      "get": {
        "operationId": "v1-portfolio-history-clanCombined",
        "summary": "Get both account value and PnL history for a clan in one request",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "days",
            "schema": {
              "default": 7,
              "type": "integer",
              "minimum": 1,
              "maximum": 1460
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accountValueHistory": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "time",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pnlHistory": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "time": {
                            "type": "number"
                          },
                          "value": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "time",
                          "value"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "accountValueHistory",
                    "pnlHistory"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/wallet/{address}/stats": {
      "get": {
        "operationId": "v1-portfolio-wallet-stats",
        "summary": "Get point-in-time live stats for a wallet address",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "address",
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletStats"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/realtime": {
      "get": {
        "operationId": "v1-portfolio-realtime",
        "summary": "Get real-time NW and PnL for a user (all wallets aggregated)",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RealtimePortfolioOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/realized-pnl/calendar": {
      "get": {
        "operationId": "v1-portfolio-realizedPnlCalendar",
        "summary": "List daily realized PnL for a calendar month",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "month",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 11
            },
            "required": true
          },
          {
            "in": "query",
            "name": "year",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RealizedPnlCalendar"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/realized-pnl/calendar/clan": {
      "get": {
        "operationId": "v1-portfolio-clanRealizedPnlCalendar",
        "summary": "List daily realized PnL for all clan members in a calendar month",
        "tags": [
          "portfolio"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "month",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 11
            },
            "required": true
          },
          {
            "in": "query",
            "name": "year",
            "schema": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RealizedPnlCalendar"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/bug-reports": {
      "post": {
        "operationId": "v1-bugReports-create",
        "summary": "Submit a bug report",
        "tags": [
          "bug-reports"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "pageUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "sentryReplayUrl": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/reports": {
      "post": {
        "operationId": "v1-reports-create",
        "summary": "Submit a report for a post, comment, or user",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "$ref": "#/components/schemas/ReportType"
                  },
                  "targetId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "reason": {
                    "type": "string",
                    "maxLength": 200
                  },
                  "description": {
                    "type": "string",
                    "maxLength": 2000
                  },
                  "pageUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "type",
                  "targetId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportCreateOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "429": {
            "description": "Too many reports",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.TOO_MANY_REQUESTS"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trades": {
      "post": {
        "operationId": "v1-copyTrading-execute",
        "summary": "Record a copy trade and auto-post to the feed",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetUserId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "margin": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "leverage": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  },
                  "entryPrice": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "targetUserId",
                  "symbol",
                  "side",
                  "amount",
                  "margin",
                  "leverage",
                  "entryPrice"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "copyTrade": {
                      "$ref": "#/components/schemas/CopyTrade"
                    }
                  },
                  "required": [
                    "copyTrade"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/positions/{positionId}/copies": {
      "get": {
        "operationId": "v1-copyTrading-copiesForPosition",
        "summary": "Copies taken on a position",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "positionId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "copierIds",
            "schema": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionCopiesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/profiles": {
      "post": {
        "operationId": "v1-copyTrading-profiles-create",
        "summary": "Create a copy trading profile",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "targetId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "onlyNewPositions": {
                    "default": true,
                    "type": "boolean"
                  }
                },
                "required": [
                  "targetId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyProfile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-copyTrading-profiles-list",
        "summary": "List a user's copy profiles (defaults to the authenticated user)",
        "tags": [
          "copy-trading"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "stopping",
                "stopped"
              ]
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "includeLiveStats",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "includeStoppingStatus",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "$ref": "#/components/schemas/CopyListSortBy"
            }
          },
          {
            "in": "query",
            "name": "sortDir",
            "schema": {
              "$ref": "#/components/schemas/CopyListSortDir"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyProfileListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/profiles/{profileId}/history": {
      "get": {
        "operationId": "v1-copyTrading-profiles-history",
        "summary": "Get profile-scoped performance history for a copy sub-wallet",
        "tags": [
          "copy-trading"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "profileId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "period",
            "schema": {
              "default": "allTime",
              "type": "string",
              "enum": [
                "day",
                "week",
                "month",
                "allTime"
              ]
            }
          },
          {
            "in": "query",
            "name": "metricType",
            "schema": {
              "default": "accountValue",
              "type": "string",
              "enum": [
                "accountValue",
                "pnl"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyProfileHistory"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/profiles/{profileId}": {
      "patch": {
        "operationId": "v1-copyTrading-profiles-update",
        "summary": "Update or stop a copy profile",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "profileId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stop": {
                    "type": "boolean"
                  },
                  "includeStoppingStatus": {
                    "default": false,
                    "type": "boolean"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopyProfile"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/profiles/active": {
      "get": {
        "operationId": "v1-copyTrading-profiles-active",
        "summary": "Get active copy profile for a target trader (if any)",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "targetId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ActiveCopyProfile"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/copiers": {
      "get": {
        "operationId": "v1-copyTrading-copiers-list",
        "summary": "List a user's copiers (defaults to the authenticated user)",
        "tags": [
          "copy-trading"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "default": "active",
              "type": "string",
              "enum": [
                "active",
                "stopping",
                "stopped"
              ]
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "includeLiveStats",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "includeStoppingStatus",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "in": "query",
            "name": "sortBy",
            "schema": {
              "$ref": "#/components/schemas/CopyListSortBy"
            }
          },
          {
            "in": "query",
            "name": "sortDir",
            "schema": {
              "$ref": "#/components/schemas/CopyListSortDir"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CopierListOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/settings": {
      "get": {
        "operationId": "v1-copyTrading-settings-retrieve",
        "summary": "Get PNL share settings",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PnlShareSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-copyTrading-settings-update",
        "summary": "Update PNL share settings",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 0.2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/wallets/available": {
      "get": {
        "operationId": "v1-copyTrading-wallets-available",
        "summary": "Find an available copy trading wallet to reuse",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvailableCopyWallet"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/wallets/register": {
      "post": {
        "operationId": "v1-copyTrading-wallets-register",
        "summary": "Register a copy trading wallet for a profile",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "walletAddress": {
                    "type": "string"
                  },
                  "privyWalletId": {
                    "type": "string"
                  }
                },
                "required": [
                  "profileId",
                  "walletAddress",
                  "privyWalletId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "walletAddress": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "walletAddress"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/wallets/add-funds": {
      "post": {
        "operationId": "v1-copyTrading-wallets-addFunds",
        "summary": "Record a fund deposit to a copy profile",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "profileId",
                  "amount"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "allocatedAmount": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "allocatedAmount"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/copy-trading/wallets/withdraw": {
      "post": {
        "operationId": "v1-copyTrading-wallets-withdraw",
        "summary": "Record a fund withdrawal from a copy profile",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "profileId": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "forceClose": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "profileId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WithdrawFundsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/wallets/sign-exchange-action": {
      "post": {
        "operationId": "v1-wallets-signExchangeAction",
        "summary": "Sign an MFA-exempt Hyperliquid non-send action",
        "tags": [
          "wallets"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      },
                      "signatureChainId": {
                        "type": "string",
                        "pattern": "^0x[0-9a-fA-F]+$"
                      },
                      "hyperliquidChain": {
                        "type": "string",
                        "enum": [
                          "Mainnet",
                          "Testnet"
                        ]
                      },
                      "nonce": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      }
                    },
                    "required": [
                      "type",
                      "signatureChainId",
                      "hyperliquidChain"
                    ],
                    "additionalProperties": {}
                  },
                  "nonce": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "vaultAddress": {
                    "type": "string",
                    "pattern": "^0x[0-9a-fA-F]{40}$"
                  },
                  "expiresAfter": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "action",
                  "nonce"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletExchangeSignature"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trailing-stops": {
      "post": {
        "operationId": "v1-trailingStops-create",
        "summary": "Create a trailing stop order",
        "tags": [
          "trailing-stops"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "walletAddress": {
                    "type": "string"
                  },
                  "privyWalletId": {
                    "type": "string"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "size": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "trailPercent": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 50
                  },
                  "callbackRate": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 50
                  },
                  "currentPrice": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "walletAddress",
                  "privyWalletId",
                  "symbol",
                  "side",
                  "size",
                  "trailPercent",
                  "currentPrice"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trailingStop": {
                      "$ref": "#/components/schemas/TrailingStop"
                    }
                  },
                  "required": [
                    "trailingStop"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-trailingStops-list",
        "summary": "List trailing stop orders for the current user",
        "tags": [
          "trailing-stops"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "type": "boolean",
              "default": true
            }
          },
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTrailingStopsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trailing-stops/{id}": {
      "delete": {
        "operationId": "v1-trailingStops-cancel",
        "summary": "Cancel an active trailing stop order",
        "tags": [
          "trailing-stops"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-trailingStops-update",
        "summary": "Update the trail percentage of an active trailing stop",
        "tags": [
          "trailing-stops"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "trailPercent": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 50
                  }
                },
                "required": [
                  "trailPercent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "trailingStop": {
                      "$ref": "#/components/schemas/TrailingStop"
                    }
                  },
                  "required": [
                    "trailingStop"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/unfurl": {
      "get": {
        "operationId": "v1-unfurl-get",
        "summary": "Resolve OpenGraph metadata for a URL",
        "tags": [
          "unfurl"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "url",
            "schema": {
              "type": "string",
              "format": "uri"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkPreview"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trading/season/leaderboard": {
      "get": {
        "operationId": "v1-trading-season-leaderboard",
        "summary": "Get the trading season leaderboard for a given week and track",
        "tags": [
          "trading"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "seasonId",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "in": "query",
            "name": "week",
            "schema": {
              "$ref": "#/components/schemas/SeasonWeek"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "track",
            "schema": {
              "type": "string",
              "enum": [
                "pnl",
                "roi",
                "volume"
              ]
            }
          },
          {
            "in": "query",
            "name": "includeUnqualified",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "maxLength": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeasonLeaderboardOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trading/season/leaderboard/me/rank": {
      "get": {
        "operationId": "v1-trading-season-rank",
        "summary": "Get current user season rank for a given week and track",
        "tags": [
          "trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "seasonId",
            "schema": {
              "type": "string",
              "maxLength": 64
            }
          },
          {
            "in": "query",
            "name": "week",
            "schema": {
              "$ref": "#/components/schemas/SeasonWeek"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "network",
            "schema": {
              "default": "hyperliquid_mainnet",
              "type": "string",
              "enum": [
                "hyperliquid_testnet",
                "hyperliquid_mainnet",
                "hyperliquid_paper"
              ]
            }
          },
          {
            "in": "query",
            "name": "track",
            "schema": {
              "type": "string",
              "enum": [
                "pnl",
                "roi",
                "volume"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/UserLeaderboardRank"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pusher/auth": {
      "post": {
        "operationId": "v1-pusher-auth",
        "summary": "Authorize a Pusher private channel subscription",
        "tags": [
          "pusher"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "socketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "channelName": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "socketId",
                  "channelName"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PusherAuthOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/pusher/auth-batch": {
      "post": {
        "operationId": "v1-pusher-authBatch",
        "summary": "Authorize multiple Pusher private channel subscriptions in one request",
        "tags": [
          "pusher"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "socketId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "channelNames": {
                    "minItems": 1,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "socketId",
                  "channelNames"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PusherAuthBatchOutput"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          }
        }
      }
    },
    "/v1/app/config": {
      "get": {
        "operationId": "v1-app-config",
        "summary": "Get app configuration for mobile clients",
        "tags": [
          "app"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppConfig"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/{symbol}/description": {
      "get": {
        "operationId": "v1-tokens-description",
        "summary": "Get the description for a token by symbol",
        "tags": [
          "tokens"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "locale",
            "schema": {
              "$ref": "#/components/schemas/AppLocale"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenDescription"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/{symbol}/ai-asset-summary": {
      "get": {
        "operationId": "v1-tokens-aiAssetSummary",
        "summary": "Get the AI-generated asset summary for a token",
        "tags": [
          "tokens"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "symbol",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "locale",
            "schema": {
              "$ref": "#/components/schemas/AppLocale"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiAssetSummary"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/tokens/names": {
      "get": {
        "operationId": "v1-tokens-names",
        "summary": "List human-readable names and taglines for assets that have them",
        "tags": [
          "tokens"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 10000,
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetNamesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/notifications/preferences": {
      "get": {
        "operationId": "v1-notifications-preferences",
        "summary": "Get notification preferences",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesOutput"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "v1-notifications-updatePreferences",
        "summary": "Update notification preferences",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "followed_trader_activity": {
                    "type": "boolean"
                  },
                  "copy_trades": {
                    "type": "boolean"
                  },
                  "position_moves": {
                    "type": "boolean"
                  },
                  "arena_activity": {
                    "type": "boolean"
                  },
                  "new_followers": {
                    "type": "boolean"
                  },
                  "referral_activity": {
                    "type": "boolean"
                  },
                  "x_mutuals": {
                    "type": "boolean"
                  },
                  "post_interactions": {
                    "type": "boolean"
                  },
                  "clan_activity": {
                    "type": "boolean"
                  },
                  "direct_messages": {
                    "type": "boolean"
                  },
                  "group_messages": {
                    "type": "boolean"
                  },
                  "followed_trader_min_notional": {
                    "anyOf": [
                      {
                        "type": "number",
                        "const": 0
                      },
                      {
                        "type": "number",
                        "const": 1000
                      },
                      {
                        "type": "number",
                        "const": 10000
                      },
                      {
                        "type": "number",
                        "const": 50000
                      },
                      {
                        "type": "number",
                        "const": 100000
                      }
                    ]
                  },
                  "position_move_thresholds": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "number",
                          "const": 1
                        },
                        {
                          "type": "number",
                          "const": 5
                        },
                        {
                          "type": "number",
                          "const": 25
                        },
                        {
                          "type": "number",
                          "const": 50
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationPreferencesOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/paper/exchange": {
      "post": {
        "operationId": "v1-paper-exchange",
        "summary": "Execute a paper trading action (order, cancel, leverage, margin)",
        "tags": [
          "paper"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperExchangeOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/capital/exchange": {
      "post": {
        "operationId": "v1-capital-exchange",
        "summary": "Execute a trading action for the user’s active capital account",
        "tags": [
          "capital"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type"
                    ],
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "action"
                ],
                "additionalProperties": {}
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CapitalExchangeOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/transfers": {
      "get": {
        "operationId": "v1-transfers-list",
        "summary": "List cashflow events for a user with counterparty resolution",
        "tags": [
          "transfers"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTransfersOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/trade-protection/fat-finger": {
      "get": {
        "operationId": "v1-tradeProtection-fatFinger",
        "summary": "Get the user fat-finger protection settings",
        "tags": [
          "trade-protection"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FatFingerSettings"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "put": {
        "operationId": "v1-tradeProtection-updateFatFinger",
        "summary": "Update the user fat-finger protection settings",
        "tags": [
          "trade-protection"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {
                    "type": "boolean"
                  },
                  "maxOrderUsd": {
                    "type": "number",
                    "minimum": 0
                  },
                  "enabledOrderTypes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "market",
                        "limit",
                        "stop",
                        "twap",
                        "scale"
                      ]
                    }
                  }
                },
                "required": [
                  "enabled",
                  "maxOrderUsd",
                  "enabledOrderTypes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FatFingerSettings"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/price-alerts": {
      "post": {
        "operationId": "v1-priceAlerts-create",
        "summary": "Create a one-shot price alert",
        "tags": [
          "price-alerts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "targetPrice": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "direction": {
                    "type": "string",
                    "enum": [
                      "above",
                      "below"
                    ]
                  }
                },
                "required": [
                  "symbol",
                  "targetPrice",
                  "direction"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatePriceAlertOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-priceAlerts-list",
        "summary": "List the current user’s price alerts",
        "tags": [
          "price-alerts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "symbol",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "triggered"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPriceAlertsOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/price-alerts/{id}": {
      "delete": {
        "operationId": "v1-priceAlerts-delete",
        "summary": "Delete a price alert",
        "tags": [
          "price-alerts"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeletePriceAlertOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/season/current": {
      "get": {
        "operationId": "v1-season-current",
        "summary": "Get the current trading season",
        "tags": [
          "season"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CurrentSeasonOutput"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/season/list": {
      "get": {
        "operationId": "v1-season-list",
        "summary": "List trading seasons, newest first",
        "tags": [
          "season"
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SeasonListOutput"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chase-orders": {
      "post": {
        "operationId": "v1-chaseOrders-create",
        "summary": "Create a server-managed chase order",
        "tags": [
          "chase-orders"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "idempotencyKey": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "walletAddress": {
                    "type": "string",
                    "pattern": "^0x[\\s\\S]{0,}$"
                  },
                  "symbol": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "assetId": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "size": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "priceLimit": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "reduceOnly": {
                    "default": false,
                    "type": "boolean"
                  },
                  "durationSeconds": {
                    "type": "integer",
                    "minimum": 5,
                    "maximum": 3600
                  }
                },
                "required": [
                  "idempotencyKey",
                  "walletAddress",
                  "symbol",
                  "assetId",
                  "side",
                  "size",
                  "priceLimit",
                  "durationSeconds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateChaseOrderOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      },
      "get": {
        "operationId": "v1-chaseOrders-list",
        "summary": "List chase orders for the current user",
        "tags": [
          "chase-orders"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "activeOnly",
            "schema": {
              "default": true,
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "walletAddress",
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListChaseOrdersOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/chase-orders/{id}": {
      "delete": {
        "operationId": "v1-chaseOrders-cancel",
        "summary": "Cancel a chase order",
        "tags": [
          "chase-orders"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelChaseOrderOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v1/streaming/competitions/{competitionId}/traders/{username}": {
      "get": {
        "operationId": "v1-streaming-competitionTrader",
        "summary": "Get a competition trader paper balance, positions, and PnL chart",
        "tags": [
          "streaming"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "competitionId",
            "schema": {
              "type": "string",
              "pattern": "^\\d+$"
            },
            "required": true
          },
          {
            "in": "path",
            "name": "username",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaperCompetitionTraderOutput"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/posts": {
      "get": {
        "operationId": "v2-posts-list",
        "summary": "List posts for the feed (with daily recap)",
        "tags": [
          "posts"
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "filter",
            "schema": {
              "default": "all",
              "type": "string",
              "enum": [
                "all",
                "following",
                "clan"
              ]
            }
          },
          {
            "in": "query",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "fetchDirection",
            "schema": {
              "type": "string",
              "enum": [
                "older",
                "newer"
              ]
            }
          },
          {
            "in": "query",
            "name": "anchor",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          },
          {
            "in": "query",
            "name": "withReplyPreview",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "locale",
            "schema": {
              "$ref": "#/components/schemas/AppLocale"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPostsV2Output"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/positions/{positionId}/copies": {
      "get": {
        "operationId": "v2-copyTrading-copiesForPosition",
        "summary": "Copies taken on a position",
        "tags": [
          "copy-trading"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "positionId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "copierIds",
            "schema": {
              "minItems": 1,
              "maxItems": 20,
              "type": "array",
              "items": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PositionCopiesV2Output"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/users/{userId}/referrals": {
      "get": {
        "operationId": "v2-users-referrals-list",
        "summary": "Get users referred by a specific user",
        "tags": [
          "user",
          "referrals"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "previousCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "referrals": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReferralUserWithBalance"
                      }
                    }
                  },
                  "required": [
                    "hasMore",
                    "referrals"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/clans/{clanId}/requests": {
      "get": {
        "operationId": "v2-clans-requests-list",
        "summary": "Get pending membership requests for a clan (owner only)",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "previousCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "requests": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "user": {
                            "$ref": "#/components/schemas/PublicUser"
                          },
                          "createdAt": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "user",
                          "createdAt"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "hasMore",
                    "requests"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/clans/{clanId}/invites": {
      "get": {
        "operationId": "v2-clans-invites-list",
        "summary": "Get pending invites for a clan",
        "tags": [
          "clans"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "clanId",
            "schema": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "previousCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "pendingInviteUserIds": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      }
                    }
                  },
                  "required": [
                    "hasMore",
                    "pendingInviteUserIds"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/search/clans": {
      "get": {
        "operationId": "v2-search-clans",
        "summary": "Search for clans by name",
        "tags": [
          "search"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "query",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 20
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "nextCursor": {
                      "type": "string"
                    },
                    "previousCursor": {
                      "type": "string"
                    },
                    "hasMore": {
                      "type": "boolean"
                    },
                    "clans": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Clan"
                      }
                    }
                  },
                  "required": [
                    "hasMore",
                    "clans"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    },
    "/v2/arena/duels/{duelId}/activity": {
      "get": {
        "operationId": "v2-arena-duels-getActivity",
        "summary": "Get paginated activity log for a duel",
        "tags": [
          "arena"
        ],
        "security": [
          {
            "Authorization": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "duelId",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaDuelActivityLogV2Output"
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "TokenSelectorSort": {
        "type": "object",
        "properties": {
          "sortColumn": {
            "type": "string",
            "enum": [
              "price",
              "change24h",
              "volume",
              "openInterest"
            ]
          },
          "sortDirection": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "required": [
          "sortColumn",
          "sortDirection"
        ]
      },
      "PositionsTrendingScope": {
        "type": "string",
        "enum": [
          "everyone",
          "following",
          "clan"
        ]
      },
      "PositionsTrendingBoard": {
        "default": "live",
        "type": "string",
        "enum": [
          "live",
          "all-time"
        ]
      },
      "PositionsBoardScopeKind": {
        "default": "everyone",
        "type": "string",
        "enum": [
          "everyone",
          "clan",
          "following",
          "trader"
        ]
      },
      "PositionsBoardStatus": {
        "default": "all",
        "type": "string",
        "enum": [
          "all",
          "open",
          "closed"
        ]
      },
      "PositionsMovesScope": {
        "default": "everyone",
        "type": "string",
        "enum": [
          "everyone",
          "following",
          "clan"
        ]
      },
      "ReportType": {
        "type": "string",
        "enum": [
          "post",
          "comment",
          "user"
        ]
      },
      "CopyListSortBy": {
        "default": "createdAt",
        "type": "string",
        "enum": [
          "createdAt",
          "pnl"
        ]
      },
      "CopyListSortDir": {
        "default": "desc",
        "type": "string",
        "enum": [
          "asc",
          "desc"
        ]
      },
      "SeasonWeek": {
        "type": "integer",
        "minimum": 0,
        "maximum": 9007199254740991
      },
      "AppLocale": {
        "default": "en",
        "type": "string",
        "enum": [
          "en",
          "fr",
          "th",
          "ko",
          "ja",
          "zh-CN"
        ]
      },
      "UserMe": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "privy_user_id": {
            "type": "string"
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "knock_synced_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "moonpay_deposit_customer_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_mfa_enabled": {
            "type": "boolean"
          },
          "referral_bonus_rate": {
            "type": "number"
          },
          "referral_bonus_override": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "single_auth_notified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {
            "$ref": "#/components/schemas/FatFingerSettings"
          },
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/UserStats"
          },
          "builderFees": {
            "$ref": "#/components/schemas/UserBuilderFees"
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "privy_user_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "knock_synced_at",
          "feature_image",
          "moonpay_deposit_customer_token",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "wallet_mfa_enabled",
          "referral_bonus_rate",
          "referral_bonus_override",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "single_auth_notified_at",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "stats",
          "builderFees"
        ],
        "additionalProperties": false
      },
      "UserClan": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "description": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "image_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "banner_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chat_room_id": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "description",
              "image_url",
              "banner_url",
              "chat_room_id",
              "created_at",
              "updated_at"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "FatFingerSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "maxOrderUsd": {
            "type": "number",
            "minimum": 0
          },
          "enabledOrderTypes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "market",
                "limit",
                "stop",
                "twap",
                "scale"
              ]
            }
          }
        },
        "required": [
          "enabled",
          "maxOrderUsd",
          "enabledOrderTypes"
        ],
        "additionalProperties": false
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "address": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "primary",
              "arena",
              "copy_trading"
            ]
          },
          "privy_wallet_id": {
            "type": "string"
          },
          "signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hl_setup_complete": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "address",
          "type",
          "privy_wallet_id",
          "signer_quorum_id",
          "hl_setup_complete",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "UserStats": {
        "type": "object",
        "properties": {
          "wins": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "losses": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "elo": {
            "type": "number"
          },
          "followers": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "following": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copying": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copiers": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "matches": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "streak": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "totalVolume": {
            "type": "number"
          },
          "weeklyVolume": {
            "type": "number"
          },
          "totalPnl": {
            "type": "number"
          },
          "weeklyPnl": {
            "type": "number"
          },
          "monthlyPnl": {
            "type": "number"
          },
          "accountValue": {
            "type": "number"
          },
          "realizedPnl": {
            "type": "number"
          },
          "unrealizedPnl": {
            "type": "number"
          },
          "winRate": {
            "type": "number"
          },
          "tradeWinRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalTrades": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "avgWinPercent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "avgHoldTime": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "sharpeRatio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fundedAccount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FundedCredential"
              },
              {
                "type": "null"
              }
            ]
          },
          "tradingClass": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "assassin",
                  "guardian",
                  "mage",
                  "strategist"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "xp": {
            "type": "number"
          }
        },
        "required": [
          "wins",
          "losses",
          "elo"
        ],
        "additionalProperties": false
      },
      "FundedCredential": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "totalPaidOut": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "payoutCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "fundedSince": {
            "type": "string"
          },
          "earningsHidden": {
            "type": "boolean"
          }
        },
        "required": [
          "tier",
          "totalPaidOut",
          "payoutCount",
          "fundedSince",
          "earningsHidden"
        ],
        "additionalProperties": false
      },
      "UserBuilderFees": {
        "type": "object",
        "properties": {
          "perp": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "spot": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "perp",
          "spot"
        ],
        "additionalProperties": false
      },
      "error.NOT_FOUND": {
        "title": "Resource not found error (404)",
        "description": "The error information",
        "example": {
          "code": "NOT_FOUND",
          "message": "Resource not found",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Resource not found",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "NOT_FOUND",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "User": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "privy_user_id": {
            "type": "string"
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "knock_synced_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "moonpay_deposit_customer_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_mfa_enabled": {
            "type": "boolean"
          },
          "referral_bonus_rate": {
            "type": "number"
          },
          "referral_bonus_override": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "single_auth_notified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "privy_user_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "knock_synced_at",
          "feature_image",
          "moonpay_deposit_customer_token",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "wallet_mfa_enabled",
          "referral_bonus_rate",
          "referral_bonus_override",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "single_auth_notified_at",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage"
        ],
        "additionalProperties": false
      },
      "error.BAD_REQUEST": {
        "title": "Invalid input data error (400)",
        "description": "The error information",
        "example": {
          "code": "BAD_REQUEST",
          "message": "Invalid input data",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Invalid input data",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "BAD_REQUEST",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "error.UNAUTHORIZED": {
        "title": "Authorization not provided error (401)",
        "description": "The error information",
        "example": {
          "code": "UNAUTHORIZED",
          "message": "Authorization not provided",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Authorization not provided",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "UNAUTHORIZED",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "error.FORBIDDEN": {
        "title": "Insufficient access error (403)",
        "description": "The error information",
        "example": {
          "code": "FORBIDDEN",
          "message": "Insufficient access",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Insufficient access",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "FORBIDDEN",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "error.INTERNAL_SERVER_ERROR": {
        "title": "Internal server error error (500)",
        "description": "The error information",
        "example": {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "Internal server error",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Internal server error",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "INTERNAL_SERVER_ERROR",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "UserLeaderboardOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "user": {
                  "$ref": "#/components/schemas/PublicUser"
                },
                "rank": {
                  "description": "Canonical 1-indexed profit-descending rank; may be non-monotonic when the response uses another sort.",
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "snapshot": {
                  "type": "null"
                },
                "topPositions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "type": "string"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "LONG",
                          "SHORT"
                        ]
                      },
                      "size": {
                        "type": "number"
                      },
                      "entry_price": {
                        "type": "number"
                      },
                      "unrealized_pnl": {
                        "type": "number"
                      },
                      "linked_post_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "size",
                      "entry_price",
                      "unrealized_pnl",
                      "linked_post_id"
                    ],
                    "additionalProperties": false
                  }
                },
                "copiedBy": {
                  "$ref": "#/components/schemas/CopiedBy"
                },
                "callerCopyProfileId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "volumeUsd": {
                  "type": "number"
                },
                "accountValue": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "totalProfitUsd": {
                  "type": "number"
                },
                "pnlSparkline": {
                  "type": "array",
                  "items": {
                    "type": "number"
                  }
                },
                "roiPercent": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "tradeWinRate": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avgWinPercent": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avgHoldTimeHours": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "sharpeRatio": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "elo": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "wins": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "losses": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "followersCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "user",
                "rank",
                "snapshot",
                "topPositions",
                "copiedBy",
                "callerCopyProfileId",
                "volumeUsd",
                "accountValue",
                "totalProfitUsd",
                "roiPercent",
                "tradeWinRate",
                "avgWinPercent",
                "avgHoldTimeHours",
                "sharpeRatio",
                "wins",
                "losses"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "PublicUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage"
        ],
        "additionalProperties": {}
      },
      "CopiedBy": {
        "type": "object",
        "properties": {
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "totalCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "aumUsd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "users",
          "totalCount"
        ],
        "additionalProperties": false
      },
      "LeaderboardMeRank": {
        "type": "object",
        "properties": {
          "rank": {
            "description": "Canonical 1-indexed leaderboard standing by profit descending; independent of the requested sort.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total": {
            "description": "Total number of ranked users.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "offset": {
            "description": "Zero-indexed position under the requested sort; use this value for pagination.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "stats": {
            "type": "object",
            "properties": {
              "elo": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "wins": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "losses": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "totalProfitUsd": {
                "type": "number"
              },
              "roiPercent": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tradeWinRate": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "volumeUsd": {
                "type": "number"
              },
              "accountValue": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avgWinPercent": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avgHoldTimeHours": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sharpeRatio": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "elo",
              "wins",
              "losses",
              "totalProfitUsd",
              "roiPercent",
              "tradeWinRate",
              "volumeUsd",
              "accountValue",
              "avgWinPercent",
              "avgHoldTimeHours",
              "sharpeRatio"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "rank",
          "total",
          "offset",
          "stats"
        ],
        "additionalProperties": false
      },
      "LeaderboardNeighborhoodOutput": {
        "type": "object",
        "properties": {
          "entries": {
            "maxItems": 3,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardNeighborhoodEntry"
            }
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "entries",
          "rank",
          "total"
        ],
        "additionalProperties": false
      },
      "LeaderboardNeighborhoodEntry": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "isCurrentUser": {
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/AvatarUser"
          }
        },
        "required": [
          "rank",
          "isCurrentUser",
          "user"
        ],
        "additionalProperties": false
      },
      "AvatarUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_url",
          "rank",
          "clan_id",
          "account_value_tier",
          "is_official"
        ],
        "additionalProperties": false
      },
      "UserListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "GetOnlineUsersOutput": {
        "type": "object",
        "properties": {
          "onlineUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "count": {
            "type": "number"
          },
          "sampleUsers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                },
                "displayName": {
                  "type": "string"
                },
                "avatarUrl": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "username",
                "displayName",
                "avatarUrl"
              ],
              "additionalProperties": false
            }
          },
          "mobileUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "onlineUserIds",
          "count",
          "sampleUsers",
          "mobileUserIds"
        ],
        "additionalProperties": false
      },
      "PrepareMfaEnrollmentOutput": {
        "type": "object",
        "properties": {
          "policyId": {
            "type": "string"
          }
        },
        "required": [
          "policyId"
        ],
        "additionalProperties": false
      },
      "CompleteMfaEnrollmentOutput": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "const": true
          }
        },
        "required": [
          "enabled"
        ],
        "additionalProperties": false
      },
      "DisableMfaOutput": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "const": false
          }
        },
        "required": [
          "enabled"
        ],
        "additionalProperties": false
      },
      "UserUploadImageOutput": {
        "type": "object",
        "properties": {
          "uploadUrl": {
            "type": "string"
          },
          "fileKey": {
            "type": "string"
          },
          "mediaUrl": {
            "type": "string"
          }
        },
        "required": [
          "uploadUrl",
          "fileKey",
          "mediaUrl"
        ],
        "additionalProperties": false
      },
      "ApplyReferralOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ReferralUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "volume": {
            "type": "number"
          },
          "earnings": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "volume",
          "earnings"
        ],
        "additionalProperties": {}
      },
      "ReferralClaimable": {
        "type": "object",
        "properties": {
          "totalEarned": {
            "type": "number"
          },
          "totalClaimed": {
            "type": "number"
          },
          "claimable": {
            "type": "number"
          },
          "minClaim": {
            "type": "number"
          },
          "activePayout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReferralActivePayout"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral": {
            "$ref": "#/components/schemas/RewardStream"
          },
          "clan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "earned": {
                    "type": "number"
                  },
                  "claimed": {
                    "type": "number"
                  },
                  "claimable": {
                    "type": "number"
                  },
                  "clanId": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "earned",
                  "claimed",
                  "claimable",
                  "clanId"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "cashback": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardStream"
              },
              {
                "type": "null"
              }
            ]
          },
          "rebate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RewardStream"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "totalEarned",
          "totalClaimed",
          "claimable",
          "minClaim",
          "activePayout",
          "referral",
          "clan",
          "cashback",
          "rebate"
        ],
        "additionalProperties": false
      },
      "ReferralActivePayout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "needs_review"
            ]
          },
          "amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "amount_cents",
          "created_at"
        ],
        "additionalProperties": false
      },
      "RewardStream": {
        "type": "object",
        "properties": {
          "earned": {
            "type": "number"
          },
          "claimed": {
            "type": "number"
          },
          "claimable": {
            "type": "number"
          }
        },
        "required": [
          "earned",
          "claimed",
          "claimable"
        ],
        "additionalProperties": false
      },
      "ReferralSummary": {
        "type": "object",
        "properties": {
          "earnRate": {
            "type": "number"
          },
          "baseRate": {
            "type": "number"
          },
          "volume30d": {
            "type": "number"
          },
          "eligibleAum": {
            "type": "number"
          },
          "netDeposits": {
            "type": "number"
          },
          "tiers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralBoostTier"
            }
          },
          "currentTier": {
            "$ref": "#/components/schemas/ReferralBoostTier"
          },
          "nextTier": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReferralBoostTier"
              },
              {
                "type": "null"
              }
            ]
          },
          "volumeToNextTier": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "amountToNextTier": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "earnRate",
          "baseRate",
          "volume30d",
          "eligibleAum",
          "netDeposits",
          "tiers",
          "currentTier",
          "nextTier",
          "volumeToNextTier",
          "amountToNextTier"
        ],
        "additionalProperties": false
      },
      "ReferralBoostTier": {
        "type": "object",
        "properties": {
          "minVolume30d": {
            "type": "number"
          },
          "minDeposit": {
            "type": "number"
          },
          "totalRate": {
            "type": "number"
          }
        },
        "required": [
          "minVolume30d",
          "minDeposit",
          "totalRate"
        ],
        "additionalProperties": false
      },
      "ClaimReferralRewardsOutput": {
        "type": "object",
        "properties": {
          "payoutId": {
            "type": "string"
          },
          "amountCents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "payoutId",
          "amountCents"
        ],
        "additionalProperties": false
      },
      "error.CONFLICT": {
        "title": "A previous claim is still being processed error (409)",
        "description": "The error information",
        "example": {
          "code": "CONFLICT",
          "message": "A previous claim is still being processed",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "A previous claim is still being processed",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "CONFLICT",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "error.PRECONDITION_FAILED": {
        "title": "Nothing to claim or no payout wallet error (412)",
        "description": "The error information",
        "example": {
          "code": "PRECONDITION_FAILED",
          "message": "Nothing to claim or no payout wallet",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Nothing to claim or no payout wallet",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "PRECONDITION_FAILED",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "error.SERVICE_UNAVAILABLE": {
        "title": "Reward payouts are temporarily unavailable (hot wallet cannot cover the claim) error (503)",
        "description": "The error information",
        "example": {
          "code": "SERVICE_UNAVAILABLE",
          "message": "Reward payouts are temporarily unavailable (hot wallet cannot cover the claim)",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Reward payouts are temporarily unavailable (hot wallet cannot cover the claim)",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "SERVICE_UNAVAILABLE",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "ListReferralPayoutsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "payouts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferralPayout"
            }
          }
        },
        "required": [
          "hasMore",
          "payouts"
        ],
        "additionalProperties": false
      },
      "ReferralPayout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total_earned_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "destination_address": {
            "type": "string"
          },
          "referral_amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "clan_amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "cashback_amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rebate_amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "creator_amount_cents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed",
              "needs_review"
            ]
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "tx_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "approved_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "user_id",
          "amount_cents",
          "total_earned_cents",
          "destination_address",
          "referral_amount_cents",
          "clan_amount_cents",
          "cashback_amount_cents",
          "rebate_amount_cents",
          "creator_amount_cents",
          "clan_id",
          "status",
          "completed_at",
          "tx_hash",
          "approved_at",
          "approved_by",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "FriendsPerformanceOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "user": {
                  "$ref": "#/components/schemas/PublicUser"
                },
                "symbol": {
                  "type": "string"
                },
                "positionValueUsd": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "roiPercent": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leverage": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "isLong": {
                  "type": "boolean"
                },
                "entryPrice": {
                  "type": "number"
                }
              },
              "required": [
                "user",
                "symbol",
                "positionValueUsd",
                "roiPercent",
                "leverage",
                "isLong",
                "entryPrice"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "UserPreferences": {
        "type": "object",
        "properties": {
          "tokenSelectorSort": {
            "$ref": "#/components/schemas/TokenSelectorSortOutput"
          },
          "favoriteTimeframes": {
            "$ref": "#/components/schemas/FavoriteTimeframes"
          },
          "chartType": {
            "$ref": "#/components/schemas/ChartType"
          },
          "locale": {
            "$ref": "#/components/schemas/AppLocale"
          }
        },
        "required": [
          "tokenSelectorSort",
          "favoriteTimeframes",
          "chartType",
          "locale"
        ],
        "additionalProperties": false
      },
      "FavoriteTimeframes": {
        "default": [],
        "maxItems": 24,
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 8
        }
      },
      "ChartType": {
        "default": "candles",
        "type": "string",
        "enum": [
          "bars",
          "candles",
          "hollow-candles",
          "line",
          "area",
          "baseline",
          "heikin-ashi"
        ]
      },
      "UserTradingStatsOutput": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "user": {
              "$ref": "#/components/schemas/PublicUser"
            },
            "rank": {
              "description": "Canonical 1-indexed profit-descending rank; may be non-monotonic when the response uses another sort.",
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "snapshot": {
              "type": "null"
            },
            "topPositions": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "symbol": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "size": {
                    "type": "number"
                  },
                  "entry_price": {
                    "type": "number"
                  },
                  "unrealized_pnl": {
                    "type": "number"
                  },
                  "linked_post_id": {
                    "anyOf": [
                      {
                        "type": "string",
                        "format": "uuid",
                        "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "size",
                  "entry_price",
                  "unrealized_pnl",
                  "linked_post_id"
                ],
                "additionalProperties": false
              }
            },
            "copiedBy": {
              "$ref": "#/components/schemas/CopiedBy"
            },
            "callerCopyProfileId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "volumeUsd": {
              "type": "number"
            },
            "accountValue": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "totalProfitUsd": {
              "type": "number"
            },
            "pnlSparkline": {
              "type": "array",
              "items": {
                "type": "number"
              }
            },
            "roiPercent": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "tradeWinRate": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "avgWinPercent": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "avgHoldTimeHours": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "sharpeRatio": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "elo": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "wins": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            },
            "losses": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "required": [
            "user",
            "rank",
            "snapshot",
            "topPositions",
            "copiedBy",
            "callerCopyProfileId",
            "volumeUsd",
            "accountValue",
            "totalProfitUsd",
            "roiPercent",
            "tradeWinRate",
            "avgWinPercent",
            "avgHoldTimeHours",
            "sharpeRatio",
            "wins",
            "losses"
          ],
          "additionalProperties": false
        }
      },
      "UserProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/UserStats"
          },
          "isOwnProfile": {
            "type": "boolean"
          },
          "isFollowing": {
            "type": "boolean"
          },
          "followsYou": {
            "type": "boolean"
          },
          "isDueling": {
            "type": "boolean"
          },
          "activeCopyProfile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActiveCopyProfile"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "stats",
          "isOwnProfile",
          "isFollowing",
          "followsYou",
          "isDueling",
          "activeCopyProfile"
        ],
        "additionalProperties": {}
      },
      "ActiveCopyProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "allocatedAmount": {
            "type": "number"
          },
          "subWalletAddress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnlShareRate": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "allocatedAmount",
          "subWalletAddress",
          "pnlShareRate",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "PositionByUserOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "network": {
                "type": "string",
                "enum": [
                  "hyperliquid_testnet",
                  "hyperliquid_mainnet",
                  "hyperliquid_paper"
                ]
              },
              "user_id": {
                "type": "string"
              },
              "wallet_address": {
                "type": "string"
              },
              "symbol": {
                "type": "string"
              },
              "side": {
                "type": "string",
                "enum": [
                  "LONG",
                  "SHORT"
                ]
              },
              "size": {
                "type": "number"
              },
              "entry_price": {
                "type": "number"
              },
              "max_size": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "leverage_type": {
                "type": "string"
              },
              "leverage_value": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "margin_used": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "realized_pnl": {
                "type": "number"
              },
              "unrealized_pnl": {
                "type": "number"
              },
              "cum_funding_since_open": {
                "type": "number"
              },
              "cum_funding_since_change": {
                "type": "number"
              },
              "opened_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closed_price": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close_reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "MANUAL",
                      "TAKE_PROFIT",
                      "STOP_LOSS",
                      "TRAILING_STOP",
                      "LIQUIDATION",
                      "AUTO_DELEVERAGE"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close_notified_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "open_notified_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "position_move_last_notified_pct": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pnl_sparkline": {
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  }
                ]
              },
              "notional_usd": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "sparkline": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/SparklinePoint"
                }
              }
            },
            "required": [
              "id",
              "network",
              "user_id",
              "wallet_address",
              "symbol",
              "side",
              "size",
              "entry_price",
              "max_size",
              "leverage_type",
              "leverage_value",
              "margin_used",
              "realized_pnl",
              "unrealized_pnl",
              "cum_funding_since_open",
              "cum_funding_since_change",
              "opened_at",
              "updated_at",
              "closed_at",
              "closed_price",
              "close_reason",
              "close_notified_at",
              "open_notified_at",
              "position_move_last_notified_pct",
              "pnl_sparkline",
              "notional_usd",
              "sparkline"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "SparklinePoint": {
        "type": "object",
        "properties": {
          "t": {
            "type": "number"
          },
          "v": {
            "type": "number"
          }
        },
        "required": [
          "t",
          "v"
        ],
        "additionalProperties": false
      },
      "MessageListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            }
          }
        },
        "required": [
          "hasMore",
          "messages"
        ],
        "additionalProperties": false
      },
      "ChatMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "room_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "audio",
              "system"
            ]
          },
          "platform": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "ios",
                  "android",
                  "web",
                  "server",
                  "telegram",
                  "unknown"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatAttachment"
            }
          },
          "reactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "emoji": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "users": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "username": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "username"
                    ],
                    "additionalProperties": false
                  }
                },
                "hasReacted": {
                  "type": "boolean"
                }
              },
              "required": [
                "emoji",
                "count",
                "users",
                "hasReacted"
              ],
              "additionalProperties": false
            }
          },
          "system_payload": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "user_role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "member"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "edited_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pinned_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "pinned_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "link_preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "quoted_post": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BasePost"
              },
              {
                "type": "null"
              }
            ]
          },
          "trading_metadata": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "entry_price": {
                    "type": "number"
                  },
                  "size": {
                    "type": "number"
                  },
                  "leverage_type": {
                    "type": "string"
                  },
                  "leverage_value": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "realized_pnl": {
                    "type": "number"
                  },
                  "unrealized_pnl": {
                    "type": "number"
                  },
                  "isOpen": {
                    "type": "boolean"
                  },
                  "opened_at": {
                    "type": "string"
                  },
                  "closed_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closed_price": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pnlSparkline": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "t": {
                          "type": "number"
                        },
                        "v": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "t",
                        "v"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "wallet_address": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "symbol",
                  "side",
                  "entry_price",
                  "size",
                  "leverage_type",
                  "leverage_value",
                  "realized_pnl",
                  "unrealized_pnl",
                  "isOpen",
                  "opened_at",
                  "closed_at",
                  "closed_price",
                  "pnlSparkline",
                  "wallet_address"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReplyToMessage"
              },
              {
                "type": "null"
              }
            ]
          },
          "forwarded_from_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "forwarded_from": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ForwardedFromMessage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "client_id",
          "room_id",
          "user_id",
          "content",
          "type",
          "created_at",
          "user",
          "attachments"
        ],
        "additionalProperties": false
      },
      "ChatAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "message_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "user_id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "file",
              "audio",
              "gif",
              "sticker"
            ]
          },
          "upload_status": {
            "type": "string",
            "enum": [
              "pending",
              "uploading",
              "completed",
              "failed"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "s3_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "file_size": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "blur_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "order": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "created_at": {
            "type": "string"
          },
          "uploaded_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signed_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "signed_url_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "message_id",
          "user_id",
          "type",
          "upload_status",
          "url",
          "filename",
          "mime_type",
          "file_size",
          "width",
          "height",
          "blur_hash",
          "duration",
          "thumbnail_url",
          "order",
          "created_at",
          "uploaded_at"
        ],
        "additionalProperties": false
      },
      "MentionedClan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "image_url"
        ],
        "additionalProperties": false
      },
      "LinkPreview": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "title": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "imageWidth": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "imageHeight": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "isPlayable": {
            "type": "boolean"
          },
          "siteName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "favicon": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "url",
          "title",
          "description",
          "image",
          "imageWidth",
          "imageHeight",
          "siteName",
          "favicon"
        ],
        "additionalProperties": false
      },
      "BasePost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "$ref": "#/components/schemas/PostType"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_symbol": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostClan"
              },
              {
                "type": "null"
              }
            ]
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "comment_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "copied_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "copiedUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copied_count": {
            "default": 0,
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copiers": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "is_liked": {
            "type": "boolean"
          },
          "tradingMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TradingMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "link_preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "recap_content": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecapContent"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "type",
          "content",
          "chart_symbol",
          "chart_timestamp",
          "position_id",
          "order_id",
          "network",
          "clan_id",
          "clan",
          "like_count",
          "comment_count",
          "chat_room_id",
          "created_at",
          "updated_at",
          "copied_user_id",
          "copiedUser",
          "copied_count",
          "copiers",
          "user",
          "attachments",
          "is_liked",
          "mentioned_users"
        ],
        "additionalProperties": false
      },
      "PostType": {
        "type": "string",
        "enum": [
          "chart_note",
          "standalone",
          "position_opened",
          "position_closed",
          "position_added",
          "position_reduced",
          "position_flipped",
          "copy_trade",
          "recap"
        ]
      },
      "PostClan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "image_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "banner_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "image_url",
          "banner_url",
          "chat_room_id",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      },
      "PostAttachment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "file",
              "audio",
              "gif",
              "sticker"
            ]
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "external_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "filename": {
            "type": "string"
          },
          "mime_type": {
            "type": "string"
          },
          "width": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "height": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "blur_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "duration": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "url",
          "external_url",
          "filename",
          "mime_type",
          "width",
          "height",
          "blur_hash",
          "duration",
          "thumbnail_url"
        ],
        "additionalProperties": false
      },
      "TradingMetadata": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "entry_price": {
            "type": "number"
          },
          "size": {
            "type": "number"
          },
          "leverage_type": {
            "type": "string"
          },
          "leverage_value": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "realized_pnl": {
            "type": "number"
          },
          "unrealized_pnl": {
            "type": "number"
          },
          "isOpen": {
            "type": "boolean"
          },
          "opened_at": {
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnlSparkline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparklinePoint"
            }
          }
        },
        "required": [
          "id",
          "symbol",
          "side",
          "entry_price",
          "size",
          "leverage_type",
          "leverage_value",
          "realized_pnl",
          "unrealized_pnl",
          "isOpen",
          "opened_at",
          "closed_at",
          "closed_price",
          "pnlSparkline"
        ],
        "additionalProperties": false
      },
      "RecapContent": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecapSection"
            }
          },
          "citations": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecapCitation"
            }
          },
          "translations": {
            "type": "object",
            "properties": {
              "fr": {
                "$ref": "#/components/schemas/LocalizedRecapContent"
              },
              "th": {
                "$ref": "#/components/schemas/LocalizedRecapContent"
              },
              "ko": {
                "$ref": "#/components/schemas/LocalizedRecapContent"
              },
              "ja": {
                "$ref": "#/components/schemas/LocalizedRecapContent"
              },
              "zh-CN": {
                "$ref": "#/components/schemas/LocalizedRecapContent"
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "date",
          "summary",
          "sections"
        ],
        "additionalProperties": false
      },
      "RecapSection": {
        "type": "object",
        "properties": {
          "label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "body": {
            "type": "string"
          }
        },
        "required": [
          "body"
        ],
        "additionalProperties": false
      },
      "RecapCitation": {
        "type": "object",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "index",
          "url",
          "title"
        ],
        "additionalProperties": false
      },
      "LocalizedRecapContent": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecapSection"
            }
          }
        },
        "required": [
          "date",
          "summary",
          "sections"
        ],
        "additionalProperties": false
      },
      "ReplyToMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "audio",
              "system"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatAttachment"
            }
          },
          "system_payload": {
            "anyOf": [
              {},
              {
                "type": "null"
              }
            ]
          },
          "trading_metadata": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "symbol": {
                    "type": "string"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "LONG",
                      "SHORT"
                    ]
                  },
                  "entry_price": {
                    "type": "number"
                  },
                  "size": {
                    "type": "number"
                  },
                  "leverage_type": {
                    "type": "string"
                  },
                  "leverage_value": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "realized_pnl": {
                    "type": "number"
                  },
                  "unrealized_pnl": {
                    "type": "number"
                  },
                  "isOpen": {
                    "type": "boolean"
                  },
                  "opened_at": {
                    "type": "string"
                  },
                  "closed_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "closed_price": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "pnlSparkline": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "t": {
                          "type": "number"
                        },
                        "v": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "t",
                        "v"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "wallet_address": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "symbol",
                  "side",
                  "entry_price",
                  "size",
                  "leverage_type",
                  "leverage_value",
                  "realized_pnl",
                  "unrealized_pnl",
                  "isOpen",
                  "opened_at",
                  "closed_at",
                  "closed_price",
                  "pnlSparkline",
                  "wallet_address"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          }
        },
        "required": [
          "id",
          "content",
          "type",
          "created_at",
          "user",
          "attachments"
        ],
        "additionalProperties": false
      },
      "ForwardedFromMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "audio",
              "system"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "content",
          "type",
          "created_at",
          "user"
        ],
        "additionalProperties": false
      },
      "MessageGetByIdsOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            }
          }
        },
        "required": [
          "messages"
        ],
        "additionalProperties": false
      },
      "ForwardMessageOutput": {
        "type": "object",
        "properties": {
          "forwardedMessage": {
            "$ref": "#/components/schemas/ChatMessage"
          },
          "commentMessage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChatMessage"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "forwardedMessage"
        ],
        "additionalProperties": false
      },
      "PinnedMessagesOutput": {
        "type": "object",
        "properties": {
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            }
          }
        },
        "required": [
          "messages"
        ],
        "additionalProperties": false
      },
      "MessageSearchOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "messages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "client_id": {
                  "type": "string"
                },
                "room_id": {
                  "type": "string"
                },
                "user_id": {
                  "type": "string"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "audio",
                    "system"
                  ]
                },
                "platform": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "ios",
                        "android",
                        "web",
                        "server",
                        "telegram",
                        "unknown"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "user": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PublicUser"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ChatAttachment"
                  }
                },
                "reactions": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "emoji": {
                        "type": "string"
                      },
                      "count": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "users": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "username": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "id",
                            "username"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "hasReacted": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "emoji",
                      "count",
                      "users",
                      "hasReacted"
                    ],
                    "additionalProperties": false
                  }
                },
                "system_payload": {
                  "anyOf": [
                    {},
                    {
                      "type": "null"
                    }
                  ]
                },
                "user_role": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "owner",
                        "admin",
                        "member"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "deleted_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "edited_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pinned_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "pinned_by": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PublicUser"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mentioned_users": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUser"
                  }
                },
                "mentioned_clans": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MentionedClan"
                  }
                },
                "mentioned_symbols": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "link_preview": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/LinkPreview"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "quoted_post": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/BasePost"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "trading_metadata": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid",
                          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                        },
                        "symbol": {
                          "type": "string"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "LONG",
                            "SHORT"
                          ]
                        },
                        "entry_price": {
                          "type": "number"
                        },
                        "size": {
                          "type": "number"
                        },
                        "leverage_type": {
                          "type": "string"
                        },
                        "leverage_value": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "realized_pnl": {
                          "type": "number"
                        },
                        "unrealized_pnl": {
                          "type": "number"
                        },
                        "isOpen": {
                          "type": "boolean"
                        },
                        "opened_at": {
                          "type": "string"
                        },
                        "closed_at": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "closed_price": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "pnlSparkline": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "t": {
                                "type": "number"
                              },
                              "v": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "t",
                              "v"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "wallet_address": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "symbol",
                        "side",
                        "entry_price",
                        "size",
                        "leverage_type",
                        "leverage_value",
                        "realized_pnl",
                        "unrealized_pnl",
                        "isOpen",
                        "opened_at",
                        "closed_at",
                        "closed_price",
                        "pnlSparkline",
                        "wallet_address"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reply_to_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "reply_to": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ReplyToMessage"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "forwarded_from_id": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "forwarded_from": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ForwardedFromMessage"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "room": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "dm",
                            "group",
                            "swap",
                            "duel",
                            "clan",
                            "post"
                          ]
                        },
                        "typeId": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "typeName": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "visibility": {
                          "type": "string",
                          "enum": [
                            "public",
                            "private"
                          ]
                        },
                        "name": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "imageUrl": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "channelName": {
                          "type": "string"
                        },
                        "myRole": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "admin",
                            "member"
                          ]
                        },
                        "otherMembers": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/ChatRoomMember"
                          }
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "typeId",
                        "typeName",
                        "visibility",
                        "name",
                        "imageUrl",
                        "channelName",
                        "otherMembers"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "client_id",
                "room_id",
                "user_id",
                "content",
                "type",
                "created_at",
                "user",
                "attachments",
                "room"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "hasMore",
          "messages"
        ],
        "additionalProperties": false
      },
      "ChatRoomMember": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          }
        },
        "required": [
          "user",
          "role"
        ],
        "additionalProperties": false
      },
      "RoomListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatRoom"
            }
          },
          "totalUnread": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "hasMore",
          "rooms"
        ],
        "additionalProperties": false
      },
      "ChatRoom": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "dm",
              "group",
              "swap",
              "duel",
              "clan",
              "post"
            ]
          },
          "typeId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "typeName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "imageUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channelName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "unreadCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastReadAt": {
            "type": "string"
          },
          "lastReadMessageId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "muted": {
            "type": "boolean"
          },
          "isPinned": {
            "type": "boolean"
          },
          "pinnedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isArchived": {
            "type": "boolean"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "pending",
              "declined"
            ]
          },
          "myRole": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "isBanned": {
            "type": "boolean"
          },
          "otherMembers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatRoomMember"
            }
          },
          "memberCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastMessage": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "audio",
                      "system"
                    ]
                  },
                  "system_payload": {
                    "anyOf": [
                      {},
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "user_id": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "image",
                            "video",
                            "file",
                            "audio",
                            "gif",
                            "sticker"
                          ]
                        },
                        "url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thumbnail_url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "filename": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "url",
                        "thumbnail_url",
                        "filename"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "deleted_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "edited_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mentioned_users": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUser"
                    }
                  },
                  "mentioned_clans": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MentionedClan"
                    }
                  }
                },
                "required": [
                  "id",
                  "content",
                  "created_at",
                  "user_id",
                  "username",
                  "attachments"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recentMessages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "audio",
                    "system"
                  ]
                },
                "system_payload": {
                  "anyOf": [
                    {},
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "user_id": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "video",
                          "file",
                          "audio",
                          "gif",
                          "sticker"
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "thumbnail_url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "filename": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "url",
                      "thumbnail_url",
                      "filename"
                    ],
                    "additionalProperties": false
                  }
                },
                "deleted_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "edited_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mentioned_users": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUser"
                  }
                },
                "mentioned_clans": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MentionedClan"
                  }
                }
              },
              "required": [
                "id",
                "content",
                "created_at",
                "user_id",
                "username",
                "attachments"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "type",
          "typeId",
          "typeName",
          "visibility",
          "name",
          "imageUrl",
          "channelName",
          "createdAt",
          "unreadCount",
          "lastReadAt",
          "muted",
          "otherMembers",
          "lastMessage"
        ],
        "additionalProperties": false
      },
      "RoomSearchOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "rooms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatRoom"
            }
          }
        },
        "required": [
          "hasMore",
          "rooms"
        ],
        "additionalProperties": false
      },
      "ChatRoomWithMessages": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "dm",
              "group",
              "swap",
              "duel",
              "clan",
              "post"
            ]
          },
          "typeId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "typeName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "visibility": {
            "type": "string",
            "enum": [
              "public",
              "private"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "imageUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channelName": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "unreadCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastReadAt": {
            "type": "string"
          },
          "lastReadMessageId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "muted": {
            "type": "boolean"
          },
          "isPinned": {
            "type": "boolean"
          },
          "pinnedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "isArchived": {
            "type": "boolean"
          },
          "archivedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "pending",
              "declined"
            ]
          },
          "myRole": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "isBanned": {
            "type": "boolean"
          },
          "otherMembers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatRoomMember"
            }
          },
          "memberCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "lastMessage": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "audio",
                      "system"
                    ]
                  },
                  "system_payload": {
                    "anyOf": [
                      {},
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "user_id": {
                    "type": "string"
                  },
                  "username": {
                    "type": "string"
                  },
                  "display_name": {
                    "type": "string"
                  },
                  "attachments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "image",
                            "video",
                            "file",
                            "audio",
                            "gif",
                            "sticker"
                          ]
                        },
                        "url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "thumbnail_url": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "filename": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id",
                        "type",
                        "url",
                        "thumbnail_url",
                        "filename"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "deleted_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "edited_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "mentioned_users": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/PublicUser"
                    }
                  },
                  "mentioned_clans": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/MentionedClan"
                    }
                  }
                },
                "required": [
                  "id",
                  "content",
                  "created_at",
                  "user_id",
                  "username",
                  "attachments"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "recentMessages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "content": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "text",
                    "audio",
                    "system"
                  ]
                },
                "system_payload": {
                  "anyOf": [
                    {},
                    {
                      "type": "null"
                    }
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "user_id": {
                  "type": "string"
                },
                "username": {
                  "type": "string"
                },
                "display_name": {
                  "type": "string"
                },
                "attachments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "image",
                          "video",
                          "file",
                          "audio",
                          "gif",
                          "sticker"
                        ]
                      },
                      "url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "thumbnail_url": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "filename": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type",
                      "url",
                      "thumbnail_url",
                      "filename"
                    ],
                    "additionalProperties": false
                  }
                },
                "deleted_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "edited_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "mentioned_users": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PublicUser"
                  }
                },
                "mentioned_clans": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/MentionedClan"
                  }
                }
              },
              "required": [
                "id",
                "content",
                "created_at",
                "user_id",
                "username",
                "attachments"
              ],
              "additionalProperties": false
            }
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChatMessage"
            }
          }
        },
        "required": [
          "id",
          "type",
          "typeId",
          "typeName",
          "visibility",
          "name",
          "imageUrl",
          "channelName",
          "createdAt",
          "unreadCount",
          "lastReadAt",
          "muted",
          "otherMembers",
          "lastMessage",
          "messages"
        ],
        "additionalProperties": false
      },
      "BanMemberOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "UnbanMemberOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "BannedMembersOutput": {
        "type": "object",
        "properties": {
          "bannedUserIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        },
        "required": [
          "bannedUserIds"
        ],
        "additionalProperties": false
      },
      "ChatRoomMutedOutput": {
        "type": "object",
        "properties": {
          "muted": {
            "type": "boolean"
          }
        },
        "required": [
          "muted"
        ],
        "additionalProperties": false
      },
      "ChatRoomPinnedOutput": {
        "type": "object",
        "properties": {
          "pinned": {
            "type": "boolean"
          }
        },
        "required": [
          "pinned"
        ],
        "additionalProperties": false
      },
      "ChatRoomArchivedOutput": {
        "type": "object",
        "properties": {
          "archived": {
            "type": "boolean"
          }
        },
        "required": [
          "archived"
        ],
        "additionalProperties": false
      },
      "ChatRoomHiddenOutput": {
        "type": "object",
        "properties": {
          "hidden": {
            "type": "boolean"
          }
        },
        "required": [
          "hidden"
        ],
        "additionalProperties": false
      },
      "ChatRoomMarkReadOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ArenaEnter1v1QueueOutput": {
        "type": "object",
        "properties": {
          "teamId": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "teamId",
          "status",
          "message"
        ],
        "additionalProperties": false
      },
      "ArenaCancelQueueOutput": {
        "type": "object",
        "properties": {
          "cancelled": {
            "type": "boolean"
          },
          "teamId": {
            "type": "string"
          }
        },
        "required": [
          "cancelled",
          "teamId"
        ],
        "additionalProperties": false
      },
      "ArenaQueueStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "noQueue",
              "queued",
              "matched",
              "beginningDuel",
              "inActiveDuel"
            ]
          },
          "canEnterQueue": {
            "type": "boolean"
          },
          "activeDuelCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "team": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaTeam"
              },
              {
                "type": "null"
              }
            ]
          },
          "duel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaDuel"
              },
              {
                "type": "null"
              }
            ]
          },
          "userArenaElo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "opponentArenaElo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "status",
          "canEnterQueue",
          "activeDuelCount",
          "team",
          "duel",
          "userArenaElo",
          "opponentArenaElo"
        ],
        "additionalProperties": false
      },
      "ArenaTeam": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "team_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "max_bet": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "session_budget": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "duel_time": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "chain_team_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaTeamMember"
            }
          }
        },
        "required": [
          "id",
          "team_type",
          "status",
          "max_bet",
          "session_budget",
          "duel_time",
          "chain_team_id",
          "created_at",
          "updated_at",
          "members"
        ],
        "additionalProperties": false
      },
      "ArenaTeamMember": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "stats": {
            "$ref": "#/components/schemas/UserStats"
          },
          "arena_wallet_address": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "stats",
          "arena_wallet_address"
        ],
        "additionalProperties": {}
      },
      "ArenaDuel": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string"
          },
          "team_a_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "team_b_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "winner_team_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "chain_duel_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "bet": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "duel_time": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "network": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "team_a_roi": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_b_roi": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptance_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trading_starts_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trading_ends_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "team_a": {
            "$ref": "#/components/schemas/ArenaTeam"
          },
          "team_b": {
            "$ref": "#/components/schemas/ArenaTeam"
          },
          "chatRoom": {
            "$ref": "#/components/schemas/ChatRoom"
          }
        },
        "required": [
          "id",
          "status",
          "team_a_id",
          "team_b_id",
          "winner_team_id",
          "chain_duel_id",
          "bet",
          "duel_time",
          "network",
          "team_a_roi",
          "team_b_roi",
          "acceptance_expires_at",
          "trading_starts_at",
          "trading_ends_at",
          "created_at",
          "updated_at",
          "team_a",
          "team_b",
          "chatRoom"
        ],
        "additionalProperties": false
      },
      "ArenaQueueCount": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "wager": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "count",
          "users",
          "wager"
        ],
        "additionalProperties": false
      },
      "ArenaListDuelsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "duels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaListDuelItem"
            }
          }
        },
        "required": [
          "hasMore",
          "duels"
        ],
        "additionalProperties": false
      },
      "ArenaListDuelItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "status": {
            "type": "string"
          },
          "team_a_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "team_b_id": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "winner_team_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "chain_duel_id": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "bet": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "duel_time": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "network": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "team_a_roi": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "team_b_roi": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "acceptance_expires_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trading_starts_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "trading_ends_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "team_a": {
            "$ref": "#/components/schemas/ArenaTeam"
          },
          "team_b": {
            "$ref": "#/components/schemas/ArenaTeam"
          },
          "chatRoom": {
            "$ref": "#/components/schemas/ChatRoom"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaDuelPosition"
            }
          }
        },
        "required": [
          "id",
          "status",
          "team_a_id",
          "team_b_id",
          "winner_team_id",
          "chain_duel_id",
          "bet",
          "duel_time",
          "network",
          "team_a_roi",
          "team_b_roi",
          "acceptance_expires_at",
          "trading_starts_at",
          "trading_ends_at",
          "created_at",
          "updated_at",
          "team_a",
          "team_b",
          "chatRoom"
        ],
        "additionalProperties": false
      },
      "ArenaDuelPosition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "long",
              "short"
            ]
          },
          "size": {
            "type": "number"
          },
          "entry_price": {
            "type": "number"
          },
          "leverage": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "realized_pnl": {
            "type": "number"
          },
          "unrealized_pnl": {
            "type": "number"
          },
          "opened_at": {
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "symbol",
          "side",
          "size",
          "entry_price",
          "leverage",
          "realized_pnl",
          "unrealized_pnl",
          "opened_at",
          "closed_at"
        ],
        "additionalProperties": false
      },
      "ArenaGetDuelByIdOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string"
              },
              "team_a_id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "team_b_id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "winner_team_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_duel_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bet": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "duel_time": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "network": {
                "type": "string",
                "enum": [
                  "hyperliquid_testnet",
                  "hyperliquid_mainnet",
                  "hyperliquid_paper"
                ]
              },
              "team_a_roi": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_b_roi": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "acceptance_expires_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trading_starts_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trading_ends_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "team_a": {
                "$ref": "#/components/schemas/ArenaTeam"
              },
              "team_b": {
                "$ref": "#/components/schemas/ArenaTeam"
              },
              "chatRoom": {
                "$ref": "#/components/schemas/ChatRoom"
              },
              "currentUserId": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "status",
              "team_a_id",
              "team_b_id",
              "winner_team_id",
              "chain_duel_id",
              "bet",
              "duel_time",
              "network",
              "team_a_roi",
              "team_b_roi",
              "acceptance_expires_at",
              "trading_starts_at",
              "trading_ends_at",
              "created_at",
              "updated_at",
              "team_a",
              "team_b",
              "chatRoom",
              "currentUserId"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "ArenaGetPublicDuelOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "status": {
                "type": "string"
              },
              "team_a_id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "team_b_id": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "winner_team_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "chain_duel_id": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bet": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "duel_time": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "network": {
                "type": "string",
                "enum": [
                  "hyperliquid_testnet",
                  "hyperliquid_mainnet",
                  "hyperliquid_paper"
                ]
              },
              "team_a_roi": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "team_b_roi": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "acceptance_expires_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trading_starts_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trading_ends_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "created_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "team_a": {
                "$ref": "#/components/schemas/ArenaTeam"
              },
              "team_b": {
                "$ref": "#/components/schemas/ArenaTeam"
              },
              "chatRoom": {
                "$ref": "#/components/schemas/ChatRoom"
              },
              "positions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ArenaDuelPosition"
                }
              }
            },
            "required": [
              "id",
              "status",
              "team_a_id",
              "team_b_id",
              "winner_team_id",
              "chain_duel_id",
              "bet",
              "duel_time",
              "network",
              "team_a_roi",
              "team_b_roi",
              "acceptance_expires_at",
              "trading_starts_at",
              "trading_ends_at",
              "created_at",
              "updated_at",
              "team_a",
              "team_b",
              "chatRoom"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "ArenaAcceptDuelOutput": {
        "type": "object",
        "properties": {
          "accepted": {
            "type": "boolean"
          },
          "allAccepted": {
            "type": "boolean"
          }
        },
        "required": [
          "accepted",
          "allAccepted"
        ],
        "additionalProperties": false
      },
      "ArenaDeclineDuelOutput": {
        "type": "object",
        "properties": {
          "declined": {
            "type": "boolean"
          },
          "duelId": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "declined",
          "duelId"
        ],
        "additionalProperties": false
      },
      "ArenaActivityLogOutput": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaActivityLogEvent"
            }
          }
        },
        "required": [
          "items"
        ],
        "additionalProperties": false
      },
      "ArenaActivityLogEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "userId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaActivityLogEventData"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "eventType",
          "userId",
          "user",
          "data",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ArenaActivityLogEventData": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "long",
              "short"
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "leverage": {
            "type": "number"
          },
          "closedPnl": {
            "type": "number"
          },
          "fillDirection": {
            "type": "string"
          }
        },
        "required": [
          "symbol",
          "side",
          "size",
          "price",
          "fillDirection"
        ],
        "additionalProperties": false
      },
      "ArenaDuelPnlChartOutput": {
        "type": "object",
        "properties": {
          "points": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaDuelPnlPoint"
            }
          }
        },
        "required": [
          "points"
        ],
        "additionalProperties": false
      },
      "ArenaDuelPnlPoint": {
        "type": "object",
        "properties": {
          "t": {
            "type": "number"
          },
          "traderA": {
            "type": "number"
          },
          "traderB": {
            "type": "number"
          }
        },
        "required": [
          "t",
          "traderA",
          "traderB"
        ],
        "additionalProperties": false
      },
      "ArenaSpotlightOutput": {
        "type": "object",
        "properties": {
          "duel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaListDuelItem"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "duel"
        ],
        "additionalProperties": false
      },
      "ArenaDuelFillsListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaDuelFill"
            }
          }
        },
        "required": [
          "hasMore",
          "fills"
        ],
        "additionalProperties": false
      },
      "ArenaDuelFill": {
        "type": "object",
        "properties": {
          "fill_id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "notional_usd": {
            "type": "number"
          },
          "builder_fee_rate": {
            "type": "number"
          },
          "builder_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_id": {
            "type": "string"
          },
          "client_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee": {
            "type": "number"
          },
          "fee_token": {
            "type": "string"
          },
          "is_maker": {
            "type": "boolean"
          },
          "start_position": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_pnl": {
            "type": "number"
          },
          "is_liquidation": {
            "type": "boolean"
          },
          "liquidation_mark_px": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "executed_at": {
            "type": "string"
          }
        },
        "required": [
          "fill_id",
          "user_id",
          "wallet_address",
          "symbol",
          "side",
          "size",
          "price",
          "notional_usd",
          "builder_fee_rate",
          "builder_address",
          "builder_fee",
          "order_id",
          "client_order_id",
          "fee",
          "fee_token",
          "is_maker",
          "start_position",
          "direction",
          "closed_pnl",
          "is_liquidation",
          "liquidation_mark_px",
          "executed_at"
        ],
        "additionalProperties": false
      },
      "ArenaCreateOrGetWalletOutput": {
        "type": "object",
        "properties": {
          "walletAddress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "privyWalletId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "reused": {
            "type": "boolean"
          }
        },
        "required": [
          "walletAddress",
          "privyWalletId",
          "reused"
        ],
        "additionalProperties": false
      },
      "ArenaHasWageredOutput": {
        "type": "object",
        "properties": {
          "hasWagered": {
            "type": "boolean"
          }
        },
        "required": [
          "hasWagered"
        ],
        "additionalProperties": false
      },
      "ArenaReturnFundsOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ArenaUpdateSignerQuorumOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ArenaWalletAddress": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "ArenaGetUnseenSettlementOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "settlement": {
                "$ref": "#/components/schemas/ArenaSettlementInfo"
              },
              "duel": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "status": {
                    "type": "string"
                  },
                  "team_a_id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "team_b_id": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "winner_team_id": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "chain_duel_id": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "bet": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "duel_time": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "network": {
                    "type": "string",
                    "enum": [
                      "hyperliquid_testnet",
                      "hyperliquid_mainnet",
                      "hyperliquid_paper"
                    ]
                  },
                  "team_a_roi": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "team_b_roi": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "acceptance_expires_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trading_starts_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "trading_ends_at": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "created_at": {
                    "type": "string"
                  },
                  "updated_at": {
                    "type": "string"
                  },
                  "team_a": {
                    "$ref": "#/components/schemas/ArenaTeam"
                  },
                  "team_b": {
                    "$ref": "#/components/schemas/ArenaTeam"
                  },
                  "chatRoom": {
                    "$ref": "#/components/schemas/ChatRoom"
                  },
                  "currentUserId": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "status",
                  "team_a_id",
                  "team_b_id",
                  "winner_team_id",
                  "chain_duel_id",
                  "bet",
                  "duel_time",
                  "network",
                  "team_a_roi",
                  "team_b_roi",
                  "acceptance_expires_at",
                  "trading_starts_at",
                  "trading_ends_at",
                  "created_at",
                  "updated_at",
                  "team_a",
                  "team_b",
                  "chatRoom",
                  "currentUserId"
                ],
                "additionalProperties": false
              },
              "sessionBudget": {
                "type": "number"
              }
            },
            "required": [
              "settlement",
              "duel",
              "sessionBudget"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "ArenaSettlementInfo": {
        "type": "object",
        "properties": {
          "duelId": {
            "type": "string"
          },
          "winnerTeamId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "userTeamId": {
            "type": "string"
          },
          "userROI": {
            "type": "number"
          },
          "opponentROI": {
            "type": "number"
          },
          "won": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "userArenaElo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "userArenaEloBefore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "userArenaEloChange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "opponentArenaElo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "opponentArenaEloBefore": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "opponentArenaEloChange": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "duelId",
          "winnerTeamId",
          "userTeamId",
          "userROI",
          "opponentROI",
          "won",
          "userArenaElo",
          "userArenaEloBefore",
          "userArenaEloChange",
          "opponentArenaElo",
          "opponentArenaEloBefore",
          "opponentArenaEloChange"
        ],
        "additionalProperties": false
      },
      "ArenaMarkSettlementSeenOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ArenaEnsureUnifiedAccountOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "ArenaCompetitionLeaderboardOutput": {
        "type": "object",
        "properties": {
          "ts": {
            "type": "number"
          },
          "traders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaCompetitionLeaderboardEntry"
            }
          }
        },
        "required": [
          "ts",
          "traders"
        ],
        "additionalProperties": false
      },
      "ArenaCompetitionLeaderboardEntry": {
        "type": "object",
        "properties": {
          "user_id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "rank": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "rank_delta": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "pnl_usd": {
            "type": "number"
          },
          "pnl_pct": {
            "type": "number"
          },
          "volume_usd": {
            "type": "number"
          },
          "top_positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "LONG",
                    "SHORT"
                  ]
                },
                "size_usd": {
                  "type": "number"
                },
                "unrealized_pnl": {
                  "type": "number"
                },
                "leverage": {
                  "type": "number"
                }
              },
              "required": [
                "symbol",
                "side",
                "size_usd",
                "unrealized_pnl",
                "leverage"
              ],
              "additionalProperties": false
            }
          },
          "total_positions": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "avg_leverage": {
            "type": "number"
          },
          "avg_hold_time_ms": {
            "type": "number"
          }
        },
        "required": [
          "user_id",
          "username",
          "avatar_url",
          "x_username",
          "rank",
          "rank_delta",
          "pnl_usd",
          "pnl_pct",
          "volume_usd",
          "top_positions",
          "total_positions",
          "avg_leverage",
          "avg_hold_time_ms"
        ],
        "additionalProperties": false
      },
      "ArenaInviteSendOutput": {
        "type": "object",
        "properties": {
          "invitation": {
            "$ref": "#/components/schemas/ArenaInvitation"
          }
        },
        "required": [
          "invitation"
        ],
        "additionalProperties": false
      },
      "ArenaInvitation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "declined",
              "expired",
              "cancelled"
            ]
          },
          "sender": {
            "$ref": "#/components/schemas/ArenaInviteUser"
          },
          "target": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaInviteUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "inviteCode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "maxBet": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "sessionBudget": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "duelTime": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "expiresAt": {
            "type": "string"
          },
          "respondedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "resultingDuelId": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "sender",
          "target",
          "inviteCode",
          "maxBet",
          "sessionBudget",
          "duelTime",
          "expiresAt",
          "respondedAt",
          "resultingDuelId",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "ArenaInviteUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wins": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "losses": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_url",
          "clan_id",
          "wins",
          "losses"
        ],
        "additionalProperties": false
      },
      "ArenaInviteRespondOutput": {
        "type": "object",
        "properties": {
          "response": {
            "type": "string",
            "enum": [
              "accepted",
              "declined"
            ]
          },
          "duelId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "duel": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ArenaDuel"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "response",
          "duelId",
          "duel"
        ],
        "additionalProperties": false
      },
      "ArenaInviteCancelOutput": {
        "type": "object",
        "properties": {
          "cancelled": {
            "type": "boolean"
          }
        },
        "required": [
          "cancelled"
        ],
        "additionalProperties": false
      },
      "ArenaInviteCanChallengeOutput": {
        "type": "object",
        "properties": {
          "allowed": {
            "type": "boolean"
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "allowed",
          "reason"
        ],
        "additionalProperties": false
      },
      "ArenaListReceivedInvitesOutput": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ArenaInvitation"
        }
      },
      "ArenaListSentInvitesOutput": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/ArenaInvitation"
        }
      },
      "ArenaOpenChallengeGetOutput": {
        "type": "object",
        "properties": {
          "invitation": {
            "$ref": "#/components/schemas/ArenaInvitation"
          }
        },
        "required": [
          "invitation"
        ],
        "additionalProperties": false
      },
      "ArenaOpenChallengeListOutput": {
        "type": "object",
        "properties": {
          "challenges": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaInvitation"
            }
          },
          "hasMore": {
            "type": "boolean"
          },
          "nextCursor": {
            "type": "string"
          }
        },
        "required": [
          "challenges",
          "hasMore"
        ],
        "additionalProperties": false
      },
      "ArenaOpenChallengeAcceptOutput": {
        "$ref": "#/components/schemas/ArenaInviteRespondOutput"
      },
      "ArenaLeaderboardOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaLeaderboardEntry"
            }
          }
        },
        "required": [
          "hasMore",
          "entries"
        ],
        "additionalProperties": false
      },
      "ArenaLeaderboardEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "arenaElo": {
            "type": "number"
          },
          "duelStats": {
            "type": "object",
            "properties": {
              "wins": {
                "type": "number"
              },
              "losses": {
                "type": "number"
              },
              "totalPnl": {
                "type": "number"
              },
              "avgRoiPct": {
                "type": "number"
              }
            },
            "required": [
              "wins",
              "losses",
              "totalPnl",
              "avgRoiPct"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "arenaElo",
          "duelStats"
        ],
        "additionalProperties": {}
      },
      "ArenaLeaderboardMeRank": {
        "type": "object",
        "properties": {
          "rank": {
            "description": "Canonical 1-indexed Arena standing by ELO descending.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total": {
            "description": "Total number of ranked Arena users.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "offset": {
            "description": "Zero-indexed position in the canonical Arena ELO ordering.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "arenaElo": {
            "type": "number"
          },
          "duelStats": {
            "type": "object",
            "properties": {
              "wins": {
                "type": "number"
              },
              "losses": {
                "type": "number"
              },
              "totalPnl": {
                "type": "number"
              },
              "avgRoiPct": {
                "type": "number"
              }
            },
            "required": [
              "wins",
              "losses",
              "totalPnl",
              "avgRoiPct"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "rank",
          "total",
          "offset",
          "arenaElo",
          "duelStats"
        ],
        "additionalProperties": false
      },
      "FriendsListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "FollowingListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "FollowCheckStatus": {
        "type": "object",
        "properties": {
          "isFollowing": {
            "type": "boolean"
          },
          "followsYou": {
            "type": "boolean"
          }
        },
        "required": [
          "isFollowing",
          "followsYou"
        ],
        "additionalProperties": false
      },
      "GetMutedOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "NotificationMuteOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "NotificationUnmuteOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "CheckNotificationMuteOutput": {
        "type": "object",
        "properties": {
          "isMuted": {
            "type": "boolean"
          }
        },
        "required": [
          "isMuted"
        ],
        "additionalProperties": false
      },
      "FillHistoryOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FillHistoryItem"
            }
          }
        },
        "required": [
          "hasMore",
          "fills"
        ],
        "additionalProperties": false
      },
      "FillHistoryItem": {
        "type": "object",
        "properties": {
          "fill_id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "closed_pnl": {
            "type": "number"
          },
          "executed_at": {
            "type": "string"
          },
          "leverage_value": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "fill_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "fill_id",
          "symbol",
          "side",
          "direction",
          "size",
          "price",
          "fee",
          "closed_pnl",
          "executed_at",
          "leverage_value",
          "leverage_type",
          "fill_count"
        ],
        "additionalProperties": false
      },
      "Clan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "imageUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bannerUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chatRoomId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channelName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "memberCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClanMember"
            }
          },
          "myRole": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "imageUrl",
          "bannerUrl",
          "chatRoomId",
          "channelName",
          "createdAt",
          "owner",
          "memberCount"
        ],
        "additionalProperties": false
      },
      "ClanMember": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "joinedAt": {
            "type": "string"
          },
          "accountValue": {
            "type": "number"
          },
          "pnlUsd": {
            "type": "number"
          },
          "roiPercent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "volumeUsd": {
            "type": "number"
          }
        },
        "required": [
          "user",
          "role",
          "joinedAt",
          "accountValue",
          "pnlUsd",
          "roiPercent",
          "volumeUsd"
        ],
        "additionalProperties": false
      },
      "ClanListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Clan"
            }
          }
        },
        "required": [
          "hasMore",
          "clans"
        ],
        "additionalProperties": false
      },
      "ClanLeaderboardOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "clans": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "description": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "imageUrl": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "bannerUrl": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "chatRoomId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "channelName": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string"
                },
                "owner": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PublicUser"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "memberCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "members": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ClanMember"
                  }
                },
                "myRole": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "admin",
                    "member"
                  ]
                },
                "rank": {
                  "description": "Canonical 1-indexed total-PnL-descending rank; may be non-monotonic when the response uses another sort.",
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "totalValue": {
                  "type": "number"
                },
                "totalPnl": {
                  "type": "number"
                },
                "avgMemberValue": {
                  "type": "number"
                },
                "avgRoi": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "name",
                "description",
                "imageUrl",
                "bannerUrl",
                "chatRoomId",
                "channelName",
                "createdAt",
                "owner",
                "memberCount",
                "rank",
                "totalValue",
                "totalPnl",
                "avgMemberValue",
                "avgRoi"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "hasMore",
          "clans"
        ],
        "additionalProperties": false
      },
      "ClanLeaderboardMeRank": {
        "type": "object",
        "properties": {
          "rank": {
            "description": "Canonical 1-indexed clan standing by total PnL descending; independent of the requested sort.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total": {
            "description": "Total number of ranked clans.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "offset": {
            "description": "Zero-indexed clan position under the requested sort; use this value for pagination.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "clan": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "imageUrl": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "imageUrl"
            ],
            "additionalProperties": false
          },
          "stats": {
            "type": "object",
            "properties": {
              "totalPnl": {
                "type": "number"
              },
              "totalValue": {
                "type": "number"
              },
              "avgRoi": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "memberCount": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "totalPnl",
              "totalValue",
              "avgRoi",
              "memberCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "rank",
          "total",
          "offset",
          "clan",
          "stats"
        ],
        "additionalProperties": false
      },
      "ClanIncentive": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "clanId": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "volumeWindowDays": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "volume30dUsd": {
            "type": "number"
          },
          "memberCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "tier": {
            "type": "object",
            "properties": {
              "level": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5
              },
              "rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 0.05
              },
              "minVolumeUsd": {
                "type": "number"
              },
              "nextMinVolumeUsd": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "nextRate": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "progress": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "level",
              "rate",
              "minVolumeUsd",
              "nextMinVolumeUsd",
              "nextRate",
              "progress"
            ],
            "additionalProperties": false
          },
          "tiers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 5
                },
                "minVolumeUsd": {
                  "type": "number"
                },
                "rate": {
                  "type": "number",
                  "minimum": 0.01,
                  "maximum": 0.05
                }
              },
              "required": [
                "level",
                "minVolumeUsd",
                "rate"
              ],
              "additionalProperties": false
            }
          },
          "membership": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "role": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "admin",
                      "member"
                    ]
                  },
                  "clanRebateRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 0.05
                  },
                  "effectiveRebateRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "role",
                  "clanRebateRate",
                  "effectiveRebateRate"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "enabled",
          "clanId",
          "volumeWindowDays",
          "volume30dUsd",
          "memberCount",
          "tier",
          "tiers",
          "membership"
        ],
        "additionalProperties": false
      },
      "ClanMembersOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClanMember"
            }
          },
          "totalPnl": {
            "type": "number"
          },
          "totalValue": {
            "type": "number"
          }
        },
        "required": [
          "hasMore",
          "members",
          "totalPnl",
          "totalValue"
        ],
        "additionalProperties": false
      },
      "UnifiedSearchUserResult": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "followers_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "top_positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "network": {
                  "type": "string",
                  "enum": [
                    "hyperliquid_testnet",
                    "hyperliquid_mainnet",
                    "hyperliquid_paper"
                  ]
                },
                "user_id": {
                  "type": "string"
                },
                "wallet_address": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "LONG",
                    "SHORT"
                  ]
                },
                "size": {
                  "type": "number"
                },
                "entry_price": {
                  "type": "number"
                },
                "max_size": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leverage_type": {
                  "type": "string"
                },
                "leverage_value": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "margin_used": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "realized_pnl": {
                  "type": "number"
                },
                "unrealized_pnl": {
                  "type": "number"
                },
                "cum_funding_since_open": {
                  "type": "number"
                },
                "cum_funding_since_change": {
                  "type": "number"
                },
                "opened_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                },
                "closed_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closed_price": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "close_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "MANUAL",
                        "TAKE_PROFIT",
                        "STOP_LOSS",
                        "TRAILING_STOP",
                        "LIQUIDATION",
                        "AUTO_DELEVERAGE"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "close_notified_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "open_notified_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position_move_last_notified_pct": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notional_usd": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "network",
                "user_id",
                "wallet_address",
                "symbol",
                "side",
                "size",
                "entry_price",
                "max_size",
                "leverage_type",
                "leverage_value",
                "margin_used",
                "realized_pnl",
                "unrealized_pnl",
                "cum_funding_since_open",
                "cum_funding_since_change",
                "opened_at",
                "updated_at",
                "closed_at",
                "closed_price",
                "close_reason",
                "close_notified_at",
                "open_notified_at",
                "position_move_last_notified_pct",
                "notional_usd"
              ],
              "additionalProperties": false
            }
          },
          "pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "unrealized_pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "roi_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "tradingStats": {
            "type": "object",
            "properties": {
              "pnlUsd": {
                "type": "number"
              },
              "volumeUsd": {
                "type": "number"
              },
              "openPositionSymbols": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "pnlUsd",
              "volumeUsd",
              "openPositionSymbols"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "user",
          "followers_count",
          "top_positions",
          "pnl_usd",
          "unrealized_pnl_usd",
          "total_pnl_usd",
          "roi_percent",
          "tradingStats"
        ],
        "additionalProperties": false
      },
      "SearchClanResult": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "imageUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bannerUrl": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chatRoomId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "channelName": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "owner": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "memberCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClanMember"
            }
          },
          "myRole": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "tradingStats": {
            "type": "object",
            "properties": {
              "totalPnl": {
                "type": "number"
              },
              "totalValue": {
                "type": "number"
              }
            },
            "required": [
              "totalPnl",
              "totalValue"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "imageUrl",
          "bannerUrl",
          "chatRoomId",
          "channelName",
          "createdAt",
          "owner",
          "memberCount",
          "tradingStats"
        ],
        "additionalProperties": false
      },
      "SearchUsersOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SearchUserResult"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "SearchUserResult": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "followers_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "top_positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "network": {
                  "type": "string",
                  "enum": [
                    "hyperliquid_testnet",
                    "hyperliquid_mainnet",
                    "hyperliquid_paper"
                  ]
                },
                "user_id": {
                  "type": "string"
                },
                "wallet_address": {
                  "type": "string"
                },
                "symbol": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "LONG",
                    "SHORT"
                  ]
                },
                "size": {
                  "type": "number"
                },
                "entry_price": {
                  "type": "number"
                },
                "max_size": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leverage_type": {
                  "type": "string"
                },
                "leverage_value": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "margin_used": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "realized_pnl": {
                  "type": "number"
                },
                "unrealized_pnl": {
                  "type": "number"
                },
                "cum_funding_since_open": {
                  "type": "number"
                },
                "cum_funding_since_change": {
                  "type": "number"
                },
                "opened_at": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string"
                },
                "closed_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "closed_price": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "close_reason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "MANUAL",
                        "TAKE_PROFIT",
                        "STOP_LOSS",
                        "TRAILING_STOP",
                        "LIQUIDATION",
                        "AUTO_DELEVERAGE"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "close_notified_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "open_notified_at": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "position_move_last_notified_pct": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "notional_usd": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "network",
                "user_id",
                "wallet_address",
                "symbol",
                "side",
                "size",
                "entry_price",
                "max_size",
                "leverage_type",
                "leverage_value",
                "margin_used",
                "realized_pnl",
                "unrealized_pnl",
                "cum_funding_since_open",
                "cum_funding_since_change",
                "opened_at",
                "updated_at",
                "closed_at",
                "closed_price",
                "close_reason",
                "close_notified_at",
                "open_notified_at",
                "position_move_last_notified_pct",
                "notional_usd"
              ],
              "additionalProperties": false
            }
          },
          "pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "unrealized_pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_pnl_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "roi_percent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "user",
          "followers_count",
          "top_positions",
          "pnl_usd",
          "unrealized_pnl_usd",
          "total_pnl_usd",
          "roi_percent"
        ],
        "additionalProperties": false
      },
      "MinePositionOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "network": {
                "type": "string",
                "enum": [
                  "hyperliquid_testnet",
                  "hyperliquid_mainnet",
                  "hyperliquid_paper"
                ]
              },
              "user_id": {
                "type": "string"
              },
              "wallet_address": {
                "type": "string"
              },
              "symbol": {
                "type": "string"
              },
              "side": {
                "type": "string",
                "enum": [
                  "LONG",
                  "SHORT"
                ]
              },
              "size": {
                "type": "number"
              },
              "entry_price": {
                "type": "number"
              },
              "max_size": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "leverage_type": {
                "type": "string"
              },
              "leverage_value": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "margin_used": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "realized_pnl": {
                "type": "number"
              },
              "unrealized_pnl": {
                "type": "number"
              },
              "cum_funding_since_open": {
                "type": "number"
              },
              "cum_funding_since_change": {
                "type": "number"
              },
              "opened_at": {
                "type": "string"
              },
              "updated_at": {
                "type": "string"
              },
              "closed_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "closed_price": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close_reason": {
                "anyOf": [
                  {
                    "type": "string",
                    "enum": [
                      "MANUAL",
                      "TAKE_PROFIT",
                      "STOP_LOSS",
                      "TRAILING_STOP",
                      "LIQUIDATION",
                      "AUTO_DELEVERAGE"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "close_notified_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "open_notified_at": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "position_move_last_notified_pct": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pnl_sparkline": {
                "anyOf": [
                  {},
                  {
                    "type": "null"
                  }
                ]
              },
              "notional_usd": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "network",
              "user_id",
              "wallet_address",
              "symbol",
              "side",
              "size",
              "entry_price",
              "max_size",
              "leverage_type",
              "leverage_value",
              "margin_used",
              "realized_pnl",
              "unrealized_pnl",
              "cum_funding_since_open",
              "cum_funding_since_change",
              "opened_at",
              "updated_at",
              "closed_at",
              "closed_price",
              "close_reason",
              "close_notified_at",
              "open_notified_at",
              "position_move_last_notified_pct",
              "pnl_sparkline",
              "notional_usd"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "PositionHistoryOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionHistoryItem"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/PositionHistoryTotals"
          }
        },
        "required": [
          "hasMore",
          "positions",
          "totals"
        ],
        "additionalProperties": false
      },
      "PositionHistoryItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "entry_price": {
            "type": "number"
          },
          "closed_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_type": {
            "type": "string"
          },
          "leverage_value": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "realized_pnl": {
            "type": "number"
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "MANUAL",
                  "TAKE_PROFIT",
                  "STOP_LOSS",
                  "TRAILING_STOP",
                  "LIQUIDATION",
                  "AUTO_DELEVERAGE"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "opened_at": {
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_fees": {
            "type": "number"
          },
          "total_funding": {
            "type": "number"
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryFill"
            }
          }
        },
        "required": [
          "id",
          "symbol",
          "side",
          "size",
          "entry_price",
          "closed_price",
          "leverage_type",
          "leverage_value",
          "realized_pnl",
          "close_reason",
          "opened_at",
          "closed_at",
          "total_fees",
          "total_funding",
          "fills"
        ],
        "additionalProperties": false
      },
      "HistoryFill": {
        "type": "object",
        "properties": {
          "fill_id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string"
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "closed_pnl": {
            "type": "number"
          },
          "executed_at": {
            "type": "string"
          }
        },
        "required": [
          "fill_id",
          "symbol",
          "side",
          "direction",
          "size",
          "price",
          "fee",
          "closed_pnl",
          "executed_at"
        ],
        "additionalProperties": false
      },
      "PositionHistoryTotals": {
        "type": "object",
        "properties": {
          "realizedPnl": {
            "type": "number"
          },
          "funding": {
            "type": "number"
          },
          "netPnl": {
            "type": "number"
          },
          "closedPositionCount": {
            "type": "number"
          }
        },
        "required": [
          "realizedPnl",
          "funding",
          "netPnl",
          "closedPositionCount"
        ],
        "additionalProperties": false
      },
      "AssetPerformanceOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetPerformance"
            }
          }
        },
        "required": [
          "hasMore",
          "assets"
        ],
        "additionalProperties": false
      },
      "AssetPerformance": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "trades": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "wins": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "losses": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "win_rate": {
            "type": "number"
          },
          "volume": {
            "type": "number"
          },
          "total_pnl": {
            "type": "number"
          },
          "total_fees": {
            "type": "number"
          },
          "avg_win": {
            "type": "number"
          },
          "median_win": {
            "type": "number"
          }
        },
        "required": [
          "symbol",
          "trades",
          "wins",
          "losses",
          "win_rate",
          "volume",
          "total_pnl",
          "total_fees",
          "avg_win",
          "median_win"
        ],
        "additionalProperties": false
      },
      "RecentOutcomesOutput": {
        "type": "object",
        "properties": {
          "outcomes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeOutcome"
            }
          },
          "totalTrades": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "winRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "outcomes",
          "totalTrades",
          "winRate"
        ],
        "additionalProperties": false
      },
      "TradeOutcome": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "pnl": {
            "type": "number"
          },
          "date": {
            "type": "string"
          },
          "is_open": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "pnl",
          "date",
          "is_open"
        ],
        "additionalProperties": false
      },
      "PositionsTrendingOutput": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/TrendingPositionItem"
        }
      },
      "TrendingPositionItem": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "position": {
            "$ref": "#/components/schemas/TrendingPosition"
          },
          "trader": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "otherHoldersPreview": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "otherHoldersCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "rank",
          "position",
          "trader",
          "otherHoldersPreview",
          "otherHoldersCount"
        ],
        "additionalProperties": false
      },
      "TrendingPosition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "network": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "user_id": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "entry_price": {
            "type": "number"
          },
          "max_size": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_type": {
            "type": "string"
          },
          "leverage_value": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "margin_used": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "realized_pnl": {
            "type": "number"
          },
          "unrealized_pnl": {
            "type": "number"
          },
          "cum_funding_since_open": {
            "type": "number"
          },
          "cum_funding_since_change": {
            "type": "number"
          },
          "opened_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "closed_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "close_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "MANUAL",
                  "TAKE_PROFIT",
                  "STOP_LOSS",
                  "TRAILING_STOP",
                  "LIQUIDATION",
                  "AUTO_DELEVERAGE"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "close_notified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "open_notified_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_move_last_notified_pct": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "notional_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnlSparkline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparklinePoint"
            }
          }
        },
        "required": [
          "id",
          "network",
          "user_id",
          "wallet_address",
          "symbol",
          "side",
          "size",
          "entry_price",
          "max_size",
          "leverage_type",
          "leverage_value",
          "margin_used",
          "realized_pnl",
          "unrealized_pnl",
          "cum_funding_since_open",
          "cum_funding_since_change",
          "opened_at",
          "updated_at",
          "closed_at",
          "closed_price",
          "close_reason",
          "close_notified_at",
          "open_notified_at",
          "position_move_last_notified_pct",
          "notional_usd",
          "pnlSparkline"
        ],
        "additionalProperties": false
      },
      "PositioningOutput": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "longNotionalUsd": {
            "type": "number"
          },
          "shortNotionalUsd": {
            "type": "number"
          },
          "longTraderCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "shortTraderCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "avgLeverage": {
            "type": "number"
          },
          "totalTraderCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "symbol",
          "longNotionalUsd",
          "shortNotionalUsd",
          "longTraderCount",
          "shortTraderCount",
          "avgLeverage",
          "totalTraderCount"
        ],
        "additionalProperties": false
      },
      "PositionsBoardOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BoardPositionItem"
            }
          }
        },
        "required": [
          "hasMore",
          "positions"
        ],
        "additionalProperties": false
      },
      "BoardPositionItem": {
        "type": "object",
        "properties": {
          "position": {
            "$ref": "#/components/schemas/BoardPosition"
          },
          "trader": {
            "$ref": "#/components/schemas/AvatarUser"
          },
          "copyTarget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AvatarUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copyDetails": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BoardCopyDetails"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "position",
          "trader",
          "copyTarget",
          "copyDetails"
        ],
        "additionalProperties": false
      },
      "BoardPosition": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "entry_price": {
            "type": "number"
          },
          "leverage_value": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "unrealized_pnl": {
            "type": "number"
          },
          "realized_pnl": {
            "type": "number"
          },
          "notional_usd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "margin_used": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "opened_at": {
            "type": "string"
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "activity_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "symbol",
          "side",
          "size",
          "entry_price",
          "leverage_value",
          "unrealized_pnl",
          "realized_pnl",
          "notional_usd",
          "margin_used",
          "opened_at",
          "closed_at",
          "activity_at"
        ],
        "additionalProperties": false
      },
      "BoardCopyDetails": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number"
          },
          "margin": {
            "type": "number"
          },
          "leverage": {
            "type": "number"
          },
          "entry_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "copied_at": {
            "type": "string"
          }
        },
        "required": [
          "amount",
          "margin",
          "leverage",
          "entry_price",
          "copied_at"
        ],
        "additionalProperties": false
      },
      "PositionsMovesOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "moves": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionMoveItem"
            }
          }
        },
        "required": [
          "hasMore",
          "moves"
        ],
        "additionalProperties": false
      },
      "PositionMoveItem": {
        "type": "object",
        "properties": {
          "move": {
            "$ref": "#/components/schemas/PositionMove"
          },
          "position": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BoardPosition"
              },
              {
                "type": "null"
              }
            ]
          },
          "trader": {
            "$ref": "#/components/schemas/AvatarUser"
          },
          "copyTarget": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AvatarUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copyDetails": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BoardCopyDetails"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "move",
          "position",
          "trader",
          "copyTarget",
          "copyDetails"
        ],
        "additionalProperties": false
      },
      "PositionMove": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "action": {
            "$ref": "#/components/schemas/PositionMoveAction"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "previous_side": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "LONG",
                  "SHORT"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "notional_usd": {
            "type": "number"
          },
          "realized_pnl": {
            "type": "number"
          },
          "before_size": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "after_size": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "executed_at": {
            "type": "string"
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PositionMoveFill"
            }
          }
        },
        "required": [
          "id",
          "action",
          "symbol",
          "side",
          "previous_side",
          "size",
          "price",
          "notional_usd",
          "realized_pnl",
          "before_size",
          "after_size",
          "leverage_value",
          "executed_at",
          "fills"
        ],
        "additionalProperties": false
      },
      "PositionMoveAction": {
        "type": "string",
        "enum": [
          "opened",
          "added",
          "reduced",
          "closed",
          "flipped"
        ]
      },
      "PositionMoveFill": {
        "type": "object",
        "properties": {
          "fill_id": {
            "type": "string"
          },
          "order_id": {
            "type": "string"
          },
          "direction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "notional_usd": {
            "type": "number"
          },
          "closed_pnl": {
            "type": "number"
          },
          "start_position": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "executed_at": {
            "type": "string"
          }
        },
        "required": [
          "fill_id",
          "order_id",
          "direction",
          "side",
          "size",
          "price",
          "notional_usd",
          "closed_pnl",
          "start_position",
          "executed_at"
        ],
        "additionalProperties": false
      },
      "PositionMoveLifecycleOutput": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "position_id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "is_open": {
                "type": "boolean"
              },
              "events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PositionMoveLifecycleEvent"
                }
              }
            },
            "required": [
              "position_id",
              "is_open",
              "events"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "PositionMoveLifecycleEvent": {
        "type": "object",
        "properties": {
          "action": {
            "$ref": "#/components/schemas/PositionMoveAction"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "execution_side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "previous_side": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "LONG",
                  "SHORT"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "fill_ids": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "order_id": {
            "type": "string"
          },
          "size": {
            "type": "number"
          },
          "price": {
            "type": "number"
          },
          "notional_usd": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "realized_pnl": {
            "type": "number"
          },
          "executed_at": {
            "type": "string"
          }
        },
        "required": [
          "action",
          "side",
          "execution_side",
          "previous_side",
          "fill_ids",
          "order_id",
          "size",
          "price",
          "notional_usd",
          "fee",
          "realized_pnl",
          "executed_at"
        ],
        "additionalProperties": false
      },
      "PnlSparklineOutput": {
        "type": "object",
        "properties": {
          "sparkline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparklinePoint"
            }
          }
        },
        "required": [
          "sparkline"
        ],
        "additionalProperties": false
      },
      "PositionGetOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "isOpen": {
            "type": "boolean"
          },
          "user": {
            "$ref": "#/components/schemas/PublicPositionUser"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "entryPrice": {
            "type": "number"
          },
          "closedPrice": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "walletAddress": {
            "type": "string"
          },
          "leverageValue": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "unrealizedPnl": {
            "type": "number"
          },
          "realizedPnl": {
            "type": "number"
          },
          "openedAt": {
            "type": "string"
          },
          "closedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalFees": {
            "type": "number"
          },
          "totalFunding": {
            "type": "number"
          },
          "fills": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/HistoryFill"
            }
          },
          "pnlSparkline": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SparklinePoint"
            }
          }
        },
        "required": [
          "id",
          "isOpen",
          "user",
          "symbol",
          "side",
          "size",
          "entryPrice",
          "closedPrice",
          "walletAddress",
          "leverageValue",
          "unrealizedPnl",
          "realizedPnl",
          "openedAt",
          "closedAt",
          "totalFees",
          "totalFunding",
          "fills",
          "pnlSparkline"
        ],
        "additionalProperties": false
      },
      "PublicPositionUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "followerCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "followingCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "pnlShareEnabled": {
            "type": "boolean"
          },
          "pnlShareRate": {
            "type": "number"
          },
          "isDueling": {
            "type": "boolean"
          },
          "isOnline": {
            "type": "boolean"
          },
          "isFollowing": {
            "type": "boolean"
          },
          "isOwnProfile": {
            "type": "boolean"
          },
          "activeCopyProfile": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ActiveCopyProfile"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_url",
          "rank",
          "clan_id",
          "account_value_tier",
          "is_official",
          "referral_code",
          "referral_code_alt",
          "bio",
          "feature_image",
          "last_online",
          "created_at",
          "x_username",
          "elo",
          "followerCount",
          "followingCount",
          "pnlShareEnabled",
          "pnlShareRate",
          "isDueling",
          "isOnline",
          "isFollowing",
          "isOwnProfile",
          "activeCopyProfile"
        ],
        "additionalProperties": false
      },
      "ListPostsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        },
        "required": [
          "hasMore",
          "posts"
        ],
        "additionalProperties": false
      },
      "Post": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "$ref": "#/components/schemas/PostType"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_symbol": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostClan"
              },
              {
                "type": "null"
              }
            ]
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "comment_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "copied_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "copiedUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copied_count": {
            "default": 0,
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copiers": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "is_liked": {
            "type": "boolean"
          },
          "tradingMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TradingMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "link_preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "recap_content": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecapContent"
              },
              {
                "type": "null"
              }
            ]
          },
          "quoted_post": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BasePost"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "type",
          "content",
          "chart_symbol",
          "chart_timestamp",
          "position_id",
          "order_id",
          "network",
          "clan_id",
          "clan",
          "like_count",
          "comment_count",
          "chat_room_id",
          "created_at",
          "updated_at",
          "copied_user_id",
          "copiedUser",
          "copied_count",
          "copiers",
          "user",
          "attachments",
          "is_liked",
          "mentioned_users"
        ],
        "additionalProperties": false
      },
      "NewPostsProbeOutput": {
        "type": "object",
        "properties": {
          "count": {
            "type": "number"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedMentionedUser"
            }
          }
        },
        "required": [
          "count",
          "users"
        ],
        "additionalProperties": false
      },
      "FeedMentionedUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_url"
        ],
        "additionalProperties": false
      },
      "ListChartPostsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        },
        "required": [
          "hasMore",
          "posts"
        ],
        "additionalProperties": false
      },
      "LinkedPostsOutput": {
        "type": "object",
        "properties": {
          "linkedPosts": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string",
              "format": "uuid",
              "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            }
          }
        },
        "required": [
          "linkedPosts"
        ],
        "additionalProperties": false
      },
      "GetPostsByIdsOutput": {
        "type": "object",
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Post"
            }
          }
        },
        "required": [
          "posts"
        ],
        "additionalProperties": false
      },
      "UpdatePostOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "GetPostOutput": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/Post"
          },
          "chatRoom": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostChatRoom"
              },
              {
                "type": "null"
              }
            ]
          },
          "relatedPosts": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Post"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "post",
          "chatRoom"
        ],
        "additionalProperties": false
      },
      "PostChatRoom": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "channel_name": {
            "type": "string"
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostChatMessage"
            }
          }
        },
        "required": [
          "id",
          "channel_name",
          "messages"
        ],
        "additionalProperties": false
      },
      "PostChatMessage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "client_id": {
            "type": "string"
          },
          "room_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "audio",
              "system"
            ]
          },
          "reply_to_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "reply_to": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "format": "uuid",
                    "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                  },
                  "content": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "audio",
                      "system"
                    ]
                  },
                  "user": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                          },
                          "username": {
                            "type": "string"
                          },
                          "display_name": {
                            "type": "string"
                          },
                          "avatar_url": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "username",
                          "display_name",
                          "avatar_url"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "content",
                  "type",
                  "user"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "user": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_liked": {
            "type": "boolean"
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          }
        },
        "required": [
          "id",
          "client_id",
          "room_id",
          "user_id",
          "content",
          "type",
          "reply_to_id",
          "reply_to",
          "created_at",
          "user",
          "attachments",
          "like_count",
          "is_liked",
          "mentioned_users"
        ],
        "additionalProperties": false
      },
      "DeleteCommentOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "GetPostLikesOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "OnrampTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deposit_id": {
            "type": "string"
          },
          "amount": {
            "type": "string"
          },
          "gross_amount": {
            "type": "string"
          },
          "fees_paid": {
            "type": "string"
          },
          "currency_symbol": {
            "type": "string"
          },
          "currency_decimals": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "blockchain": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "submitted",
              "enriched",
              "confirmed",
              "failed"
            ]
          },
          "bridge_status": {
            "type": "string",
            "enum": [
              "pending",
              "initiated",
              "success",
              "failed",
              "skipped"
            ]
          },
          "tx_signature": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bridge_tx_hash": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bridge_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "source": {
            "type": "string"
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "enriched_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "confirmed_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "bridged_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "amount_human": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "deposit_id",
          "amount",
          "gross_amount",
          "fees_paid",
          "currency_symbol",
          "currency_decimals",
          "blockchain",
          "status",
          "bridge_status",
          "tx_signature",
          "bridge_tx_hash",
          "bridge_error",
          "source",
          "submitted_at",
          "enriched_at",
          "confirmed_at",
          "bridged_at",
          "created_at",
          "amount_human"
        ],
        "additionalProperties": false
      },
      "CombinedPortfolioHistoryOutput": {
        "type": "object",
        "properties": {
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CombinedPortfolioPoint"
            }
          }
        },
        "required": [
          "history"
        ],
        "additionalProperties": false
      },
      "CombinedPortfolioPoint": {
        "type": "object",
        "properties": {
          "time": {
            "type": "number"
          },
          "account_value": {
            "type": "number"
          },
          "pnl": {
            "type": "number"
          }
        },
        "required": [
          "time",
          "account_value",
          "pnl"
        ],
        "additionalProperties": false
      },
      "WalletStats": {
        "type": "object",
        "properties": {
          "current_value": {
            "type": "number"
          },
          "total_margin": {
            "type": "number"
          },
          "positions_value": {
            "type": "number"
          },
          "positions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletStatsPosition"
            }
          }
        },
        "required": [
          "current_value",
          "total_margin",
          "positions_value",
          "positions"
        ],
        "additionalProperties": false
      },
      "WalletStatsPosition": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "size": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "entry_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "unrealized_pnl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "leverage_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "margin_used": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "liquidation_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "return_on_equity": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "symbol",
          "size",
          "entry_price",
          "unrealized_pnl",
          "leverage_type",
          "leverage_value",
          "position_value",
          "margin_used",
          "liquidation_price",
          "return_on_equity"
        ],
        "additionalProperties": false
      },
      "RealtimePortfolioOutput": {
        "type": "object",
        "properties": {
          "account_value": {
            "type": "number"
          },
          "pnl": {
            "type": "number"
          },
          "observed_at": {
            "type": "string"
          }
        },
        "required": [
          "account_value",
          "pnl",
          "observed_at"
        ],
        "additionalProperties": false
      },
      "RealizedPnlCalendar": {
        "type": "object",
        "properties": {
          "days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "day": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "pnl": {
                  "type": "number"
                }
              },
              "required": [
                "day",
                "pnl"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "days"
        ],
        "additionalProperties": false
      },
      "ReportCreateOutput": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          }
        },
        "required": [
          "success"
        ],
        "additionalProperties": false
      },
      "error.TOO_MANY_REQUESTS": {
        "title": "Too many reports error (429)",
        "description": "The error information",
        "example": {
          "code": "TOO_MANY_REQUESTS",
          "message": "Too many reports",
          "issues": []
        },
        "type": "object",
        "properties": {
          "message": {
            "description": "The error message",
            "example": "Too many reports",
            "type": "string"
          },
          "code": {
            "description": "The error code",
            "example": "TOO_MANY_REQUESTS",
            "type": "string"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false
      },
      "CopyTrade": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "copier_id": {
            "type": "string"
          },
          "target_user_id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "amount": {
            "type": "number"
          },
          "margin": {
            "type": "number"
          },
          "leverage": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "entry_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "target_position_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "copier_position_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "post_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "copier_id",
          "target_user_id",
          "symbol",
          "side",
          "amount",
          "margin",
          "leverage",
          "entry_price",
          "target_position_id",
          "copier_position_id",
          "post_id",
          "created_at"
        ],
        "additionalProperties": false
      },
      "PositionCopiesOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "copies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopyEntry"
            }
          }
        },
        "required": [
          "total",
          "hasMore",
          "copies"
        ],
        "additionalProperties": false
      },
      "CopyEntry": {
        "type": "object",
        "properties": {
          "copier": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "tradingMetadata": {
            "$ref": "#/components/schemas/TradingMetadata"
          }
        },
        "required": [
          "copier",
          "tradingMetadata"
        ],
        "additionalProperties": false
      },
      "CopyProfile": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "sub_wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "allocated_amount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "stopping",
              "stopped"
            ]
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "needs_rebalance": {
            "type": "boolean"
          },
          "force_close_requested": {
            "type": "boolean"
          },
          "copier_equity_baseline": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "copier_baseline_updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "stopped_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "target_id",
          "sub_wallet_address",
          "allocated_amount",
          "status",
          "pnl_share_rate",
          "needs_rebalance",
          "force_close_requested",
          "copier_equity_baseline",
          "copier_baseline_updated_at",
          "created_at",
          "updated_at",
          "stopped_at"
        ],
        "additionalProperties": false
      },
      "CopyProfileListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopyProfileListItem"
            }
          },
          "totalActivePnl": {
            "type": "number"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "hasMore",
          "profiles",
          "totalActivePnl",
          "truncated"
        ],
        "additionalProperties": false
      },
      "CopyProfileListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "sub_wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "allocated_amount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "stopping",
              "stopped"
            ]
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "needs_rebalance": {
            "type": "boolean"
          },
          "force_close_requested": {
            "type": "boolean"
          },
          "copier_equity_baseline": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "copier_baseline_updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "stopped_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "target": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "currentValue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "positionSymbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "user_id",
          "target_id",
          "sub_wallet_address",
          "allocated_amount",
          "status",
          "pnl_share_rate",
          "needs_rebalance",
          "force_close_requested",
          "copier_equity_baseline",
          "copier_baseline_updated_at",
          "created_at",
          "updated_at",
          "stopped_at",
          "target",
          "currentValue",
          "pnl",
          "positionSymbols"
        ],
        "additionalProperties": false
      },
      "CopyProfileHistory": {
        "type": "object",
        "properties": {
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopyHistoryPoint"
            }
          }
        },
        "required": [
          "history"
        ],
        "additionalProperties": false
      },
      "CopyHistoryPoint": {
        "type": "object",
        "properties": {
          "time": {
            "type": "number"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "time",
          "value"
        ],
        "additionalProperties": false
      },
      "CopierListOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "profiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopierListItem"
            }
          },
          "totalAumUsd": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalEarnings": {
            "type": "number"
          },
          "totalActivePnl": {
            "type": "number"
          },
          "truncated": {
            "type": "boolean"
          }
        },
        "required": [
          "hasMore",
          "profiles",
          "totalEarnings",
          "totalActivePnl",
          "truncated"
        ],
        "additionalProperties": false
      },
      "CopierListItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "user_id": {
            "type": "string"
          },
          "target_id": {
            "type": "string"
          },
          "sub_wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "allocated_amount": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "stopping",
              "stopped"
            ]
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "needs_rebalance": {
            "type": "boolean"
          },
          "force_close_requested": {
            "type": "boolean"
          },
          "copier_equity_baseline": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "copier_baseline_updated_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "stopped_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "earnings": {
            "type": "number"
          },
          "currentValue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "pnl": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "positionSymbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "id",
          "user_id",
          "target_id",
          "sub_wallet_address",
          "allocated_amount",
          "status",
          "pnl_share_rate",
          "needs_rebalance",
          "force_close_requested",
          "copier_equity_baseline",
          "copier_baseline_updated_at",
          "created_at",
          "updated_at",
          "stopped_at",
          "user",
          "earnings",
          "currentValue",
          "pnl",
          "positionSymbols"
        ],
        "additionalProperties": false
      },
      "PnlShareSettings": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "rate": {
            "type": "number"
          }
        },
        "required": [
          "enabled",
          "rate"
        ],
        "additionalProperties": false
      },
      "AvailableCopyWallet": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "address": {
                "type": "string"
              },
              "privyWalletId": {
                "type": "string"
              }
            },
            "required": [
              "address",
              "privyWalletId"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "WithdrawFundsOutput": {
        "type": "object",
        "properties": {
          "allocatedAmount": {
            "type": "number"
          }
        },
        "required": [
          "allocatedAmount"
        ],
        "additionalProperties": false
      },
      "WalletExchangeSignature": {
        "type": "object",
        "properties": {
          "r": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$"
          },
          "s": {
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{64}$"
          },
          "v": {
            "anyOf": [
              {
                "type": "number",
                "const": 27
              },
              {
                "type": "number",
                "const": 28
              }
            ]
          }
        },
        "required": [
          "r",
          "s",
          "v"
        ],
        "additionalProperties": false
      },
      "TrailingStop": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "trail_percent": {
            "type": "number"
          },
          "callback_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "size": {
            "type": "number"
          },
          "high_water_mark": {
            "type": "number"
          },
          "current_trigger_price": {
            "type": "number"
          },
          "hl_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "TRIGGERED",
              "CANCELLED",
              "ERROR"
            ]
          },
          "triggered_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "triggered_price": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "symbol",
          "side",
          "trail_percent",
          "callback_rate",
          "size",
          "high_water_mark",
          "current_trigger_price",
          "hl_order_id",
          "status",
          "triggered_at",
          "triggered_price",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ListTrailingStopsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "trailingStops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TrailingStop"
            }
          }
        },
        "required": [
          "hasMore",
          "trailingStops"
        ],
        "additionalProperties": false
      },
      "SeasonLeaderboardOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeasonLeaderboardEntry"
            }
          },
          "qualificationMinVolumeUsd": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "hasMore",
          "users"
        ],
        "additionalProperties": false
      },
      "SeasonLeaderboardEntry": {
        "type": "object",
        "properties": {
          "user": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "rank": {
            "description": "Canonical 1-indexed profit-descending rank; may be non-monotonic when the response uses another sort.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "snapshot": {
            "type": "null"
          },
          "topPositions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "LONG",
                    "SHORT"
                  ]
                },
                "size": {
                  "type": "number"
                },
                "entry_price": {
                  "type": "number"
                },
                "unrealized_pnl": {
                  "type": "number"
                },
                "linked_post_id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "uuid",
                      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "symbol",
                "side",
                "size",
                "entry_price",
                "unrealized_pnl",
                "linked_post_id"
              ],
              "additionalProperties": false
            }
          },
          "copiedBy": {
            "$ref": "#/components/schemas/CopiedBy"
          },
          "callerCopyProfileId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "volumeUsd": {
            "type": "number"
          },
          "accountValue": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "totalProfitUsd": {
            "type": "number"
          },
          "pnlSparkline": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "roiPercent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "tradeWinRate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "avgWinPercent": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "avgHoldTimeHours": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "sharpeRatio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wins": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "losses": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "isQualified": {
            "type": "boolean"
          }
        },
        "required": [
          "user",
          "rank",
          "snapshot",
          "topPositions",
          "copiedBy",
          "callerCopyProfileId",
          "volumeUsd",
          "accountValue",
          "totalProfitUsd",
          "roiPercent",
          "tradeWinRate",
          "avgWinPercent",
          "avgHoldTimeHours",
          "sharpeRatio",
          "wins",
          "losses"
        ],
        "additionalProperties": false
      },
      "UserLeaderboardRank": {
        "type": "object",
        "properties": {
          "rank": {
            "description": "Canonical 1-indexed leaderboard standing by profit descending; independent of the requested sort.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "total": {
            "description": "Total number of ranked users.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "offset": {
            "description": "Zero-indexed position under the requested sort; use this value for pagination.",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "rank",
          "total",
          "offset"
        ],
        "additionalProperties": false
      },
      "PusherAuthOutput": {
        "type": "object",
        "properties": {
          "auth": {
            "type": "string"
          },
          "channel_data": {
            "type": "string"
          },
          "shared_secret": {
            "type": "string"
          }
        },
        "required": [
          "auth"
        ],
        "additionalProperties": false
      },
      "PusherAuthBatchOutput": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PusherAuthBatchResult"
            }
          }
        },
        "required": [
          "results"
        ],
        "additionalProperties": false
      },
      "PusherAuthBatchResult": {
        "type": "object",
        "properties": {
          "channelName": {
            "type": "string"
          },
          "auth": {
            "type": "string"
          },
          "channel_data": {
            "type": "string"
          },
          "shared_secret": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "channelName"
        ],
        "additionalProperties": false
      },
      "AppConfig": {
        "type": "object",
        "properties": {
          "pusher": {
            "type": "object",
            "properties": {
              "appId": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "cluster": {
                "type": "string"
              }
            },
            "required": [
              "appId",
              "key",
              "cluster"
            ],
            "additionalProperties": false
          },
          "assetCategories": {
            "$ref": "#/components/schemas/AssetCategories"
          },
          "builderFee": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "arena": {
            "$ref": "#/components/schemas/ArenaConfig"
          },
          "copyTrading": {
            "$ref": "#/components/schemas/CopyTradingConfig"
          },
          "privy": {
            "$ref": "#/components/schemas/PrivyConfig"
          },
          "profile": {
            "$ref": "#/components/schemas/ProfileFieldLimits"
          },
          "analytics": {
            "$ref": "#/components/schemas/AnalyticsConfig"
          }
        },
        "required": [
          "pusher",
          "assetCategories",
          "builderFee",
          "arena",
          "copyTrading",
          "privy",
          "profile",
          "analytics"
        ],
        "additionalProperties": false
      },
      "AssetCategories": {
        "type": "object",
        "properties": {
          "equities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "commodities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "equities",
          "commodities"
        ],
        "additionalProperties": false
      },
      "ArenaConfig": {
        "type": "object",
        "properties": {
          "acceptanceTimeoutMs": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "minAccountValue": {
            "type": "number"
          },
          "competitionMinLeverage": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "sessionBudget": {
            "type": "number"
          },
          "minWager": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "maxWager": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "wagerPresets": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "queueDurations": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "inviteDurations": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": -9007199254740991,
              "maximum": 9007199254740991
            }
          },
          "currentSeason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/SeasonConfig"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "acceptanceTimeoutMs",
          "minAccountValue",
          "competitionMinLeverage",
          "sessionBudget",
          "minWager",
          "maxWager",
          "wagerPresets",
          "queueDurations",
          "inviteDurations",
          "currentSeason"
        ],
        "additionalProperties": false
      },
      "SeasonConfig": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "startUtc": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          },
          "weekCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "weekDurationSeconds": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "tracks": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "pnl",
                "roi",
                "volume"
              ]
            }
          },
          "defaultTrack": {
            "type": "string",
            "enum": [
              "pnl",
              "roi",
              "volume"
            ]
          },
          "resultsVisibleUntilUtc": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
          }
        },
        "required": [
          "id",
          "name",
          "startUtc",
          "weekCount",
          "weekDurationSeconds"
        ],
        "additionalProperties": false
      },
      "CopyTradingConfig": {
        "type": "object",
        "properties": {
          "minDeposit": {
            "type": "number"
          },
          "maxDeposit": {
            "type": "number"
          }
        },
        "required": [
          "minDeposit",
          "maxDeposit"
        ],
        "additionalProperties": false
      },
      "PrivyConfig": {
        "type": "object",
        "properties": {
          "keyQuorumId": {
            "type": "string",
            "minLength": 1
          },
          "arenaPolicyId": {
            "type": "string",
            "minLength": 1
          },
          "copyTradingPolicyId": {
            "type": "string"
          }
        },
        "required": [
          "keyQuorumId",
          "arenaPolicyId",
          "copyTradingPolicyId"
        ],
        "additionalProperties": false
      },
      "ProfileFieldLimits": {
        "type": "object",
        "properties": {
          "usernameMinLength": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "usernameMaxLength": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "displayNameMinLength": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "displayNameMaxLength": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "bioMaxLength": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "usernameMinLength",
          "usernameMaxLength",
          "displayNameMinLength",
          "displayNameMaxLength",
          "bioMaxLength"
        ],
        "additionalProperties": false
      },
      "AnalyticsConfig": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsEvent"
            }
          }
        },
        "required": [
          "events"
        ],
        "additionalProperties": false
      },
      "AnalyticsEvent": {
        "type": "object",
        "properties": {
          "name": {
            "$ref": "#/components/schemas/AnalyticsEventName"
          },
          "category": {
            "$ref": "#/components/schemas/AnalyticsCategory"
          },
          "tier": {
            "$ref": "#/components/schemas/AnalyticsEngagementTier"
          },
          "platforms": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AnalyticsPlatform"
            }
          }
        },
        "required": [
          "name",
          "category",
          "tier",
          "platforms"
        ],
        "additionalProperties": false
      },
      "AnalyticsEventName": {
        "type": "string"
      },
      "AnalyticsCategory": {
        "type": "string"
      },
      "AnalyticsEngagementTier": {
        "type": "string"
      },
      "AnalyticsPlatform": {
        "type": "string"
      },
      "TokenDescription": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "tagline": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "marketCap": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "symbol",
              "description",
              "name",
              "tagline",
              "marketCap"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "AiAssetSummary": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "symbol": {
                "type": "string"
              },
              "summary": {
                "type": "string"
              },
              "citations": {
                "anyOf": [
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/Citation"
                    }
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "generatedAt": {
                "type": "string"
              }
            },
            "required": [
              "symbol",
              "summary",
              "citations",
              "generatedAt"
            ],
            "additionalProperties": false
          },
          {
            "type": "null"
          }
        ]
      },
      "Citation": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          }
        },
        "required": [
          "index",
          "url",
          "title"
        ],
        "additionalProperties": false
      },
      "AssetNamesOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AssetName"
            }
          }
        },
        "required": [
          "hasMore",
          "items"
        ],
        "additionalProperties": false
      },
      "AssetName": {
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "tagline": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "symbol",
          "name",
          "tagline"
        ],
        "additionalProperties": false
      },
      "NotificationPreferencesOutput": {
        "type": "object",
        "properties": {
          "categories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/NotificationCategory"
            }
          },
          "followed_trader_min_notional": {
            "type": "number"
          },
          "position_move_thresholds": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "categories",
          "followed_trader_min_notional",
          "position_move_thresholds"
        ],
        "additionalProperties": false
      },
      "NotificationCategory": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "group": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "key",
          "label",
          "description",
          "group",
          "enabled"
        ],
        "additionalProperties": false
      },
      "PaperExchangeOutput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "response": {}
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "CapitalExchangeOutput": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "response": {}
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "ListTransfersOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "transfers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TransferEntry"
            }
          }
        },
        "required": [
          "hasMore",
          "transfers"
        ],
        "additionalProperties": false
      },
      "TransferEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "observedAt": {
            "type": "string"
          },
          "deltaType": {
            "type": "string"
          },
          "usdc": {
            "type": "number"
          },
          "signedUsdc": {
            "type": "number"
          },
          "fee": {
            "type": "number"
          },
          "hash": {
            "type": "string"
          },
          "counterpartyAddress": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "counterpartyUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copyTargetUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "capitalKind": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "challenge_fee",
                  "funded_payout"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "observedAt",
          "deltaType",
          "usdc",
          "signedUsdc",
          "fee",
          "hash",
          "counterpartyAddress",
          "counterpartyUser",
          "copyTargetUser",
          "capitalKind"
        ],
        "additionalProperties": false
      },
      "CreatePriceAlertOutput": {
        "type": "object",
        "properties": {
          "alert": {
            "$ref": "#/components/schemas/PriceAlert"
          }
        },
        "required": [
          "alert"
        ],
        "additionalProperties": false
      },
      "PriceAlert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "above",
              "below"
            ]
          },
          "target_price": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "triggered"
            ]
          },
          "triggered_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "symbol",
          "direction",
          "target_price",
          "status",
          "triggered_at",
          "created_at"
        ],
        "additionalProperties": false
      },
      "ListPriceAlertsOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PriceAlert"
            }
          }
        },
        "required": [
          "hasMore",
          "alerts"
        ],
        "additionalProperties": false
      },
      "DeletePriceAlertOutput": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "CurrentSeasonOutput": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SeasonConfig"
          },
          {
            "type": "null"
          }
        ]
      },
      "SeasonListOutput": {
        "type": "object",
        "properties": {
          "seasons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SeasonConfig"
            }
          }
        },
        "required": [
          "seasons"
        ],
        "additionalProperties": false
      },
      "CreateChaseOrderOutput": {
        "type": "object",
        "properties": {
          "chaseOrder": {
            "$ref": "#/components/schemas/ChaseOrder"
          }
        },
        "required": [
          "chaseOrder"
        ],
        "additionalProperties": false
      },
      "ChaseOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "symbol": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "LONG",
              "SHORT"
            ]
          },
          "size": {
            "type": "number"
          },
          "priceLimit": {
            "type": "number"
          },
          "currentOrderId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "currentPrice": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "filledSize": {
            "type": "number"
          },
          "reduceOnly": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "ACTIVE",
              "FILLED",
              "CANCELLED",
              "EXPIRED",
              "ERROR"
            ]
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "expiresAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "symbol",
          "side",
          "size",
          "priceLimit",
          "currentOrderId",
          "currentPrice",
          "filledSize",
          "reduceOnly",
          "status",
          "error",
          "expiresAt",
          "createdAt",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "ListChaseOrdersOutput": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "chaseOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChaseOrder"
            }
          }
        },
        "required": [
          "hasMore",
          "chaseOrders"
        ],
        "additionalProperties": false
      },
      "CancelChaseOrderOutput": {
        "type": "object",
        "properties": {
          "chaseOrder": {
            "$ref": "#/components/schemas/ChaseOrder"
          }
        },
        "required": [
          "chaseOrder"
        ],
        "additionalProperties": false
      },
      "PaperCompetitionTraderOutput": {
        "type": "object",
        "properties": {
          "as_of": {
            "description": "Unix timestamp in seconds",
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "refresh_after_ms": {
            "type": "number",
            "const": 1000
          },
          "competition": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "pending",
                  "countdown",
                  "active",
                  "ended",
                  "settled",
                  "cancelled"
                ]
              },
              "trading_starts_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "trading_ends_at": {
                "anyOf": [
                  {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "starting_balance": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              }
            },
            "required": [
              "id",
              "name",
              "status",
              "trading_starts_at",
              "trading_ends_at",
              "starting_balance"
            ],
            "additionalProperties": false
          },
          "trader": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              "username": {
                "type": "string"
              },
              "display_name": {
                "type": "string"
              },
              "avatar_url": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "x_username": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "username",
              "display_name",
              "avatar_url",
              "x_username"
            ],
            "additionalProperties": false
          },
          "balance": {
            "type": "object",
            "properties": {
              "account_value": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "available_balance": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "raw_usd": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "total_margin_used": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "total_position_value": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "realized_pnl": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "unrealized_pnl": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "pnl": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              },
              "pnl_percent": {
                "description": "Base-10 decimal encoded as a string",
                "type": "string",
                "pattern": "^-?\\d+(?:\\.\\d+)?$"
              }
            },
            "required": [
              "account_value",
              "available_balance",
              "raw_usd",
              "total_margin_used",
              "total_position_value",
              "realized_pnl",
              "unrealized_pnl",
              "pnl",
              "pnl_percent"
            ],
            "additionalProperties": false
          },
          "positions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "type": "string"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "LONG",
                    "SHORT"
                  ]
                },
                "size": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "entry_price": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "mark_price": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "position_value": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "unrealized_pnl": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "return_on_equity": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "liquidation_price": {
                  "anyOf": [
                    {
                      "description": "Base-10 decimal encoded as a string",
                      "type": "string",
                      "pattern": "^-?\\d+(?:\\.\\d+)?$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "leverage_type": {
                  "type": "string",
                  "enum": [
                    "cross",
                    "isolated"
                  ]
                },
                "leverage": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "margin_used": {
                  "description": "Base-10 decimal encoded as a string",
                  "type": "string",
                  "pattern": "^-?\\d+(?:\\.\\d+)?$"
                },
                "opened_at": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "symbol",
                "side",
                "size",
                "entry_price",
                "mark_price",
                "position_value",
                "unrealized_pnl",
                "return_on_equity",
                "liquidation_price",
                "leverage_type",
                "leverage",
                "margin_used",
                "opened_at"
              ],
              "additionalProperties": false
            }
          },
          "pnl_chart": {
            "type": "object",
            "properties": {
              "resolution_seconds": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "points": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "ts": {
                      "description": "Unix timestamp in seconds",
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "equity": {
                      "description": "Base-10 decimal encoded as a string",
                      "type": "string",
                      "pattern": "^-?\\d+(?:\\.\\d+)?$"
                    },
                    "pnl": {
                      "description": "Base-10 decimal encoded as a string",
                      "type": "string",
                      "pattern": "^-?\\d+(?:\\.\\d+)?$"
                    },
                    "pnl_percent": {
                      "description": "Base-10 decimal encoded as a string",
                      "type": "string",
                      "pattern": "^-?\\d+(?:\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "ts",
                    "equity",
                    "pnl",
                    "pnl_percent"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "resolution_seconds",
              "points"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "as_of",
          "refresh_after_ms",
          "competition",
          "trader",
          "balance",
          "positions",
          "pnl_chart"
        ],
        "additionalProperties": false
      },
      "ListPostsV2Output": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "posts": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/FeedPost"
                },
                {
                  "$ref": "#/components/schemas/DailyRecapPost"
                }
              ],
              "type": "object",
              "discriminator": {
                "propertyName": "kind",
                "mapping": {
                  "feed_post": "#/components/schemas/FeedPost",
                  "daily_recap": "#/components/schemas/DailyRecapPost"
                }
              }
            }
          }
        },
        "required": [
          "hasMore",
          "posts"
        ],
        "additionalProperties": false
      },
      "FeedPost": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "feed_post"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "$ref": "#/components/schemas/PostType"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_symbol": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostClan"
              },
              {
                "type": "null"
              }
            ]
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "comment_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "copied_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "copiedUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeedUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copied_count": {
            "default": 0,
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copiers": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedUser"
            }
          },
          "user": {
            "$ref": "#/components/schemas/FeedUser"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "is_liked": {
            "type": "boolean"
          },
          "tradingMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TradingMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedMentionedUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "link_preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "recap_content": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecapContent"
              },
              {
                "type": "null"
              }
            ]
          },
          "quoted_post": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeedBasePost"
              },
              {
                "type": "null"
              }
            ]
          },
          "recent_replies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostReplyPreview"
            }
          }
        },
        "required": [
          "kind",
          "id",
          "user_id",
          "type",
          "content",
          "chart_symbol",
          "chart_timestamp",
          "position_id",
          "order_id",
          "network",
          "clan_id",
          "clan",
          "like_count",
          "comment_count",
          "chat_room_id",
          "created_at",
          "updated_at",
          "copied_user_id",
          "copiedUser",
          "copied_count",
          "copiers",
          "user",
          "attachments",
          "is_liked",
          "mentioned_users"
        ],
        "additionalProperties": false
      },
      "FeedUser": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "avatar_url": {
            "type": "string"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "username",
          "display_name",
          "avatar_url",
          "rank",
          "clan_id",
          "account_value_tier",
          "is_official",
          "wallet_address"
        ],
        "additionalProperties": false
      },
      "FeedBasePost": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "type": {
            "$ref": "#/components/schemas/PostType"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_symbol": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "chart_timestamp": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "position_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PostClan"
              },
              {
                "type": "null"
              }
            ]
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "comment_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "copied_user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          },
          "copiedUser": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/FeedUser"
              },
              {
                "type": "null"
              }
            ]
          },
          "copied_count": {
            "default": 0,
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "copiers": {
            "default": [],
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedUser"
            }
          },
          "user": {
            "$ref": "#/components/schemas/FeedUser"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          },
          "is_liked": {
            "type": "boolean"
          },
          "tradingMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TradingMetadata"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeedMentionedUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "link_preview": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LinkPreview"
              },
              {
                "type": "null"
              }
            ]
          },
          "recap_content": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RecapContent"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "user_id",
          "type",
          "content",
          "chart_symbol",
          "chart_timestamp",
          "position_id",
          "order_id",
          "network",
          "clan_id",
          "clan",
          "like_count",
          "comment_count",
          "chat_room_id",
          "created_at",
          "updated_at",
          "copied_user_id",
          "copiedUser",
          "copied_count",
          "copiers",
          "user",
          "attachments",
          "is_liked",
          "mentioned_users"
        ],
        "additionalProperties": false
      },
      "PostReplyPreview": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "user": {
            "$ref": "#/components/schemas/AvatarUser"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_liked": {
            "type": "boolean"
          },
          "attachments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PostAttachment"
            }
          }
        },
        "required": [
          "id",
          "user",
          "content",
          "created_at",
          "like_count",
          "is_liked",
          "attachments"
        ],
        "additionalProperties": false
      },
      "DailyRecapPost": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "const": "daily_recap"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          },
          "author": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "content": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "mentioned_users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicUser"
            }
          },
          "mentioned_clans": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MentionedClan"
            }
          },
          "mentioned_symbols": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "like_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "comment_count": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_liked": {
            "type": "boolean"
          },
          "chat_room_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid",
                "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "kind",
          "id",
          "author",
          "content",
          "mentioned_users",
          "created_at",
          "updated_at",
          "like_count",
          "comment_count",
          "is_liked",
          "chat_room_id"
        ],
        "additionalProperties": false
      },
      "PositionCopiesV2Output": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "copies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CopyEntryV2"
            }
          }
        },
        "required": [
          "total",
          "hasMore",
          "copies"
        ],
        "additionalProperties": false
      },
      "CopyEntryV2": {
        "type": "object",
        "properties": {
          "copier": {
            "$ref": "#/components/schemas/PublicUser"
          },
          "tradingMetadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TradingMetadata"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "copier",
          "tradingMetadata"
        ],
        "additionalProperties": false
      },
      "ReferralUserWithBalance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "telegram_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "username": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "referral_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referral_code_alt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "referred_by_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallet_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "x_username": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "last_online_mobile": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "avatar_url": {
            "type": "string"
          },
          "bio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan": {
            "$ref": "#/components/schemas/UserClan"
          },
          "rank": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "rank_testnet": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "streak": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "elo": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "is_npc": {
            "type": "boolean"
          },
          "last_reset_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "feature_image": {
            "type": "string"
          },
          "completed_onboarding": {
            "type": "boolean"
          },
          "dismissed_trade_note_cta": {
            "type": "boolean"
          },
          "has_deposited": {
            "type": "boolean"
          },
          "invite_code_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "main_signer_quorum_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "builder_fee_override": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "fee_rebate_override_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "clan_fee_rebate_rate": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "network_mode": {
            "type": "string",
            "enum": [
              "hyperliquid_testnet",
              "hyperliquid_mainnet",
              "hyperliquid_paper"
            ]
          },
          "restrict_dms_to_following": {
            "type": "boolean"
          },
          "pnl_share_enabled": {
            "type": "boolean"
          },
          "pnl_share_rate": {
            "type": "number"
          },
          "acknowledged_season_zero": {
            "type": "boolean"
          },
          "notification_preferences": {},
          "fat_finger_settings": {},
          "account_value_tier": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "is_official": {
            "type": "boolean"
          },
          "trader_level_seen": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "max_market_order_slippage": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Wallet"
            }
          },
          "volume": {
            "type": "number"
          },
          "earnings": {
            "type": "number"
          },
          "balance": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "telegram_id",
          "username",
          "display_name",
          "referral_code",
          "referral_code_alt",
          "referred_by_id",
          "wallet_address",
          "created_at",
          "updated_at",
          "x_username",
          "last_online",
          "last_online_mobile",
          "avatar_url",
          "bio",
          "clan_id",
          "rank",
          "rank_testnet",
          "streak",
          "elo",
          "is_npc",
          "last_reset_at",
          "feature_image",
          "completed_onboarding",
          "dismissed_trade_note_cta",
          "has_deposited",
          "invite_code_id",
          "main_signer_quorum_id",
          "builder_fee_override",
          "fee_rebate_rate",
          "fee_rebate_override_rate",
          "clan_fee_rebate_rate",
          "deleted_at",
          "network_mode",
          "restrict_dms_to_following",
          "pnl_share_enabled",
          "pnl_share_rate",
          "acknowledged_season_zero",
          "notification_preferences",
          "fat_finger_settings",
          "account_value_tier",
          "is_official",
          "trader_level_seen",
          "max_market_order_slippage",
          "volume",
          "earnings",
          "balance"
        ],
        "additionalProperties": {}
      },
      "ArenaDuelActivityLogV2Output": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "nextCursor": {
            "type": "string"
          },
          "previousCursor": {
            "type": "string"
          },
          "hasMore": {
            "type": "boolean"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaActivityLogEvent"
            }
          }
        },
        "required": [
          "hasMore",
          "items"
        ],
        "additionalProperties": false
      },
      "TokenSelectorSortOutput": {
        "type": "object",
        "properties": {
          "sortColumn": {
            "type": "string",
            "enum": [
              "price",
              "change24h",
              "volume",
              "openInterest"
            ]
          },
          "sortDirection": {
            "type": "string",
            "enum": [
              "asc",
              "desc"
            ]
          }
        },
        "required": [
          "sortColumn",
          "sortDirection"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}