{
  "openapi": "3.1.0",
  "info": {
    "title": "Pear Protocol API",
    "description": "The Pear Protocol HTTP API. Authentication and account management, and the trading surface for pair positions, orders and analytics, served together on one origin.",
    "version": "3.0.3"
  },
  "servers": [
    {
      "url": "https://pro-gateway.pearprotocol.io",
      "description": "Production (Mainnet)"
    }
  ],
  "paths": {
    "/api-keys": {
      "get": {
        "description": "List all API keys for the authenticated user",
        "operationId": "ApiKeysController_listApiKeys",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListApiKeysResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List API keys",
        "tags": [
          "ApiKeys"
        ]
      },
      "post": {
        "description": "Create a scoped API key; the raw secret is returned only once at creation",
        "operationId": "ApiKeysController_createApiKey",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyInputDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Create API key",
        "tags": [
          "ApiKeys"
        ]
      }
    },
    "/api-keys/{id}": {
      "delete": {
        "description": "Revoke an API key by ID; existing clients using it stop working",
        "operationId": "ApiKeysController_revokeApiKey",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "API key ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Revoke API key",
        "tags": [
          "ApiKeys"
        ]
      }
    },
    "/executions": {
      "get": {
        "description": "Returns all executions with cursor-based pagination.",
        "operationId": "ExecutionsController_listExecutions",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "COMPLETED",
                  "CANCELLED"
                ]
              }
            }
          },
          {
            "required": false,
            "name": "includeSchedule",
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "required": false,
            "name": "includeTriggers",
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListExecutionsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List executions",
        "tags": [
          "Executions"
        ]
      }
    },
    "/executions/{id}": {
      "get": {
        "description": "Returns a single execution by id, including per-order status and error. Covers IDLE and FAILED executions the list status filter cannot reach.",
        "operationId": "ExecutionsController_getExecution",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetExecutionResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get execution",
        "tags": [
          "Executions"
        ]
      }
    },
    "/leverage": {
      "put": {
        "description": "Set leverage and optionally margin mode for a symbol on the exchange",
        "operationId": "LeverageController_setLeverage",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetLeverageDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetLeverageResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Set leverage",
        "tags": [
          "Leverage"
        ]
      }
    },
    "/misc/lighter/create-api-key": {
      "post": {
        "description": "Generates a new API key pair and returns a message for the frontend to sign with the L1 wallet before registration",
        "operationId": "MiscLighterController_createApiKey",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLighterApiKeyParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyWithMessageResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a Lighter API key pair ready for L1 signing",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/change-pub-key": {
      "post": {
        "description": "Submits the L1-signed transaction to Lighter to activate and register the API key for the account",
        "operationId": "MiscLighterController_changePubKey",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitChangePubKeyParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitChangePubKeyResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Register a Lighter API key on-chain",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/prepare-approve-integrator": {
      "post": {
        "description": "Signs the approve-integrator transaction with backend-configured fee parameters and returns a message for the frontend to sign with the L1 wallet",
        "operationId": "MiscLighterController_prepareApproveIntegrator",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareApproveIntegratorParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepareApproveIntegratorResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Prepare an integrator approval transaction for L1 signing",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/submit-approve-integrator": {
      "post": {
        "description": "Submits the L1-signed approve-integrator transaction to Lighter to activate the integrator approval",
        "operationId": "MiscLighterController_submitApproveIntegrator",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitApproveIntegratorParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitApproveIntegratorResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Submit a signed integrator approval transaction",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/create-auth-token": {
      "post": {
        "description": "Creates an auth token for authenticating private API requests to Lighter",
        "operationId": "MiscLighterController_createAuthToken",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAuthTokenParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAuthTokenResultDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a Lighter auth token",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/prepare-fast-withdraw": {
      "post": {
        "description": "Signs a transfer to Lighter's withdrawal pool and returns the message requiring L1 authorization",
        "operationId": "MiscLighterController_prepareFastWithdraw",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PrepareLighterFastWithdrawParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PrepareLighterFastWithdrawResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Prepare a Lighter fast USDC withdrawal",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/submit-fast-withdraw": {
      "post": {
        "description": "Attaches the L1 wallet signature and submits the transfer to Lighter's fast-withdraw processor",
        "operationId": "MiscLighterController_submitFastWithdraw",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitLighterFastWithdrawParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubmitLighterFastWithdrawResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Submit a Lighter fast USDC withdrawal",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/change-account-tier": {
      "post": {
        "description": "Moves the account onto the standard, plus, or premium tier, which Lighter allows once every 24 hours and only while the account holds no open orders or positions",
        "operationId": "MiscLighterController_changeAccountTier",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangeLighterAccountTierParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangeLighterAccountTierResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Change a Lighter account tier",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/uda": {
      "post": {
        "description": "Returns one deposit address per supported chain family, all crediting the wallet's Lighter account",
        "operationId": "MiscLighterController_createUda",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLighterUdaParamsDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateLighterUdaResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Mint Fun.xyz universal deposit addresses for a Lighter wallet",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/misc/lighter/uda/{walletAddress}": {
      "get": {
        "description": "Lists every deposit the bridge has seen for the wallet, with its current bridge status",
        "operationId": "MiscLighterController_listUdaDeposits",
        "parameters": [
          {
            "name": "walletAddress",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListLighterUdaDepositsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Read Fun.xyz bridge deposits for a Lighter wallet",
        "tags": [
          "MiscLighter"
        ]
      }
    },
    "/notifications": {
      "get": {
        "description": "Returns the authenticated user notifications, newest first.",
        "operationId": "NotificationsController_listNotifications",
        "parameters": [
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 100,
              "exclusiveMinimum": 0,
              "default": 100,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List notifications",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/notifications/read": {
      "post": {
        "description": "Marks a single notification (by id) or all notifications up to a timestamp as read.",
        "operationId": "NotificationsController_markNotificationsRead",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkNotificationsReadPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkNotificationsReadResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Mark notifications as read",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/notifications/unread": {
      "post": {
        "description": "Marks a single notification (by id) as unread again.",
        "operationId": "NotificationsController_markNotificationUnread",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarkNotificationUnreadPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarkNotificationUnreadResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Mark a notification as unread",
        "tags": [
          "Notifications"
        ]
      }
    },
    "/fills": {
      "get": {
        "description": "Returns a list of fills for the authenticated user",
        "operationId": "FillsController_listFills",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "orderBy",
            "in": "query",
            "schema": {
              "default": "-timestamp",
              "anyOf": [
                {
                  "type": "string",
                  "const": "timestamp"
                },
                {
                  "type": "string",
                  "const": "-timestamp"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a list of fills",
        "tags": [
          "Fills"
        ]
      }
    },
    "/fills/provisionals-lite": {
      "get": {
        "description": "Returns provisional fills with minimal fields for synchronization",
        "operationId": "FillsController_provisionalsLite",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListProvisionalResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve provisional fills (lite)",
        "tags": [
          "Fills"
        ]
      }
    },
    "/fills/{positionId}": {
      "get": {
        "description": "Returns a list of fills by position id",
        "operationId": "FillsController_positionFills",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPositionFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a list of fills by position id",
        "tags": [
          "Fills"
        ]
      }
    },
    "/funding": {
      "get": {
        "description": "Returns funding rates and next funding times for all instruments",
        "operationId": "FundingController_list",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FundingResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve funding rates",
        "tags": [
          "Funding"
        ]
      }
    },
    "/instruments": {
      "get": {
        "description": "Returns a list of instruments",
        "operationId": "InstrumentsController_listInstruments",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentListResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve a list of instruments",
        "tags": [
          "Instruments"
        ]
      }
    },
    "/instruments/lite": {
      "get": {
        "description": "Returns instruments trimmed to the fields the account syncer needs",
        "operationId": "InstrumentsController_listInstrumentsLite",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentListLiteResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve a lite list of instruments",
        "tags": [
          "Instruments"
        ]
      }
    },
    "/instruments/symbol-to-id-map": {
      "get": {
        "description": "Returns a map of instrument base symbol to instrument ID for a connector",
        "operationId": "InstrumentsController_symbolToIdMap",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InstrumentSymbolToIdMapResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve instrument symbol to ID map",
        "tags": [
          "Instruments"
        ]
      }
    },
    "/ladders": {
      "post": {
        "description": "Create a ladder order as a parent with child trigger rungs.",
        "operationId": "LaddersController_createLadder",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLadderDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateLadderResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a new ladder",
        "tags": [
          "Ladders"
        ]
      },
      "get": {
        "description": "Returns all ladders with cursor-based pagination.",
        "operationId": "LaddersController_listLadders",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LadderListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List ladders",
        "tags": [
          "Ladders"
        ]
      }
    },
    "/ladders/{ladderId}": {
      "get": {
        "description": "Returns a ladder parent with ordered child trigger rungs.",
        "operationId": "LaddersController_getLadder",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "ladderId",
            "required": true,
            "in": "path",
            "description": "Ladder identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LadderResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a ladder",
        "tags": [
          "Ladders"
        ]
      }
    },
    "/ladders/{ladderId}/cancel": {
      "post": {
        "description": "Cancel all active child rungs and mark the ladder as cancelled.",
        "operationId": "LaddersController_cancelLadder",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "ladderId",
            "required": true,
            "in": "path",
            "description": "Ladder identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Ladder cancellation accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelLadderResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel a ladder",
        "tags": [
          "Ladders"
        ]
      }
    },
    "/portfolio": {
      "get": {
        "description": "Returns account-scoped portfolio overview metrics and interval buckets.",
        "operationId": "PortfolioController_overview",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "source",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve portfolio overview",
        "tags": [
          "Portfolio"
        ]
      }
    },
    "/portfolio/analytics": {
      "get": {
        "description": "Returns account-scoped portfolio risk metrics, asset analytics, pair breakdown, and daily series.",
        "operationId": "PortfolioController_analytics",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "interval",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "rollingWindowDays",
            "in": "query",
            "schema": {
              "minimum": -9007199254740991,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "includeSeries",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "false",
                    "true"
                  ]
                }
              ]
            }
          },
          {
            "required": false,
            "name": "source",
            "in": "query",
            "schema": {
              "default": "all",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioAnalyticsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve portfolio analytics",
        "tags": [
          "Portfolio"
        ]
      }
    },
    "/positions": {
      "get": {
        "description": "Returns a list of positions for the authenticated user",
        "operationId": "PositionsController_listPositions",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "OPEN",
                  "CLOSED"
                ]
              }
            }
          },
          {
            "required": false,
            "name": "orderBy",
            "in": "query",
            "schema": {
              "default": "-createdAt",
              "anyOf": [
                {
                  "type": "string",
                  "const": "createdAt"
                },
                {
                  "type": "string",
                  "const": "-createdAt"
                },
                {
                  "type": "string",
                  "const": "updatedAt"
                },
                {
                  "type": "string",
                  "const": "-updatedAt"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListPositionsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a list of positions",
        "tags": [
          "Positions"
        ]
      }
    },
    "/positions/lite": {
      "get": {
        "description": "Returns open positions with minimal fields for synchronization",
        "operationId": "PositionsController_listLitePositions",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListLitePositionsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a lite list of open positions",
        "tags": [
          "Positions"
        ]
      }
    },
    "/positions/closed": {
      "get": {
        "description": "Returns server-composed closed trades, newest close first, with per-leg entry and exit economics. A page may hold fewer than `limit` trades and still return a `nextCursor`: closed positions with no confirmed fills are skipped. Page until `nextCursor` is absent, never until a page comes back short.",
        "operationId": "PositionsController_listClosedTrades",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 200,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "includeSteps",
            "in": "query",
            "schema": {
              "default": false,
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListClosedTradesResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve closed-trade history",
        "tags": [
          "Positions"
        ]
      }
    },
    "/markets/baskets": {
      "get": {
        "description": "Returns selector-ready materialized baskets followed by generated 1-long/1-short pairs.",
        "operationId": "MarketsController_listBaskets",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "tradable",
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "search",
            "in": "query",
            "schema": {
              "maxLength": 128,
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "minimum": 1,
              "maximum": 1000,
              "default": 500,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "offset",
            "in": "query",
            "schema": {
              "minimum": 0,
              "maximum": 9007199254740991,
              "default": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketBasketsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve normalized pair and basket markets",
        "tags": [
          "Markets"
        ]
      }
    },
    "/markets/baskets/positions": {
      "post": {
        "description": "Reports, per requested basket key, how many positions — and how many distinct traders — have ever opened that basket: cumulative best-effort counters bumped at open, never decremented on close. A basket is named by its canonical key — the basketKey /markets/baskets reports, derivable client-side with deriveBasketKey from @pear-protocol/utils. Counts are summed over the connectors in scope that stored the key, and an absent connector puts every venue in scope, so a trader active on two venues counts on each. Positions opened entirely on the exchange are excluded, so a count only reports Pear activity.",
        "operationId": "MarketsController_countBasketPositions",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MarketBasketPositionCountsPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketBasketPositionCountsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Count the positions and traders that ever opened each basket",
        "tags": [
          "Markets"
        ]
      }
    },
    "/markets": {
      "get": {
        "description": "Returns selector-ready markets joined with cached price, funding, and 24h market stats.",
        "operationId": "MarketsController_list",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "scope",
            "in": "query",
            "schema": {
              "default": "tradable",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Retrieve normalized markets",
        "tags": [
          "Markets"
        ]
      }
    },
    "/prices": {
      "get": {
        "description": "Returns a map of mid and mark prices. This API should only be used on page load, prices should be refreshed using the realtime API.",
        "operationId": "PricesController_list",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PricesResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Returns a map of mid and mark prices",
        "tags": [
          "Prices"
        ]
      }
    },
    "/rebalance/manual/{positionId}": {
      "post": {
        "description": "Manually rebalance a position by providing the weightings",
        "operationId": "RebalanceController_manual",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RebalanceManualDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RebalanceManualResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Manually rebalance a position",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/rebalance/auto": {
      "post": {
        "description": "Create a bot that watches a position and auto-rebalances it when drift crosses tolerance.",
        "operationId": "RebalanceController_createConfig",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateAutoRebalanceConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAutoRebalanceResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create an auto-rebalance config",
        "tags": [
          "Rebalance"
        ]
      },
      "get": {
        "description": "List all auto-rebalance configs for the authenticated trade account.",
        "operationId": "RebalanceController_listConfigs",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "PAUSED"
                ]
              }
            }
          },
          {
            "required": false,
            "name": "weightSource",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "INITIAL_WEIGHT",
                  "LIVE_BETA"
                ]
              }
            }
          },
          {
            "required": false,
            "name": "positionId",
            "in": "query",
            "schema": {
              "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": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AutoRebalanceListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List auto-rebalance configs",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/rebalance/auto/{id}": {
      "patch": {
        "description": "Update drift threshold, timeframe, or status (ACTIVE/PAUSED). Reactivating re-validates the watched position, so a config whose pair no longer holds is rejected rather than silently reactivated.",
        "operationId": "RebalanceController_updateConfig",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Auto-rebalance config UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAutoRebalanceConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAutoRebalanceResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update an auto-rebalance config",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/rebalance/auto/{id}/replace": {
      "post": {
        "description": "Replace the mode configuration without leaving the position without persisted automation.",
        "operationId": "RebalanceController_replaceConfig",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Auto-rebalance config UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplaceAutoRebalanceConfigDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateAutoRebalanceResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Atomically replace an auto-rebalance config",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/rebalance/auto/{id}/cancel": {
      "post": {
        "description": "Cancel a config: it stops polling and drops out of lists; rebalance history is retained.",
        "operationId": "RebalanceController_cancelConfig",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Auto-rebalance config UUID",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel an auto-rebalance config",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/rebalance/{positionId}/events": {
      "get": {
        "description": "Paginated log of executed and failed rebalance attempts for a given position.",
        "operationId": "RebalanceController_listEvents",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "description": "Position UUID",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RebalanceEventListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List rebalance events for a position",
        "tags": [
          "Rebalance"
        ]
      }
    },
    "/referrals/create": {
      "post": {
        "description": "Issues or claims one case-sensitive referral code after exact legacy ownership verification",
        "operationId": "ReferralsController_create",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateReferralCodeDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a referral code",
        "tags": [
          "Referrals"
        ]
      }
    },
    "/referrals/bind": {
      "post": {
        "description": "Permanently attributes the authenticated user to the owner of an exact case-sensitive code",
        "operationId": "ReferralsController_bind",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BindReferralCodeDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Bind a referral code",
        "tags": [
          "Referrals"
        ]
      }
    },
    "/referrals/referees": {
      "get": {
        "description": "Returns V3 referred users with optional binding times and genuine Pear execution counts",
        "operationId": "ReferralsController_referees",
        "parameters": [
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 100,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralRefereeListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List referred users",
        "tags": [
          "Referrals"
        ]
      }
    },
    "/referrals/status": {
      "get": {
        "description": "Returns referral codes owned by the authenticated user and their permanent referrer code",
        "operationId": "ReferralsController_status",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReferralStatusResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get referral status",
        "tags": [
          "Referrals"
        ]
      }
    },
    "/saved-baskets": {
      "get": {
        "description": "List all saved baskets for the trade account, most recently updated first",
        "operationId": "SavedBasketsController_listSavedBaskets",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSavedBasketsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List saved baskets",
        "tags": [
          "SavedBaskets"
        ]
      },
      "post": {
        "description": "Save a basket snapshot under a name (unique per trade account, case-insensitive)",
        "operationId": "SavedBasketsController_createSavedBasket",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSavedBasketPayloadDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateSavedBasketResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create saved basket",
        "tags": [
          "SavedBaskets"
        ]
      }
    },
    "/saved-baskets/{id}": {
      "patch": {
        "description": "Rename a saved basket and/or replace its legs",
        "operationId": "SavedBasketsController_updateSavedBasket",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Saved basket ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateSavedBasketPayloadDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateSavedBasketResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update saved basket",
        "tags": [
          "SavedBaskets"
        ]
      },
      "delete": {
        "description": "Delete a saved basket by ID",
        "operationId": "SavedBasketsController_deleteSavedBasket",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Saved basket ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete saved basket",
        "tags": [
          "SavedBaskets"
        ]
      }
    },
    "/schedules": {
      "post": {
        "description": "Create a new schedule to execute against a position over time",
        "operationId": "SchedulesController_createSchedule",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateScheduleDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateScheduleResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a new schedule",
        "tags": [
          "Schedules"
        ]
      },
      "get": {
        "description": "Returns all schedules with cursor-based pagination.",
        "operationId": "SchedulesController_listSchedules",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "COMPLETED",
                  "CANCELLED"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListSchedulesResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List schedules",
        "tags": [
          "Schedules"
        ]
      }
    },
    "/schedules/{scheduleId}/cancel": {
      "patch": {
        "description": "Cancel a schedule",
        "operationId": "SchedulesController_cancelSchedule",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "scheduleId",
            "required": true,
            "in": "path",
            "description": "Schedule identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Schedule cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelScheduleResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel a schedule",
        "tags": [
          "Schedules"
        ]
      }
    },
    "/schedules/cancel-all": {
      "patch": {
        "description": "Cancel all schedules",
        "operationId": "SchedulesController_cancelAllSchedules",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "All schedules cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelAllSchedulesResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel all schedules",
        "tags": [
          "Schedules"
        ]
      }
    },
    "/statistics/volume": {
      "get": {
        "description": "Get PEAR Protocol volume statistics",
        "operationId": "StatisticsController_getVolumeStatistics",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "name": "resolution",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "default": "2026-08-25T16:01:41.615Z",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "clientId",
            "in": "query",
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VolumeStatisticsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Get PEAR Protocol volume statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/statistics/oi": {
      "get": {
        "description": "Get PEAR Protocol open interest statistics",
        "operationId": "StatisticsController_getOiStatistics",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": true,
            "name": "resolution",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "default": "2026-08-25T16:01:41.616Z",
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "clientId",
            "in": "query",
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OiStatisticsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Get PEAR Protocol open interest statistics",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/statistics/leaderboard": {
      "get": {
        "description": "Ranks trade accounts by net PnL, volume, trade count or average position ROI. Returns at most 200 rows. Unrealized PnL is included whenever the window still contains now — an absent endDate, or one that has not yet arrived; only a window that has already closed returns settled realized PnL alone. ROI is the plain average of the account per-position returns, each measured against the size that position opened with, and is omitted for an account whose positions could none of them be measured. Accounts whose owner linked no X account are left off the board; pass includeUnlinkedX=true to rank them too. A trader who linked X and then withheld the handle keeps their row, unnamed. Open to everyone, and the same board for everyone: the linked X handle, name, avatar and user id are returned to any caller, unless their owner has hidden them.",
        "operationId": "StatisticsController_getLeaderboard",
        "parameters": [
          {
            "required": false,
            "name": "clientId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              }
            }
          },
          {
            "required": false,
            "name": "asset",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          {
            "required": false,
            "name": "sortBy",
            "in": "query",
            "schema": {
              "default": "totalNetPnl",
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "startDate",
            "in": "query",
            "schema": {
              "minimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "endDate",
            "in": "query",
            "schema": {
              "minimum": 0,
              "maximum": 9007199254740991,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "includeUnlinkedX",
            "in": "query",
            "schema": {
              "default": false,
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string"
                }
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 200,
              "exclusiveMinimum": 0,
              "default": 200,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Get the PEAR Protocol trader leaderboard",
        "tags": [
          "Statistics"
        ]
      }
    },
    "/statistics/totals": {
      "get": {
        "description": "Get PEAR Protocol all-time statistics totals",
        "operationId": "StatisticsTotalsController_getStatisticsTotals",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "clientId",
            "in": "query",
            "schema": {
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsTotalsResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Get PEAR Protocol all-time statistics totals",
        "tags": [
          "StatisticsTotals"
        ]
      }
    },
    "/sync/fills/since": {
      "post": {
        "description": "Returns effective since value for synchronization",
        "operationId": "SyncFillsController_since",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncFillsSinceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsSinceResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve sync since value",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/reconcile": {
      "post": {
        "description": "Reconcile provisional fills by swapping the fill with a set of sibling fills",
        "operationId": "SyncFillsController_reconcileFills",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReconcileFillsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Reconcile provisional fills",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/reconcile/bulk": {
      "post": {
        "description": "Same payload as POST /sync/fills/reconcile, uploaded as a gzipped JSON file in the \"file\" multipart field. Forwarded to the worker, which decompresses and validates it off the shared core API.",
        "operationId": "SyncFillsController_reconcileFillsBulk",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Gzipped JSON holding the same payload as the non-bulk route"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Reconcile provisional fills from a gzipped JSON file",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/confirm": {
      "post": {
        "description": "Confirm provisional fills by providing fee data",
        "operationId": "SyncFillsController_confirmFills",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmFillsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Confirm provisional fills",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/confirm/bulk": {
      "post": {
        "description": "Same payload as POST /sync/fills/confirm, uploaded as a gzipped JSON file in the \"file\" multipart field. Forwarded to the worker, which decompresses and validates it off the shared core API.",
        "operationId": "SyncFillsController_confirmFillsBulk",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Gzipped JSON holding the same payload as the non-bulk route"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Confirm provisional fills from a gzipped JSON file",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/create": {
      "post": {
        "description": "Find-or-create positions from applicable baskets, then verify exposure against the snapshot",
        "operationId": "SyncFillsController_createFills",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApplicablesRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Apply external fills",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/fills/create/bulk": {
      "post": {
        "description": "Same payload as POST /sync/fills/create, uploaded as a gzipped JSON file in the \"file\" multipart field. Forwarded to the worker, which decompresses and validates it off the shared core API.",
        "operationId": "SyncFillsController_createFillsBulk",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Gzipped JSON holding the same payload as the non-bulk route"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Apply external fills from a gzipped JSON file",
        "tags": [
          "SyncFills"
        ]
      }
    },
    "/sync/funding/since": {
      "post": {
        "description": "Returns effective since value for historical funding-payment synchronization",
        "operationId": "SyncFundingController_fundingSince",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SyncFundingSinceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFundingSinceResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve funding sync since value",
        "tags": [
          "SyncFunding"
        ]
      }
    },
    "/sync/funding/create": {
      "post": {
        "description": "Upsert historical funding payments and advance the funding watermark",
        "operationId": "SyncFundingController_createFundingPayments",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFundingPaymentsRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Apply funding payments",
        "tags": [
          "SyncFunding"
        ]
      }
    },
    "/sync/funding/create/bulk": {
      "post": {
        "description": "Same payload as POST /sync/funding/create, uploaded as a gzipped JSON file in the \"file\" multipart field. Forwarded to the worker, which decompresses and validates it off the shared core API.",
        "operationId": "SyncFundingController_createFundingPaymentsBulk",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "Gzipped JSON holding the same payload as the non-bulk route"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SyncFillsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Apply funding payments from a gzipped JSON file",
        "tags": [
          "SyncFunding"
        ]
      }
    },
    "/tca/executions/{executionId}": {
      "get": {
        "description": "Returns persisted execution-level TCA summary, fill metrics, and benchmark snapshots.",
        "operationId": "TcaController_retrieveExecution",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "executionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TcaExecutionResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve TCA metrics for an execution",
        "tags": [
          "Tca"
        ]
      }
    },
    "/tca/positions/{positionId}": {
      "get": {
        "description": "Returns persisted fill-level TCA metrics and benchmark snapshots for a position.",
        "operationId": "TcaController_retrievePosition",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 100,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "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": "string",
              "examples": [
                "2026-01-15T09:30:00.000Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TcaPositionResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve TCA metrics for a position",
        "tags": [
          "Tca"
        ]
      }
    },
    "/tca/summary": {
      "get": {
        "description": "Returns persisted account-scoped TCA execution summaries and totals for the active trade account. Date filters apply to summary creation time.",
        "operationId": "TcaController_listSummaries",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 100,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "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": "string",
              "examples": [
                "2026-01-15T09:30:00.000Z"
              ]
            }
          },
          {
            "required": false,
            "name": "from",
            "in": "query",
            "schema": {
              "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": "string",
              "examples": [
                "2026-01-15T09:30:00.000Z"
              ]
            }
          },
          {
            "required": false,
            "name": "to",
            "in": "query",
            "schema": {
              "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": "string",
              "examples": [
                "2026-01-15T09:30:00.000Z"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TcaSummaryResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve TCA execution summaries",
        "tags": [
          "Tca"
        ]
      }
    },
    "/trade-accounts": {
      "get": {
        "description": "List all trade accounts for the authenticated user",
        "operationId": "TradeAccountsController_listTradeAccounts",
        "parameters": [
          {
            "required": false,
            "name": "includeDeleted",
            "in": "query",
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeAccountListResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "List all trade accounts",
        "tags": [
          "TradeAccounts"
        ]
      },
      "post": {
        "description": "Add a new trade account with exchange credentials",
        "operationId": "TradeAccountsController_createTradeAccount",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeAccountDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeAccountResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create trade account",
        "tags": [
          "TradeAccounts"
        ]
      }
    },
    "/trade-accounts/{id}": {
      "patch": {
        "description": "Update an existing trade account (alias, credentials, or metadata)",
        "operationId": "TradeAccountsController_updateTradeAccount",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Trade account ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTradeAccountDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeAccountResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Update trade account",
        "tags": [
          "TradeAccounts"
        ]
      },
      "delete": {
        "description": "Soft delete a trade account (can be restored later)",
        "operationId": "TradeAccountsController_deleteTradeAccount",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Trade account ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Delete trade account",
        "tags": [
          "TradeAccounts"
        ]
      }
    },
    "/trade-accounts/{id}/credentials": {
      "post": {
        "description": "Returns decrypted exchange credentials for direct exchange API access from the frontend",
        "operationId": "TradeAccountsController_getCredentials",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Trade account ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeCredentialsResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get exchange credentials",
        "tags": [
          "TradeAccounts"
        ]
      }
    },
    "/trade-accounts/{id}/restore": {
      "post": {
        "description": "Restore a soft-deleted trade account",
        "operationId": "TradeAccountsController_restoreTradeAccount",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "description": "Trade account ID",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Restore trade account",
        "tags": [
          "TradeAccounts"
        ]
      }
    },
    "/trade/open": {
      "post": {
        "description": "Create or update a position using MARKET execution type",
        "operationId": "TradeController_openPosition",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeOpenDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeOpenResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Open a new position",
        "tags": [
          "Trade"
        ]
      }
    },
    "/trade/{positionId}/adjust": {
      "post": {
        "description": "Adjust a position using MARKET execution type",
        "operationId": "TradeController_adjustPosition",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "description": "Position identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeAdjustDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Position adjust order created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeAdjustResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Adjust a position",
        "tags": [
          "Trade"
        ]
      }
    },
    "/trade/{positionId}/close": {
      "post": {
        "description": "Close a position using MARKET or TRIGGER execution type",
        "operationId": "TradeController_closePosition",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "description": "Position identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeCloseDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Position close order created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeCloseResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Close a position",
        "tags": [
          "Trade"
        ]
      }
    },
    "/trade/{positionId}/reverse": {
      "post": {
        "description": "Flip a position to the opposite side using MARKET execution",
        "operationId": "TradeController_reversePosition",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "positionId",
            "required": true,
            "in": "path",
            "description": "Position identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTradeReverseDto"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Position reverse order created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeReverseResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Reverse a position",
        "tags": [
          "Trade"
        ]
      }
    },
    "/trade/close-all": {
      "post": {
        "description": "Close all positions using MARKET execution type",
        "operationId": "TradeController_closeAllPositions",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMarketCloseAll"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "All position close orders created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TradeCloseAllResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Close all positions",
        "tags": [
          "Trade"
        ]
      }
    },
    "/triggers/open": {
      "post": {
        "description": "Use OPEN to create a new position or ADJUST with positionId to increase an existing position",
        "operationId": "TriggersController_createTriggerOpen",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTriggerOpenDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTriggerResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a new trigger",
        "tags": [
          "Triggers"
        ]
      }
    },
    "/triggers/close": {
      "post": {
        "description": "Create a new trigger to close or reduce a position",
        "operationId": "TriggersController_createTriggerClose",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTriggerCloseDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateTriggerResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Create a new trigger",
        "tags": [
          "Triggers"
        ]
      }
    },
    "/triggers": {
      "get": {
        "description": "Returns a list of triggers for the authenticated user",
        "operationId": "TriggersController_listTriggers",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "required": false,
            "name": "limit",
            "in": "query",
            "schema": {
              "maximum": 2000,
              "exclusiveMinimum": 0,
              "default": 20,
              "type": "integer"
            }
          },
          {
            "required": false,
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "status",
            "in": "query",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "COMPLETED",
                  "CANCELLED"
                ]
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ListTriggersResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Retrieve a list of triggers",
        "tags": [
          "Triggers"
        ]
      }
    },
    "/triggers/{triggerId}/cancel": {
      "patch": {
        "description": "Cancel a trigger",
        "operationId": "TriggersController_cancelTrigger",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "name": "triggerId",
            "required": true,
            "in": "path",
            "description": "Trigger identifier",
            "schema": {
              "format": "uuid",
              "type": "string",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Trigger cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelTriggerResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel a trigger",
        "tags": [
          "Triggers"
        ]
      }
    },
    "/triggers/cancel-all": {
      "patch": {
        "description": "Cancel all triggers",
        "operationId": "TriggersController_cancelAllTriggers",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        ],
        "responses": {
          "202": {
            "description": "All triggers cancelled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CancelAllTriggersResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Cancel all triggers",
        "tags": [
          "Triggers"
        ]
      }
    },
    "/oracle/btcdom": {
      "get": {
        "description": "Returns BTC dominance trigger data",
        "operationId": "OracleController_getBtcDom",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OracleTriggerResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Get BTC dominance oracle",
        "tags": [
          "Oracle"
        ]
      }
    },
    "/users/profile": {
      "get": {
        "description": "Returns the current authenticated user profile",
        "operationId": "UsersController_profile",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get current user profile",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/profile/display-name": {
      "patch": {
        "description": "Updates the current authenticated user display name",
        "operationId": "UsersController_updateDisplayName",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDisplayNameDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateUserDisplayNameResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update user display name",
        "tags": [
          "Users"
        ]
      }
    },
    "/users/preferences": {
      "patch": {
        "description": "Updates the current authenticated user preferences",
        "operationId": "UsersController_updatePreferences",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserPreferencesDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UpdateUserPreferencesResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Update user preferences",
        "tags": [
          "Users"
        ]
      }
    },
    "/fee": {
      "get": {
        "description": "Returns the trading fee in canonical bps, the connector fee recipient and the derivation behind them for the authenticated user's selected trade account. The connector is taken from the trade account. Pass clientId to quote the same attribution route a trade would carry. Quoting never redeems a capped discount.",
        "operationId": "FeeController_quoteFee",
        "parameters": [
          {
            "name": "X-Trade-Account-Id",
            "in": "header",
            "description": "UUID of the trade account the request acts on. Must belong to the authenticated user.",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "description": "Attribution route code (client_ids.code)",
            "required": false,
            "name": "clientId",
            "in": "query",
            "schema": {
              "minLength": 1,
              "maxLength": 64,
              "type": "string",
              "examples": [
                "pear-web"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Quote the trading fee and fee recipient",
        "tags": [
          "Fee"
        ]
      }
    },
    "/fee/recipient": {
      "get": {
        "description": "Returns the connector-native fee recipient for the authenticated user's role — the builder address a Hyperliquid user approves, the integrator account index a Lighter user approves. Served from the same source the order path names, so the approval target and the fee recipient on orders cannot diverge. Absent when no recipient is configured, in which case there is nothing to approve.",
        "operationId": "FeeRecipientController_getFeeRecipient",
        "parameters": [
          {
            "required": true,
            "name": "connector",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeeRecipientResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          },
          {
            "bearer": []
          }
        ],
        "summary": "Get the fee recipient to approve for a connector",
        "tags": [
          "FeeRecipient"
        ]
      }
    },
    "/auth/link/emailpass": {
      "post": {
        "description": "Attach email login credentials to an already authenticated user account",
        "operationId": "AuthController_linkEmail",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkEmailRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Link email/password to authenticated account",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/link/wallet": {
      "post": {
        "description": "Attach wallet credentials to an already authenticated user account",
        "operationId": "AuthController_linkWallet",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LinkWalletRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Link wallet to authenticated account",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/link/x/start": {
      "post": {
        "description": "Returns the X authorization URL to send the browser to. The flow finishes at the callback below, which returns the browser to `returnTo`.",
        "operationId": "AuthController_startXLink",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartXLinkRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartXLinkResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Start linking an X account",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/link/x/callback": {
      "get": {
        "description": "Redirect target for X. Always redirects to the frontend with a status, never renders an error. Takes no credential: the `state` parameter is what identifies the account, and it is unguessable, single-use and minted only by an authenticated start.",
        "operationId": "AuthController_completeXLink",
        "parameters": [
          {
            "required": false,
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirects to the frontend link-status page. Never returns a body."
          }
        },
        "summary": "Finish linking an X account",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/link/x/visibility": {
      "patch": {
        "description": "Withholding stops the handle, name and avatar being published to other users while keeping the account linked, so signing in through X still works. Takes the wanted state, not a flip, so a retry lands on the same result. Does not require a linked X account: the setting belongs to the user and outlives the link, so it can be set beforehand and survives a disconnect and reconnect.",
        "operationId": "AuthController_setXVisibility",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetXVisibilityRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SetXVisibilityResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Show or hide the X account on the leaderboard",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/link/x": {
      "delete": {
        "description": "Removes the link and stops the handle being shown to other users",
        "operationId": "AuthController_disconnectX",
        "parameters": [],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Disconnect the linked X account",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/login": {
      "post": {
        "description": "Authenticate using wallet signature (nonce) or email/password",
        "operationId": "AuthController_login",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Authenticate user",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/login/x/start": {
      "post": {
        "description": "Returns the X authorization URL to send the browser to. The flow finishes at the callback below, which returns the browser to `returnTo`.",
        "operationId": "AuthController_startXLogin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StartXLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StartXLoginResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Start signing in with X",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/login/x/callback": {
      "get": {
        "description": "Redirect target for X. Settles the Pear account that has this X account connected, and never creates one. Redirects to the frontend with `x_login`, `x_handoff`, and on success an `x_ticket` fragment to redeem below. Always redirects, never renders an error.",
        "operationId": "AuthController_completeXLogin",
        "parameters": [
          {
            "required": false,
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "required": false,
            "name": "error",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirects to the frontend sign-in page. Never returns a body."
          }
        },
        "summary": "Finish signing in with X",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/login/x/exchange": {
      "post": {
        "description": "Exchanges the single-use ticket from the callback for a session, proving this is the browser that started the sign-in by presenting the verifier behind its challenge. Returns the token pair in the body and sets the session cookies, so bearer and cookie clients are both served.",
        "operationId": "AuthController_exchangeXLogin",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeXLoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Redeem a finished X sign-in",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/nonce": {
      "post": {
        "description": "Generate a nonce that the user must sign with their wallet",
        "operationId": "AuthController_requestNonce",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RequestNonceRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestNonceResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Request nonce for wallet authentication",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/register/emailpass": {
      "post": {
        "description": "Create an unverified user account with email and password. A verification email will be sent.",
        "operationId": "AuthController_register",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmailRegisterRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Register new user with email and password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/session/logout": {
      "post": {
        "description": "Invalidate refresh token and logout the user",
        "operationId": "AuthController_logout",
        "parameters": [],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Logout user",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/session/me": {
      "get": {
        "description": "Returns the current authenticated user info including role and linked wallets",
        "operationId": "AuthController_me",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get current user info",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/api-key/me": {
      "get": {
        "description": "Resolves the user behind an x-api-key header. API-key auth only; never falls back to session.",
        "operationId": "AuthController_apiKeyMe",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiKeyMeResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "api-key": []
          }
        ],
        "summary": "Get current user info via API key",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/session/refresh": {
      "post": {
        "description": "Refresh session using refresh token from HTTP-only cookies, returning the new access token for header-authenticated callers",
        "operationId": "AuthController_refreshSession",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshSessionResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Refresh cookie-based session",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/session/refresh/token": {
      "post": {
        "description": "Refresh bearer token pair using refresh token in request body",
        "operationId": "AuthController_refreshToken",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshTokenResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Refresh bearer tokens",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/resend-verification/link": {
      "post": {
        "description": "Resend the verification email for a pending email claim. Revokes previous tokens and creates a new one.",
        "operationId": "AuthController_resendVerificationForLink",
        "parameters": [],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Resend verification email",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/resend-verification/email": {
      "post": {
        "description": "Resend the verification email for a pending email claim using the email address. Does not require authentication. Always returns 204 to prevent email enumeration.",
        "operationId": "AuthController_resendVerificationForRegister",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendVerificationForRegisterRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Resend verification email by email address",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/verify-email": {
      "post": {
        "description": "Verify an email claim using the token from the verification email. Returns the settled claim so the caller can confirm which email and flow was verified.",
        "operationId": "AuthController_verifyEmail",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyEmailResponseDto_Output"
                }
              }
            }
          }
        },
        "summary": "Verify email claim",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/password/change": {
      "post": {
        "description": "Change password for authenticated user by providing current and new password",
        "operationId": "AuthController_changePassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePasswordRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Change password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/password/forgot": {
      "post": {
        "description": "Request a password reset email. Always returns 204 to prevent email enumeration.",
        "operationId": "AuthController_forgotPassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Request password reset",
        "tags": [
          "Auth"
        ]
      }
    },
    "/auth/password/reset": {
      "post": {
        "description": "Reset password using the password reset token from email",
        "operationId": "AuthController_resetPassword",
        "parameters": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequestDto"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": ""
          }
        },
        "summary": "Reset password",
        "tags": [
          "Auth"
        ]
      }
    },
    "/interaction/{uid}": {
      "get": {
        "description": "Returns the client and scopes the consent screen renders. Readable before login so the UI can show the login step; once login binds an account, only that account may read it.",
        "operationId": "OauthController_interactionDetails",
        "parameters": [
          {
            "name": "uid",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OauthInteractionDetailsResponseDto"
                }
              }
            }
          }
        },
        "summary": "Read a pending authorization interaction",
        "tags": [
          "Oauth"
        ]
      }
    },
    "/interaction/{uid}/login": {
      "post": {
        "description": "Authenticates the user against this interaction and returns where the consent flow continues.",
        "operationId": "OauthController_interactionLogin",
        "parameters": [
          {
            "name": "uid",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OauthInteractionRedirectResponseDto"
                }
              }
            }
          }
        },
        "summary": "Log in to a pending authorization interaction",
        "tags": [
          "Oauth"
        ]
      }
    },
    "/interaction/{uid}/confirm": {
      "post": {
        "description": "Records consent for this interaction and returns the redirect that completes the flow.",
        "operationId": "OauthController_interactionConfirm",
        "parameters": [
          {
            "name": "uid",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OauthInteractionConfirmRequestDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OauthInteractionRedirectResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Grant the requested scopes",
        "tags": [
          "Oauth"
        ]
      }
    },
    "/interaction/{uid}/abort": {
      "post": {
        "description": "Refuses consent for this interaction and returns the redirect that reports the denial.",
        "operationId": "OauthController_interactionAbort",
        "parameters": [
          {
            "name": "uid",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OauthInteractionRedirectResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Deny the requested scopes",
        "tags": [
          "Oauth"
        ]
      }
    },
    "/oauth2/grants": {
      "get": {
        "description": "Returns the active OAuth grants (authorized clients) the authenticated user holds.",
        "operationId": "OauthGrantsController_list",
        "parameters": [],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OauthGrantsResponseDto_Output"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "List OAuth grants",
        "tags": [
          "OauthGrants"
        ]
      }
    },
    "/oauth2/grants/{id}": {
      "delete": {
        "description": "Revokes one OAuth grant owned by the authenticated user.",
        "operationId": "OauthGrantsController_revoke",
        "parameters": [
          {
            "name": "id",
            "required": true,
            "in": "path",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": ""
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Revoke an OAuth grant",
        "tags": [
          "OauthGrants"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      },
      "bearer": {
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "type": "http"
      }
    },
    "schemas": {
      "ListApiKeysResponseDto_Output": {
        "type": "array",
        "description": "All API keys for the user",
        "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)$",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            },
            "label": {
              "type": "string"
            },
            "scope": {
              "description": "API key access scope",
              "type": "string",
              "enum": [
                "read",
                "read_write"
              ]
            },
            "keyPrefix": {
              "type": "string"
            },
            "lastUsedAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "expiresAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "revokedAt": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "createdAt": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "label",
            "scope",
            "keyPrefix",
            "lastUsedAt",
            "expiresAt",
            "revokedAt",
            "createdAt"
          ],
          "additionalProperties": false
        }
      },
      "CreateApiKeyInputDto": {
        "type": "object",
        "properties": {
          "label": {
            "description": "Human label for the key",
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "scope": {
            "default": "read",
            "description": "API key access scope",
            "type": "string",
            "enum": [
              "read",
              "read_write"
            ]
          },
          "expiresAt": {
            "description": "Optional expiry (ISO-8601)",
            "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)))$",
            "examples": [
              "2026-01-15T09:30:00.000Z"
            ]
          }
        },
        "required": [
          "label"
        ],
        "description": "Create a new API key"
      },
      "CreateApiKeyResponseDto_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "label": {
            "type": "string"
          },
          "scope": {
            "type": "string",
            "description": "API key access scope",
            "enum": [
              "read",
              "read_write"
            ]
          },
          "key": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "label",
          "scope",
          "key"
        ],
        "description": "Newly created API key (raw secret shown once)",
        "additionalProperties": false
      },
      "MarketExecution_Output": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/MarketOpenExecution_Output"
          },
          {
            "$ref": "#/components/schemas/MarketAdjustExecution_Output"
          },
          {
            "$ref": "#/components/schemas/MarketCloseExecution_Output"
          },
          {
            "$ref": "#/components/schemas/MarketReverseExecution_Output"
          }
        ],
        "discriminator": {
          "propertyName": "intent",
          "mapping": {
            "OPEN": "#/components/schemas/MarketOpenExecution_Output",
            "ADJUST": "#/components/schemas/MarketAdjustExecution_Output",
            "CLOSE": "#/components/schemas/MarketCloseExecution_Output",
            "REVERSE": "#/components/schemas/MarketReverseExecution_Output"
          }
        }
      },
      "MarketOpenExecution_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "orderType": {
            "type": "string",
            "const": "MARKET"
          },
          "status": {
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "error": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "orders": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "PARTIAL",
                    "FILLED",
                    "CANCELLED",
                    "REJECTED"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "errorCode": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "const": "MARKET"
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledQuantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "id",
                "connector",
                "status",
                "createdAt",
                "updatedAt",
                "type",
                "symbol",
                "side",
                "reduceOnly",
                "quantity",
                "price",
                "filledQuantity"
              ],
              "additionalProperties": false
            }
          },
          "legs": {
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "QUANTITY",
                      "USD"
                    ]
                  },
                  "amount": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "reduceOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "mode",
                  "amount",
                  "reduceOnly"
                ],
                "additionalProperties": false
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "QUANTITY",
                    "USD"
                  ]
                },
                "amount": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "reduceOnly": {
                  "type": "boolean"
                }
              },
              "required": [
                "symbol",
                "side",
                "mode",
                "amount",
                "reduceOnly"
              ],
              "additionalProperties": false
            },
            "minItems": 1
          }
        },
        "required": [
          "id",
          "connector",
          "intent",
          "orderType",
          "status",
          "createdAt",
          "updatedAt",
          "legs"
        ],
        "additionalProperties": false
      },
      "MarketAdjustExecution_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "intent": {
            "type": "string",
            "const": "ADJUST"
          },
          "orderType": {
            "type": "string",
            "const": "MARKET"
          },
          "status": {
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "error": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "orders": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "PARTIAL",
                    "FILLED",
                    "CANCELLED",
                    "REJECTED"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "errorCode": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "const": "MARKET"
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledQuantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "id",
                "connector",
                "status",
                "createdAt",
                "updatedAt",
                "type",
                "symbol",
                "side",
                "reduceOnly",
                "quantity",
                "price",
                "filledQuantity"
              ],
              "additionalProperties": false
            }
          },
          "position": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "exposure": {
                "type": "object",
                "propertyNames": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "additionalProperties": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                }
              }
            },
            "required": [
              "id",
              "exposure"
            ],
            "additionalProperties": false
          },
          "legs": {
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "QUANTITY",
                      "USD"
                    ]
                  },
                  "amount": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "reduceOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "mode",
                  "amount",
                  "reduceOnly"
                ],
                "additionalProperties": false
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "QUANTITY",
                    "USD"
                  ]
                },
                "amount": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "reduceOnly": {
                  "type": "boolean"
                }
              },
              "required": [
                "symbol",
                "side",
                "mode",
                "amount",
                "reduceOnly"
              ],
              "additionalProperties": false
            },
            "minItems": 1
          }
        },
        "required": [
          "id",
          "connector",
          "intent",
          "orderType",
          "status",
          "createdAt",
          "updatedAt",
          "position",
          "legs"
        ],
        "additionalProperties": false
      },
      "MarketCloseExecution_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "orderType": {
            "type": "string",
            "const": "MARKET"
          },
          "status": {
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "error": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "orders": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "PARTIAL",
                    "FILLED",
                    "CANCELLED",
                    "REJECTED"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "errorCode": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "const": "MARKET"
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledQuantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "id",
                "connector",
                "status",
                "createdAt",
                "updatedAt",
                "type",
                "symbol",
                "side",
                "reduceOnly",
                "quantity",
                "price",
                "filledQuantity"
              ],
              "additionalProperties": false
            }
          },
          "position": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "exposure": {
                "type": "object",
                "propertyNames": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "additionalProperties": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                }
              }
            },
            "required": [
              "id",
              "exposure"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "connector",
          "intent",
          "orderType",
          "status",
          "createdAt",
          "updatedAt",
          "position"
        ],
        "additionalProperties": false
      },
      "MarketReverseExecution_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "intent": {
            "type": "string",
            "const": "REVERSE"
          },
          "orderType": {
            "type": "string",
            "const": "MARKET"
          },
          "status": {
            "type": "string",
            "enum": [
              "IDLE",
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "error": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "orders": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PENDING",
                    "PARTIAL",
                    "FILLED",
                    "CANCELLED",
                    "REJECTED"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "errorCode": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "const": "MARKET"
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledQuantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "filledPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "id",
                "connector",
                "status",
                "createdAt",
                "updatedAt",
                "type",
                "symbol",
                "side",
                "reduceOnly",
                "quantity",
                "price",
                "filledQuantity"
              ],
              "additionalProperties": false
            }
          },
          "position": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "exposure": {
                "type": "object",
                "propertyNames": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "additionalProperties": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                }
              }
            },
            "required": [
              "id",
              "exposure"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "connector",
          "intent",
          "orderType",
          "status",
          "createdAt",
          "updatedAt",
          "position"
        ],
        "additionalProperties": false
      },
      "ListExecutionsResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "executions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketExecution_Output"
            }
          }
        },
        "required": [
          "limit",
          "executions"
        ],
        "additionalProperties": false
      },
      "GetExecutionResponseDto_Output": {
        "type": "object",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/MarketExecution_Output"
          }
        },
        "required": [
          "execution"
        ],
        "additionalProperties": false
      },
      "SetLeverageDto": {
        "type": "object",
        "properties": {
          "symbol": {
            "examples": [
              "BTC"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64,
            "pattern": "^[^\\s][^\\s]*$"
          },
          "leverage": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "marginMode": {
            "type": "string",
            "enum": [
              "cross",
              "isolated"
            ]
          }
        },
        "required": [
          "symbol",
          "leverage"
        ]
      },
      "SetLeverageResponseDto": {
        "type": "object",
        "properties": {}
      },
      "CreateLighterApiKeyParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "number"
          },
          "apiKeyIndex": {
            "type": "number"
          }
        },
        "required": [
          "accountIndex",
          "apiKeyIndex"
        ]
      },
      "CreateApiKeyWithMessageResultDto": {
        "type": "object",
        "properties": {
          "privateKey": {
            "type": "string"
          },
          "publicKey": {
            "type": "string"
          },
          "apiKeyIndex": {
            "type": "number"
          },
          "messageToSign": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          }
        },
        "required": [
          "privateKey",
          "publicKey",
          "apiKeyIndex",
          "messageToSign",
          "txInfo"
        ]
      },
      "SubmitChangePubKeyParamsDto": {
        "type": "object",
        "properties": {
          "l1Signature": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          },
          "accountIndex": {
            "type": "number"
          },
          "apiKeyIndex": {
            "type": "number"
          }
        },
        "required": [
          "l1Signature",
          "txInfo",
          "accountIndex",
          "apiKeyIndex"
        ]
      },
      "SubmitChangePubKeyResultDto": {
        "type": "object",
        "properties": {
          "txHash": {
            "type": "string"
          }
        },
        "required": [
          "txHash"
        ]
      },
      "PrepareApproveIntegratorParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "number"
          },
          "apiKeyIndex": {
            "type": "number"
          },
          "apiPrivateKey": {
            "type": "string"
          }
        },
        "required": [
          "accountIndex",
          "apiKeyIndex",
          "apiPrivateKey"
        ]
      },
      "PrepareApproveIntegratorResultDto": {
        "type": "object",
        "properties": {
          "messageToSign": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          }
        },
        "required": [
          "messageToSign",
          "txInfo"
        ]
      },
      "SubmitApproveIntegratorParamsDto": {
        "type": "object",
        "properties": {
          "l1Signature": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          },
          "accountIndex": {
            "type": "number"
          },
          "apiKeyIndex": {
            "type": "number"
          }
        },
        "required": [
          "l1Signature",
          "txInfo",
          "accountIndex",
          "apiKeyIndex"
        ]
      },
      "SubmitApproveIntegratorResultDto": {
        "type": "object",
        "properties": {
          "txHash": {
            "type": "string"
          }
        },
        "required": [
          "txHash"
        ]
      },
      "CreateAuthTokenParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "number"
          },
          "apiKeyIndex": {
            "type": "number"
          },
          "apiPrivateKey": {
            "type": "string"
          },
          "ttlSeconds": {
            "type": "number"
          }
        },
        "required": [
          "accountIndex",
          "apiKeyIndex",
          "apiPrivateKey"
        ]
      },
      "CreateAuthTokenResultDto": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          }
        },
        "required": [
          "token"
        ]
      },
      "PrepareLighterFastWithdrawParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "toAddress": {
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "amount": {
            "type": "integer",
            "minimum": 4000000,
            "maximum": 9007199254740991
          },
          "apiKeyIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 254
          },
          "apiPrivateKey": {
            "type": "string"
          }
        },
        "required": [
          "accountIndex",
          "toAddress",
          "amount",
          "apiKeyIndex",
          "apiPrivateKey"
        ]
      },
      "PrepareLighterFastWithdrawResponseDto_Output": {
        "type": "object",
        "properties": {
          "messageToSign": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          },
          "fee": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "availableBalance": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "messageToSign",
          "txInfo",
          "fee",
          "availableBalance"
        ],
        "additionalProperties": false
      },
      "SubmitLighterFastWithdrawParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "toAddress": {
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "apiKeyIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 254
          },
          "apiPrivateKey": {
            "type": "string"
          },
          "txInfo": {
            "type": "string"
          },
          "l1Signature": {
            "type": "string"
          }
        },
        "required": [
          "accountIndex",
          "toAddress",
          "apiKeyIndex",
          "apiPrivateKey",
          "txInfo",
          "l1Signature"
        ]
      },
      "SubmitLighterFastWithdrawResponseDto_Output": {
        "type": "object",
        "properties": {
          "txHash": {
            "type": "string"
          }
        },
        "required": [
          "txHash"
        ],
        "additionalProperties": false
      },
      "ChangeLighterAccountTierParamsDto": {
        "type": "object",
        "properties": {
          "accountIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "apiKeyIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 254
          },
          "apiPrivateKey": {
            "type": "string"
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "plus",
              "premium"
            ]
          }
        },
        "required": [
          "accountIndex",
          "apiKeyIndex",
          "apiPrivateKey",
          "tier"
        ]
      },
      "ChangeLighterAccountTierResponseDto_Output": {
        "type": "object",
        "properties": {
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "plus",
              "premium"
            ]
          }
        },
        "required": [
          "tier"
        ],
        "additionalProperties": false
      },
      "CreateLighterUdaParamsDto": {
        "type": "object",
        "properties": {
          "walletAddress": {
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[0-9a-fA-F]{40}$"
          },
          "market": {
            "type": "string",
            "enum": [
              "perps",
              "spot"
            ]
          },
          "asset": {
            "type": "string",
            "enum": [
              "USDC",
              "ETH"
            ]
          },
          "accountIndex": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "walletAddress",
          "market",
          "asset"
        ]
      },
      "CreateLighterUdaResponseDto_Output": {
        "type": "object",
        "properties": {
          "uda": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "blocked"
                  }
                },
                "required": [
                  "status"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "const": "served"
                  },
                  "depositAddr": {
                    "type": "string"
                  },
                  "resolved": {
                    "type": "object",
                    "properties": {
                      "toChainId": {
                        "type": "string"
                      },
                      "toTokenAddress": {
                        "type": "string"
                      },
                      "actionType": {
                        "type": "string"
                      },
                      "recipientAddr": {
                        "type": "string"
                      },
                      "userId": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "toChainId",
                      "toTokenAddress",
                      "actionType",
                      "recipientAddr",
                      "userId"
                    ],
                    "additionalProperties": false
                  },
                  "solanaAddr": {
                    "type": "string",
                    "minLength": 1
                  },
                  "tronAddr": {
                    "type": "string",
                    "minLength": 1
                  },
                  "btcAddrSegwit": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "status",
                  "depositAddr",
                  "resolved"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "uda"
        ],
        "additionalProperties": false
      },
      "ListLighterUdaDepositsResponseDto_Output": {
        "type": "object",
        "properties": {
          "transactions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "fromChainId": {
                  "type": "string"
                },
                "fromTokenAddress": {
                  "type": "string"
                },
                "fromAmountBaseUnit": {
                  "type": "string"
                },
                "toChainId": {
                  "type": "string"
                },
                "toTokenAddress": {
                  "type": "string"
                },
                "txHash": {
                  "type": "string"
                },
                "createdTimeMs": {
                  "type": "number"
                },
                "status": {
                  "type": "string"
                },
                "depositAddr": {
                  "type": "string"
                }
              },
              "required": [
                "fromChainId",
                "fromTokenAddress",
                "fromAmountBaseUnit",
                "toChainId",
                "toTokenAddress",
                "status",
                "depositAddr"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "transactions"
        ],
        "additionalProperties": false
      },
      "TakeProfitNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "type": {
            "type": "string",
            "const": "take_profit"
          },
          "triggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "ratio",
              "price",
              "weighted_ratio",
              "notional",
              "upnl",
              "upnl_bps",
              "ratio_trailing",
              "price_trailing",
              "weighted_ratio_trailing",
              "notional_trailing",
              "upnl_trailing",
              "upnl_bps_trailing",
              "funding_rate",
              "prediction_market",
              "btc_dominance"
            ]
          },
          "level": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "maxLength": 255
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "TAKE_PROFIT",
              "STOP_LOSS"
            ]
          }
        },
        "required": [
          "legs",
          "type",
          "triggerId",
          "positionId",
          "connector"
        ],
        "additionalProperties": false
      },
      "StopLossNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "type": {
            "type": "string",
            "const": "stop_loss"
          },
          "triggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "ratio",
              "price",
              "weighted_ratio",
              "notional",
              "upnl",
              "upnl_bps",
              "ratio_trailing",
              "price_trailing",
              "weighted_ratio_trailing",
              "notional_trailing",
              "upnl_trailing",
              "upnl_bps_trailing",
              "funding_rate",
              "prediction_market",
              "btc_dominance"
            ]
          },
          "level": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "maxLength": 255
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "TAKE_PROFIT",
              "STOP_LOSS"
            ]
          }
        },
        "required": [
          "legs",
          "type",
          "triggerId",
          "positionId",
          "connector"
        ],
        "additionalProperties": false
      },
      "TriggerOrderNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "type": {
            "type": "string",
            "const": "trigger_order"
          },
          "triggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "ratio",
              "price",
              "weighted_ratio",
              "notional",
              "upnl",
              "upnl_bps",
              "ratio_trailing",
              "price_trailing",
              "weighted_ratio_trailing",
              "notional_trailing",
              "upnl_trailing",
              "upnl_bps_trailing",
              "funding_rate",
              "prediction_market",
              "btc_dominance"
            ]
          },
          "level": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "legs",
          "type",
          "triggerId",
          "positionId",
          "connector"
        ],
        "additionalProperties": false
      },
      "DefaultTriggerNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "type": {
            "type": "string",
            "const": "default_trigger"
          },
          "triggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "metric": {
            "type": "string",
            "enum": [
              "ratio",
              "price",
              "weighted_ratio",
              "notional",
              "upnl",
              "upnl_bps",
              "ratio_trailing",
              "price_trailing",
              "weighted_ratio_trailing",
              "notional_trailing",
              "upnl_trailing",
              "upnl_bps_trailing",
              "funding_rate",
              "prediction_market",
              "btc_dominance"
            ]
          },
          "level": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "legs",
          "type",
          "triggerId",
          "connector"
        ],
        "additionalProperties": false
      },
      "AttachedTriggerDiscardedNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "type": {
            "type": "string",
            "const": "attached_trigger_discarded"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionKey": {
            "type": "string",
            "minLength": 1
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "discarded": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bracketType": {
                  "type": "string",
                  "enum": [
                    "STOP_LOSS",
                    "TAKE_PROFIT"
                  ]
                },
                "metric": {
                  "type": "string",
                  "enum": [
                    "ratio",
                    "price",
                    "weighted_ratio",
                    "notional",
                    "upnl",
                    "upnl_bps",
                    "ratio_trailing",
                    "price_trailing",
                    "weighted_ratio_trailing",
                    "notional_trailing",
                    "upnl_trailing",
                    "upnl_bps_trailing",
                    "funding_rate",
                    "prediction_market",
                    "btc_dominance"
                  ]
                },
                "level": {
                  "type": "number"
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "TRIGGER_LIMIT",
                    "TRAILING_ALREADY_EXISTS"
                  ]
                }
              },
              "required": [
                "bracketType",
                "metric",
                "reason"
              ],
              "additionalProperties": false
            }
          },
          "activeTriggerLimit": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "legs",
          "type",
          "positionId",
          "positionKey",
          "connector",
          "discarded",
          "activeTriggerLimit"
        ],
        "additionalProperties": false
      },
      "AutoRebalanceExecutedNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "auto_rebalance_executed"
          },
          "configId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionKey": {
            "type": "string",
            "minLength": 1
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "weightSource": {
            "type": "string",
            "enum": [
              "INITIAL_WEIGHT",
              "LIVE_BETA"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "currentWeight": {
                  "type": "number"
                },
                "targetWeight": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "symbol",
                "side",
                "currentWeight",
                "targetWeight"
              ],
              "additionalProperties": false
            }
          },
          "driftPct": {
            "type": "number"
          },
          "notionalUsd": {
            "type": "number"
          }
        },
        "required": [
          "type",
          "configId",
          "positionId",
          "positionKey",
          "connector",
          "weightSource",
          "legs",
          "driftPct",
          "notionalUsd"
        ],
        "additionalProperties": false
      },
      "AutoRebalanceFailedNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "auto_rebalance_failed"
          },
          "configId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionKey": {
            "type": "string",
            "minLength": 1
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "weightSource": {
            "type": "string",
            "enum": [
              "INITIAL_WEIGHT",
              "LIVE_BETA"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "currentWeight": {
                  "type": "number"
                },
                "targetWeight": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "symbol",
                "side",
                "currentWeight",
                "targetWeight"
              ],
              "additionalProperties": false
            }
          },
          "driftPct": {
            "type": "number"
          },
          "reason": {
            "type": "string",
            "maxLength": 255
          }
        },
        "required": [
          "type",
          "configId",
          "positionId",
          "positionKey",
          "connector",
          "weightSource",
          "legs",
          "driftPct",
          "reason"
        ],
        "additionalProperties": false
      },
      "AutoRebalancePausedNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "auto_rebalance_paused"
          },
          "configId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionKey": {
            "type": "string",
            "minLength": 1
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "weightSource": {
            "type": "string",
            "enum": [
              "INITIAL_WEIGHT",
              "LIVE_BETA"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "symbol": {
                  "type": "string",
                  "minLength": 1
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                }
              },
              "required": [
                "id",
                "symbol",
                "side"
              ],
              "additionalProperties": false
            }
          },
          "pausedReason": {
            "type": "string",
            "enum": [
              "POSITION_CHANGED",
              "REPEATED_FAILURES",
              "INVALID_LIVE_BETA_EXPOSURE"
            ]
          }
        },
        "required": [
          "type",
          "configId",
          "positionId",
          "positionKey",
          "connector",
          "weightSource",
          "legs",
          "pausedReason"
        ],
        "additionalProperties": false
      },
      "TriggerCancelledMisScaledNotificationParameters_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "trigger_cancelled_mis_scaled"
          },
          "triggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "positionKey": {
            "type": "string",
            "minLength": 1
          },
          "storedBps": {
            "type": "number"
          },
          "readingMarginPct": {
            "type": "number"
          }
        },
        "required": [
          "type",
          "triggerId",
          "positionKey",
          "storedBps",
          "readingMarginPct"
        ],
        "additionalProperties": false
      },
      "NotificationListResponseDto_Output": {
        "type": "object",
        "properties": {
          "notifications": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "category": {
                  "type": "string",
                  "enum": [
                    "TAKE_PROFIT_HIT",
                    "STOP_LOSS_HIT",
                    "TRIGGER_ORDER_HIT",
                    "TAKE_PROFIT_FAILED",
                    "STOP_LOSS_FAILED",
                    "TRIGGER_ORDER_FAILED",
                    "ATTACHED_TRIGGER_DISCARDED",
                    "AUTO_REBALANCE_EXECUTED",
                    "AUTO_REBALANCE_FAILED",
                    "AUTO_REBALANCE_PAUSED",
                    "TRIGGER_CANCELLED_MIS_SCALED"
                  ]
                },
                "parameters": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/TakeProfitNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/StopLossNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/TriggerOrderNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/DefaultTriggerNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AttachedTriggerDiscardedNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AutoRebalanceExecutedNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AutoRebalanceFailedNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AutoRebalancePausedNotificationParameters_Output"
                    },
                    {
                      "$ref": "#/components/schemas/TriggerCancelledMisScaledNotificationParameters_Output"
                    }
                  ],
                  "discriminator": {
                    "propertyName": "type",
                    "mapping": {
                      "take_profit": "#/components/schemas/TakeProfitNotificationParameters_Output",
                      "stop_loss": "#/components/schemas/StopLossNotificationParameters_Output",
                      "trigger_order": "#/components/schemas/TriggerOrderNotificationParameters_Output",
                      "default_trigger": "#/components/schemas/DefaultTriggerNotificationParameters_Output",
                      "attached_trigger_discarded": "#/components/schemas/AttachedTriggerDiscardedNotificationParameters_Output",
                      "auto_rebalance_executed": "#/components/schemas/AutoRebalanceExecutedNotificationParameters_Output",
                      "auto_rebalance_failed": "#/components/schemas/AutoRebalanceFailedNotificationParameters_Output",
                      "auto_rebalance_paused": "#/components/schemas/AutoRebalancePausedNotificationParameters_Output",
                      "trigger_cancelled_mis_scaled": "#/components/schemas/TriggerCancelledMisScaledNotificationParameters_Output"
                    }
                  }
                },
                "isRead": {
                  "type": "boolean"
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "category",
                "parameters",
                "isRead",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "notifications"
        ],
        "additionalProperties": false
      },
      "MarkNotificationsReadById": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "MarkNotificationsReadByTimestamp": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "timestamp"
        ],
        "additionalProperties": false
      },
      "MarkNotificationsReadPayloadDto": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/MarkNotificationsReadById"
          },
          {
            "$ref": "#/components/schemas/MarkNotificationsReadByTimestamp"
          }
        ]
      },
      "MarkNotificationsReadResponseDto_Output": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "updated"
        ],
        "additionalProperties": false
      },
      "MarkNotificationUnreadPayloadDto": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "MarkNotificationUnreadResponseDto_Output": {
        "type": "object",
        "properties": {
          "updated": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "updated"
        ],
        "additionalProperties": false
      },
      "ListFillsResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "fills"
        ],
        "additionalProperties": false
      },
      "ListProvisionalResponseDto_Output": {
        "type": "object",
        "properties": {
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "cloid": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "const": "PROVISIONAL"
                }
              },
              "required": [
                "id",
                "positionId",
                "symbol",
                "status"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "fills"
        ],
        "additionalProperties": false
      },
      "ListPositionFillsResponseDto_Output": {
        "type": "object",
        "properties": {
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "fills"
        ],
        "additionalProperties": false
      },
      "FundingResponseDto_Output": {
        "type": "object",
        "properties": {
          "funding": {
            "type": "object",
            "propertyNames": {
              "examples": [
                "BTC"
              ],
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^\\s][^\\s]*$"
            },
            "additionalProperties": {
              "type": "object",
              "properties": {
                "r": {
                  "type": "string"
                },
                "nft": {
                  "type": "number"
                }
              },
              "required": [
                "r",
                "nft"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "funding"
        ],
        "additionalProperties": false
      },
      "InstrumentListResponseDto_Output": {
        "type": "object",
        "properties": {
          "instruments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "base": {
                  "type": "string"
                },
                "quote": {
                  "type": "string"
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "spot",
                    "perp",
                    "hip3"
                  ]
                },
                "leverage": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 9007199254740991
                },
                "marginMode": {
                  "type": "string",
                  "enum": [
                    "isolated",
                    "cross",
                    "any"
                  ]
                },
                "precision": {
                  "type": "object",
                  "properties": {
                    "quantity": {
                      "type": "object",
                      "properties": {
                        "decimals": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "step": {
                          "type": "number"
                        },
                        "contractSize": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "decimals",
                        "step",
                        "contractSize"
                      ],
                      "additionalProperties": false
                    },
                    "price": {
                      "type": "object",
                      "properties": {
                        "decimals": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "tick": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "sigFigs": {
                          "anyOf": [
                            {
                              "type": "integer",
                              "minimum": -9007199254740991,
                              "maximum": 9007199254740991
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "decimals"
                      ],
                      "additionalProperties": false
                    },
                    "notional": {
                      "type": "object",
                      "properties": {
                        "min": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "max": {
                          "anyOf": [
                            {
                              "type": "number"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "quantity",
                    "price"
                  ],
                  "additionalProperties": false
                },
                "tradeability": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "tradable",
                        "reduce_only",
                        "not_tradable"
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "base",
                "quote",
                "connector",
                "type",
                "leverage",
                "marginMode",
                "precision",
                "tradeability"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "instruments"
        ],
        "additionalProperties": false
      },
      "InstrumentListLiteResponseDto_Output": {
        "type": "object",
        "properties": {
          "instruments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "base": {
                  "type": "string"
                },
                "marginMode": {
                  "type": "string",
                  "enum": [
                    "isolated",
                    "cross",
                    "any"
                  ]
                },
                "precision": {
                  "type": "object",
                  "properties": {
                    "quantity": {
                      "type": "object",
                      "properties": {
                        "contractSize": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "contractSize"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "base",
                "marginMode",
                "precision"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "instruments"
        ],
        "additionalProperties": false
      },
      "InstrumentSymbolToIdMapResponseDto_Output": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "examples": [
                "BTC"
              ],
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^\\s][^\\s]*$"
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "CreateLadderMarketOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/LadderRatioOpen"
              },
              {
                "$ref": "#/components/schemas/LadderPriceOpen"
              },
              {
                "$ref": "#/components/schemas/LadderWeightedRatioOpen"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/LadderRatioOpen",
                "price": "#/components/schemas/LadderPriceOpen",
                "weighted_ratio": "#/components/schemas/LadderWeightedRatioOpen"
              }
            }
          },
          "config": {
            "type": "object",
            "properties": {
              "thresholdStart": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "thresholdEnd": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "levels": {
                "type": "integer",
                "minimum": 2,
                "maximum": 50
              },
              "weighting": {
                "default": "EQUAL",
                "type": "string",
                "const": "EQUAL"
              }
            },
            "required": [
              "thresholdStart",
              "thresholdEnd",
              "levels"
            ]
          },
          "attachTriggers": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic"
                },
                {
                  "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing"
                }
              ]
            }
          },
          "payload": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "legs": {
                "description": "At least one leg is required. Each leg must name a distinct symbol.",
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "QUANTITY",
                          "USD"
                        ]
                      },
                      "amount": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "mode",
                      "amount"
                    ]
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "QUANTITY",
                        "USD"
                      ]
                    },
                    "amount": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "mode",
                    "amount"
                  ]
                },
                "minItems": 1
              }
            },
            "required": [
              "type",
              "legs"
            ]
          }
        },
        "required": [
          "type",
          "intent",
          "condition",
          "config",
          "payload"
        ],
        "additionalProperties": false
      },
      "LadderRatioOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b",
              "track"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "LadderPriceOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              }
            },
            "required": [
              "priceSource",
              "symbol",
              "track"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "LadderWeightedRatioOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "description": "At least two legs are required. Each leg must name a distinct symbol. Leg weights must sum to exactly 1.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ]
                }
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              }
            },
            "required": [
              "priceSource",
              "basket",
              "track"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "AttachTriggerMarketCloseStatic": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "TAKE_PROFIT",
              "STOP_LOSS"
            ]
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotionalCloseStatic"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseStatic"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseStatic"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "notional": "#/components/schemas/NotionalCloseStatic",
                "upnl": "#/components/schemas/UpnlCloseStatic",
                "upnl_bps": "#/components/schemas/UpnlBpsCloseStatic"
              }
            }
          }
        },
        "required": [
          "intent",
          "type",
          "bracketType",
          "condition"
        ]
      },
      "NotionalCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "UpnlCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "UpnlBpsCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "AttachTriggerMarketCloseTrailing": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotionalCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseTrailing"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "notional_trailing": "#/components/schemas/NotionalCloseTrailing",
                "upnl_trailing": "#/components/schemas/UpnlCloseTrailing",
                "upnl_bps_trailing": "#/components/schemas/UpnlBpsCloseTrailing"
              }
            }
          },
          "trailing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "RELATIVE_BPS",
                  "ABSOLUTE_POINTS"
                ]
              },
              "deltaValue": {
                "type": "number"
              },
              "activationValue": {
                "type": "number"
              }
            },
            "required": [
              "mode",
              "deltaValue"
            ]
          }
        },
        "required": [
          "intent",
          "type",
          "condition",
          "trailing"
        ]
      },
      "NotionalCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "UpnlCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "UpnlBpsCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "CreateLadderDto": {
        "$ref": "#/components/schemas/CreateLadderMarketOpen"
      },
      "AttachTriggerMarketCloseStatic_Output": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "TAKE_PROFIT",
              "STOP_LOSS"
            ]
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotionalCloseStatic_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseStatic_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseStatic_Output"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "notional": "#/components/schemas/NotionalCloseStatic_Output",
                "upnl": "#/components/schemas/UpnlCloseStatic_Output",
                "upnl_bps": "#/components/schemas/UpnlBpsCloseStatic_Output"
              }
            }
          }
        },
        "required": [
          "intent",
          "type",
          "bracketType",
          "condition"
        ],
        "additionalProperties": false
      },
      "NotionalCloseStatic_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlCloseStatic_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlBpsCloseStatic_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "AttachTriggerMarketCloseTrailing_Output": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NotionalCloseTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseTrailing_Output"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "notional_trailing": "#/components/schemas/NotionalCloseTrailing_Output",
                "upnl_trailing": "#/components/schemas/UpnlCloseTrailing_Output",
                "upnl_bps_trailing": "#/components/schemas/UpnlBpsCloseTrailing_Output"
              }
            }
          },
          "trailing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "RELATIVE_BPS",
                  "ABSOLUTE_POINTS"
                ]
              },
              "deltaValue": {
                "type": "number"
              },
              "activationValue": {
                "type": "number"
              }
            },
            "required": [
              "mode",
              "deltaValue"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "intent",
          "type",
          "condition",
          "trailing"
        ],
        "additionalProperties": false
      },
      "NotionalCloseTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlCloseTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlBpsCloseTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "TriggerMarket_Output": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/TriggerMarketOpen_Output"
          },
          {
            "$ref": "#/components/schemas/TriggerMarketAdjust_Output"
          },
          {
            "$ref": "#/components/schemas/TriggerMarketClose_Output"
          }
        ],
        "discriminator": {
          "propertyName": "intent",
          "mapping": {
            "OPEN": "#/components/schemas/TriggerMarketOpen_Output",
            "ADJUST": "#/components/schemas/TriggerMarketAdjust_Output",
            "CLOSE": "#/components/schemas/TriggerMarketClose_Output"
          }
        }
      },
      "TriggerMarketOpen_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "tradeAccountId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "TRIGGERED",
              "CANCELLED"
            ]
          },
          "ladderId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "ladderIndex": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "parentTriggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "triggeredAt": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "cancelledReason": {
            "type": "string",
            "enum": [
              "POSITION_CLOSED",
              "USER",
              "SYSTEM",
              "POSITION_NETTED",
              "POSITION_REVERSED"
            ]
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Ratio_Output"
              },
              {
                "$ref": "#/components/schemas/Price_Output"
              },
              {
                "$ref": "#/components/schemas/WeightedRatio_Output"
              },
              {
                "$ref": "#/components/schemas/FundingRate_Output"
              },
              {
                "$ref": "#/components/schemas/PredictionMarket_Output"
              },
              {
                "$ref": "#/components/schemas/BtcDominance_Output"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/Ratio_Output",
                "price": "#/components/schemas/Price_Output",
                "weighted_ratio": "#/components/schemas/WeightedRatio_Output",
                "funding_rate": "#/components/schemas/FundingRate_Output",
                "prediction_market": "#/components/schemas/PredictionMarket_Output",
                "btc_dominance": "#/components/schemas/BtcDominance_Output"
              }
            }
          },
          "context": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "legs": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "QUANTITY",
                          "USD"
                        ]
                      },
                      "amount": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "mode",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "QUANTITY",
                        "USD"
                      ]
                    },
                    "amount": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "mode",
                    "amount"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              },
              "attachedTriggers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "STATIC",
                        "TRAILING"
                      ]
                    },
                    "bracketType": {
                      "type": "string",
                      "enum": [
                        "TAKE_PROFIT",
                        "STOP_LOSS"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "bracketType"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "type",
              "legs",
              "attachedTriggers"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "tradeAccountId",
          "connector",
          "status",
          "bracketType",
          "createdAt",
          "updatedAt",
          "intent",
          "type",
          "condition",
          "context"
        ],
        "additionalProperties": false
      },
      "Ratio_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "Price_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "symbol",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "WeightedRatio_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ],
                  "additionalProperties": false
                }
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "basket",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "FundingRate_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "funding_rate"
          },
          "data": {
            "type": "object",
            "properties": {
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "connector",
              "symbol",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "PredictionMarket_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "prediction_market"
          },
          "data": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "kalshi",
                  "polymarket"
                ]
              },
              "marketKey": {
                "type": "string",
                "minLength": 1
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "source",
              "marketKey",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "BtcDominance_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "btc_dominance"
          },
          "data": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "const": "coingecko"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "source",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "TriggerMarketAdjust_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "tradeAccountId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "TRIGGERED",
              "CANCELLED"
            ]
          },
          "ladderId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "ladderIndex": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "parentTriggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "triggeredAt": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "cancelledReason": {
            "type": "string",
            "enum": [
              "POSITION_CLOSED",
              "USER",
              "SYSTEM",
              "POSITION_NETTED",
              "POSITION_REVERSED"
            ]
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "const": "ADJUST"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Ratio_Output"
              },
              {
                "$ref": "#/components/schemas/Price_Output"
              },
              {
                "$ref": "#/components/schemas/WeightedRatio_Output"
              },
              {
                "$ref": "#/components/schemas/Notional_Output"
              },
              {
                "$ref": "#/components/schemas/Upnl_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlBps_Output"
              },
              {
                "$ref": "#/components/schemas/FundingRate_Output"
              },
              {
                "$ref": "#/components/schemas/PredictionMarket_Output"
              },
              {
                "$ref": "#/components/schemas/BtcDominance_Output"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/Ratio_Output",
                "price": "#/components/schemas/Price_Output",
                "weighted_ratio": "#/components/schemas/WeightedRatio_Output",
                "notional": "#/components/schemas/Notional_Output",
                "upnl": "#/components/schemas/Upnl_Output",
                "upnl_bps": "#/components/schemas/UpnlBps_Output",
                "funding_rate": "#/components/schemas/FundingRate_Output",
                "prediction_market": "#/components/schemas/PredictionMarket_Output",
                "btc_dominance": "#/components/schemas/BtcDominance_Output"
              }
            }
          },
          "context": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "position": {
                "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "initialExposure": {
                    "type": "object",
                    "propertyNames": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "additionalProperties": {
                      "examples": [
                        "+42.5"
                      ],
                      "type": "string",
                      "pattern": "^[+-]\\d+(\\.\\d+)?$"
                    }
                  }
                },
                "required": [
                  "id",
                  "initialExposure"
                ],
                "additionalProperties": false
              },
              "legs": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "QUANTITY",
                          "USD"
                        ]
                      },
                      "amount": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "mode",
                      "amount",
                      "reduceOnly"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "QUANTITY",
                        "USD"
                      ]
                    },
                    "amount": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    },
                    "reduceOnly": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "mode",
                    "amount",
                    "reduceOnly"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              }
            },
            "required": [
              "type",
              "position",
              "legs"
            ],
            "additionalProperties": false
          },
          "trailing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "RELATIVE_BPS",
                  "ABSOLUTE_POINTS"
                ]
              },
              "deltaValue": {
                "type": "number"
              },
              "activationValue": {
                "type": "number"
              },
              "bestMetricSeen": {
                "type": "number"
              },
              "currentStopValue": {
                "type": "number"
              },
              "stopBreachedAt": {
                "type": "number"
              }
            },
            "required": [
              "mode",
              "deltaValue"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "tradeAccountId",
          "connector",
          "status",
          "bracketType",
          "createdAt",
          "updatedAt",
          "intent",
          "type",
          "condition",
          "context"
        ],
        "additionalProperties": false
      },
      "Notional_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "Upnl_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlBps_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "priceSource",
              "track",
              "threshold"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "TriggerMarketClose_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "tradeAccountId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "TRIGGERED",
              "CANCELLED"
            ]
          },
          "ladderId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "ladderIndex": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "parentTriggerId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "triggeredAt": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "cancelledReason": {
            "type": "string",
            "enum": [
              "POSITION_CLOSED",
              "USER",
              "SYSTEM",
              "POSITION_NETTED",
              "POSITION_REVERSED"
            ]
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/Ratio_Output"
              },
              {
                "$ref": "#/components/schemas/Price_Output"
              },
              {
                "$ref": "#/components/schemas/WeightedRatio_Output"
              },
              {
                "$ref": "#/components/schemas/Notional_Output"
              },
              {
                "$ref": "#/components/schemas/Upnl_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlBps_Output"
              },
              {
                "$ref": "#/components/schemas/RatioTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/PriceTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/WeightedRatioTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/NotionalTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsTrailing_Output"
              },
              {
                "$ref": "#/components/schemas/FundingRate_Output"
              },
              {
                "$ref": "#/components/schemas/PredictionMarket_Output"
              },
              {
                "$ref": "#/components/schemas/BtcDominance_Output"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/Ratio_Output",
                "price": "#/components/schemas/Price_Output",
                "weighted_ratio": "#/components/schemas/WeightedRatio_Output",
                "notional": "#/components/schemas/Notional_Output",
                "upnl": "#/components/schemas/Upnl_Output",
                "upnl_bps": "#/components/schemas/UpnlBps_Output",
                "ratio_trailing": "#/components/schemas/RatioTrailing_Output",
                "price_trailing": "#/components/schemas/PriceTrailing_Output",
                "weighted_ratio_trailing": "#/components/schemas/WeightedRatioTrailing_Output",
                "notional_trailing": "#/components/schemas/NotionalTrailing_Output",
                "upnl_trailing": "#/components/schemas/UpnlTrailing_Output",
                "upnl_bps_trailing": "#/components/schemas/UpnlBpsTrailing_Output",
                "funding_rate": "#/components/schemas/FundingRate_Output",
                "prediction_market": "#/components/schemas/PredictionMarket_Output",
                "btc_dominance": "#/components/schemas/BtcDominance_Output"
              }
            }
          },
          "context": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "position": {
                "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "initialExposure": {
                    "type": "object",
                    "propertyNames": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "additionalProperties": {
                      "examples": [
                        "+42.5"
                      ],
                      "type": "string",
                      "pattern": "^[+-]\\d+(\\.\\d+)?$"
                    }
                  }
                },
                "required": [
                  "id",
                  "initialExposure"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "type",
              "position"
            ],
            "additionalProperties": false
          },
          "trailing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "RELATIVE_BPS",
                  "ABSOLUTE_POINTS"
                ]
              },
              "deltaValue": {
                "type": "number"
              },
              "activationValue": {
                "type": "number"
              },
              "bestMetricSeen": {
                "type": "number"
              },
              "currentStopValue": {
                "type": "number"
              },
              "stopBreachedAt": {
                "type": "number"
              }
            },
            "required": [
              "mode",
              "deltaValue"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "tradeAccountId",
          "connector",
          "status",
          "bracketType",
          "createdAt",
          "updatedAt",
          "intent",
          "type",
          "condition",
          "context"
        ],
        "additionalProperties": false
      },
      "RatioTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "PriceTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              }
            },
            "required": [
              "priceSource",
              "symbol"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "WeightedRatioTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "priceSource",
              "basket"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "NotionalTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "notional_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "UpnlBpsTrailing_Output": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "upnl_bps_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              }
            },
            "required": [
              "priceSource"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "type",
          "data"
        ],
        "additionalProperties": false
      },
      "CreateLadderResponseDto_Output": {
        "type": "object",
        "properties": {
          "ladder": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "positionKey": {
                "type": "string"
              },
              "config": {
                "type": "object",
                "properties": {
                  "thresholdStart": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "thresholdEnd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "levels": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 50
                  },
                  "weighting": {
                    "default": "EQUAL",
                    "type": "string",
                    "const": "EQUAL"
                  }
                },
                "required": [
                  "thresholdStart",
                  "thresholdEnd",
                  "levels",
                  "weighting"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "COMPLETED",
                  "CANCELLED"
                ]
              },
              "attachTriggers": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing_Output"
                    }
                  ]
                }
              },
              "triggers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TriggerMarket_Output"
                }
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "connector",
              "positionKey",
              "config",
              "status",
              "triggers",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ladder"
        ],
        "additionalProperties": false
      },
      "LadderListResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "ladders": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "positionKey": {
                  "type": "string"
                },
                "config": {
                  "type": "object",
                  "properties": {
                    "thresholdStart": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "thresholdEnd": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "levels": {
                      "type": "integer",
                      "minimum": 2,
                      "maximum": 50
                    },
                    "weighting": {
                      "default": "EQUAL",
                      "type": "string",
                      "const": "EQUAL"
                    }
                  },
                  "required": [
                    "thresholdStart",
                    "thresholdEnd",
                    "levels",
                    "weighting"
                  ],
                  "additionalProperties": false
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ACTIVE",
                    "COMPLETED",
                    "CANCELLED"
                  ]
                },
                "attachTriggers": {
                  "maxItems": 5,
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic_Output"
                      },
                      {
                        "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing_Output"
                      }
                    ]
                  }
                },
                "triggers": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TriggerMarket_Output"
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "connector",
                "positionKey",
                "config",
                "status",
                "triggers",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "ladders"
        ],
        "additionalProperties": false
      },
      "LadderResponseDto_Output": {
        "type": "object",
        "properties": {
          "ladder": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "positionKey": {
                "type": "string"
              },
              "config": {
                "type": "object",
                "properties": {
                  "thresholdStart": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "thresholdEnd": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "levels": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 50
                  },
                  "weighting": {
                    "default": "EQUAL",
                    "type": "string",
                    "const": "EQUAL"
                  }
                },
                "required": [
                  "thresholdStart",
                  "thresholdEnd",
                  "levels",
                  "weighting"
                ],
                "additionalProperties": false
              },
              "status": {
                "type": "string",
                "enum": [
                  "ACTIVE",
                  "COMPLETED",
                  "CANCELLED"
                ]
              },
              "attachTriggers": {
                "maxItems": 5,
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic_Output"
                    },
                    {
                      "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing_Output"
                    }
                  ]
                }
              },
              "triggers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TriggerMarket_Output"
                }
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "connector",
              "positionKey",
              "config",
              "status",
              "triggers",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ladder"
        ],
        "additionalProperties": false
      },
      "CancelLadderResponseDto_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "PortfolioResponseDto_Output": {
        "type": "object",
        "properties": {
          "intervals": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "oneDay": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "periodStart": {
                          "type": "string"
                        },
                        "periodEnd": {
                          "type": "string"
                        },
                        "volume": {
                          "type": "number"
                        },
                        "openInterest": {
                          "type": "number"
                        },
                        "winningTradesCount": {
                          "type": "number"
                        },
                        "winningTradesUsd": {
                          "type": "number"
                        },
                        "losingTradesCount": {
                          "type": "number"
                        },
                        "losingTradesUsd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "volume",
                        "openInterest",
                        "winningTradesCount",
                        "winningTradesUsd",
                        "losingTradesCount",
                        "losingTradesUsd"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "oneWeek": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "periodStart": {
                          "type": "string"
                        },
                        "periodEnd": {
                          "type": "string"
                        },
                        "volume": {
                          "type": "number"
                        },
                        "openInterest": {
                          "type": "number"
                        },
                        "winningTradesCount": {
                          "type": "number"
                        },
                        "winningTradesUsd": {
                          "type": "number"
                        },
                        "losingTradesCount": {
                          "type": "number"
                        },
                        "losingTradesUsd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "volume",
                        "openInterest",
                        "winningTradesCount",
                        "winningTradesUsd",
                        "losingTradesCount",
                        "losingTradesUsd"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "oneMonth": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "periodStart": {
                          "type": "string"
                        },
                        "periodEnd": {
                          "type": "string"
                        },
                        "volume": {
                          "type": "number"
                        },
                        "openInterest": {
                          "type": "number"
                        },
                        "winningTradesCount": {
                          "type": "number"
                        },
                        "winningTradesUsd": {
                          "type": "number"
                        },
                        "losingTradesCount": {
                          "type": "number"
                        },
                        "losingTradesUsd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "volume",
                        "openInterest",
                        "winningTradesCount",
                        "winningTradesUsd",
                        "losingTradesCount",
                        "losingTradesUsd"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "oneYear": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "periodStart": {
                          "type": "string"
                        },
                        "periodEnd": {
                          "type": "string"
                        },
                        "volume": {
                          "type": "number"
                        },
                        "openInterest": {
                          "type": "number"
                        },
                        "winningTradesCount": {
                          "type": "number"
                        },
                        "winningTradesUsd": {
                          "type": "number"
                        },
                        "losingTradesCount": {
                          "type": "number"
                        },
                        "losingTradesUsd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "volume",
                        "openInterest",
                        "winningTradesCount",
                        "winningTradesUsd",
                        "losingTradesCount",
                        "losingTradesUsd"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "all": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "periodStart": {
                          "type": "string"
                        },
                        "periodEnd": {
                          "type": "string"
                        },
                        "volume": {
                          "type": "number"
                        },
                        "openInterest": {
                          "type": "number"
                        },
                        "winningTradesCount": {
                          "type": "number"
                        },
                        "winningTradesUsd": {
                          "type": "number"
                        },
                        "losingTradesCount": {
                          "type": "number"
                        },
                        "losingTradesUsd": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "periodStart",
                        "periodEnd",
                        "volume",
                        "openInterest",
                        "winningTradesCount",
                        "winningTradesUsd",
                        "losingTradesCount",
                        "losingTradesUsd"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "oneDay",
                  "oneWeek",
                  "oneMonth",
                  "oneYear",
                  "all"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "overall": {
            "type": "object",
            "properties": {
              "totalWinningTradesCount": {
                "type": "number"
              },
              "totalLosingTradesCount": {
                "type": "number"
              },
              "totalWinningUsd": {
                "type": "number"
              },
              "totalLosingUsd": {
                "type": "number"
              },
              "currentOpenInterest": {
                "type": "number"
              },
              "currentTotalVolume": {
                "type": "number"
              },
              "unrealizedPnl": {
                "type": "number"
              },
              "realizedPnl": {
                "type": "number"
              },
              "totalFees": {
                "type": "number"
              },
              "totalTrades": {
                "type": "number"
              }
            },
            "required": [
              "totalWinningTradesCount",
              "totalLosingTradesCount",
              "totalWinningUsd",
              "totalLosingUsd",
              "currentOpenInterest",
              "currentTotalVolume",
              "unrealizedPnl",
              "realizedPnl",
              "totalFees",
              "totalTrades"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "intervals",
          "overall"
        ],
        "additionalProperties": false
      },
      "PortfolioAnalyticsResponseDto_Output": {
        "type": "object",
        "properties": {
          "config": {
            "type": "object",
            "properties": {
              "rollingWindowDays": {
                "type": "number"
              },
              "startDate": {
                "type": "string"
              },
              "endDate": {
                "type": "string"
              },
              "fundingSynced": {
                "type": "boolean"
              }
            },
            "required": [
              "rollingWindowDays",
              "startDate",
              "endDate",
              "fundingSynced"
            ],
            "additionalProperties": false
          },
          "portfolio": {
            "type": "object",
            "properties": {
              "realizedOnly": {
                "type": "object",
                "properties": {
                  "pnlAbsolute": {
                    "type": "number"
                  },
                  "pnlPercent": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hitRate": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "profitFactor": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgWinSize": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgLossSize": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgReturnPerWin": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgReturnPerLoss": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxDrawdown": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sharpeRatio": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sortinoRatio": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "pnlAbsolute",
                  "pnlPercent",
                  "hitRate",
                  "profitFactor",
                  "avgWinSize",
                  "avgLossSize",
                  "avgReturnPerWin",
                  "avgReturnPerLoss",
                  "maxDrawdown",
                  "sharpeRatio",
                  "sortinoRatio"
                ],
                "additionalProperties": false
              },
              "realizedPlusUnrealized": {
                "type": "object",
                "properties": {
                  "pnlAbsolute": {
                    "type": "number"
                  },
                  "pnlPercent": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "hitRate": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "profitFactor": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgWinSize": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgLossSize": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgReturnPerWin": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "avgReturnPerLoss": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "maxDrawdown": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sharpeRatio": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "sortinoRatio": {
                    "anyOf": [
                      {
                        "type": "number"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "pnlAbsolute",
                  "pnlPercent",
                  "hitRate",
                  "profitFactor",
                  "avgWinSize",
                  "avgLossSize",
                  "avgReturnPerWin",
                  "avgReturnPerLoss",
                  "maxDrawdown",
                  "sharpeRatio",
                  "sortinoRatio"
                ],
                "additionalProperties": false
              },
              "realizedHitRate": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "profitFactor": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avgWinSize": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "avgLossSize": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "breakevenHitRate": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "cushion": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "realizedOnly",
              "realizedPlusUnrealized",
              "realizedHitRate",
              "profitFactor",
              "avgWinSize",
              "avgLossSize",
              "breakevenHitRate",
              "cushion"
            ],
            "additionalProperties": false
          },
          "assets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "asset": {
                  "type": "string"
                },
                "realizedOnly": {
                  "type": "object",
                  "properties": {
                    "pnlAbsolute": {
                      "type": "number"
                    },
                    "pnlPercent": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "hitRate": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profitFactor": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgWinSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgLossSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgReturnPerWin": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgReturnPerLoss": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxDrawdown": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sharpeRatio": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sortinoRatio": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "pnlAbsolute",
                    "pnlPercent",
                    "hitRate",
                    "profitFactor",
                    "avgWinSize",
                    "avgLossSize",
                    "avgReturnPerWin",
                    "avgReturnPerLoss",
                    "maxDrawdown",
                    "sharpeRatio",
                    "sortinoRatio"
                  ],
                  "additionalProperties": false
                },
                "realizedPlusUnrealized": {
                  "type": "object",
                  "properties": {
                    "pnlAbsolute": {
                      "type": "number"
                    },
                    "pnlPercent": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "hitRate": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "profitFactor": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgWinSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgLossSize": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgReturnPerWin": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "avgReturnPerLoss": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "maxDrawdown": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sharpeRatio": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "sortinoRatio": {
                      "anyOf": [
                        {
                          "type": "number"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "pnlAbsolute",
                    "pnlPercent",
                    "hitRate",
                    "profitFactor",
                    "avgWinSize",
                    "avgLossSize",
                    "avgReturnPerWin",
                    "avgReturnPerLoss",
                    "maxDrawdown",
                    "sharpeRatio",
                    "sortinoRatio"
                  ],
                  "additionalProperties": false
                },
                "unrealizedReturnPerDay": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "asset",
                "realizedOnly",
                "realizedPlusUnrealized",
                "unrealizedReturnPerDay"
              ],
              "additionalProperties": false
            }
          },
          "pairs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string"
                },
                "longAssets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "shortAssets": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "trades": {
                  "type": "number"
                },
                "wins": {
                  "type": "number"
                },
                "losses": {
                  "type": "number"
                },
                "hitRate": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avgWinSize": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "avgLossSize": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "expectancy": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "totalPnl": {
                  "type": "number"
                },
                "bookPercent": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "key",
                "longAssets",
                "shortAssets",
                "trades",
                "wins",
                "losses",
                "hitRate",
                "avgWinSize",
                "avgLossSize",
                "expectancy",
                "totalPnl",
                "bookPercent"
              ],
              "additionalProperties": false
            }
          },
          "series": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "date": {
                  "type": "string"
                },
                "trades": {
                  "type": "number"
                },
                "wins": {
                  "type": "number"
                },
                "losses": {
                  "type": "number"
                },
                "dayPnl": {
                  "type": "number"
                },
                "dayVolume": {
                  "type": "number"
                },
                "dayFunding": {
                  "type": "number"
                },
                "dayNetPnl": {
                  "type": "number"
                },
                "hitRate": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "winLossRatio": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rollingHitRate": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rollingWinLossRatio": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dailyReturn": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "cumulativeReturn": {
                  "type": "number"
                },
                "equity": {
                  "type": "number"
                },
                "drawdown": {
                  "type": "number"
                },
                "rollingSharpe": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rollingSortino": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "rollingVolatility": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "date",
                "trades",
                "wins",
                "losses",
                "dayPnl",
                "dayVolume",
                "dayFunding",
                "dayNetPnl",
                "hitRate",
                "winLossRatio",
                "rollingHitRate",
                "rollingWinLossRatio",
                "dailyReturn",
                "cumulativeReturn",
                "equity",
                "drawdown",
                "rollingSharpe",
                "rollingSortino",
                "rollingVolatility"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "config",
          "portfolio",
          "assets",
          "pairs"
        ],
        "additionalProperties": false
      },
      "ListPositionsResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "positions": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "OPEN",
                    "CLOSED"
                  ]
                },
                "closedReason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "NETTED",
                        "USER",
                        "LIQUIDATED"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "PEAR",
                    "EXTERNAL",
                    "PARTIAL"
                  ]
                },
                "exposure": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "+42.5"
                    ],
                    "type": "string",
                    "pattern": "^[+-]\\d+(\\.\\d+)?$"
                  }
                },
                "unstableHistoricalData": {
                  "type": "boolean"
                },
                "totalFundingPayment": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "+42.5"
                    ],
                    "type": "string",
                    "pattern": "^[+-]\\d+(\\.\\d+)?$"
                  }
                },
                "closedAt": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "initialExposureUSD": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "+42.5"
                    ],
                    "type": "string",
                    "pattern": "^[+-]\\d+(\\.\\d+)?$"
                  }
                },
                "entryPrices": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  }
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "tradeAccountId",
                "connector",
                "status",
                "origin",
                "exposure",
                "unstableHistoricalData",
                "totalFundingPayment",
                "initialExposureUSD",
                "entryPrices",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "positions"
        ],
        "additionalProperties": false
      },
      "ListLitePositionsResponseDto_Output": {
        "type": "object",
        "properties": {
          "positions": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "positionKey": {
                  "type": "string",
                  "minLength": 1
                },
                "createdAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "exposure": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "+42.5"
                    ],
                    "type": "string",
                    "pattern": "^[+-]\\d+(\\.\\d+)?$"
                  }
                },
                "status": {
                  "type": "string",
                  "const": "OPEN"
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "PEAR",
                    "EXTERNAL",
                    "PARTIAL"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                }
              },
              "required": [
                "id",
                "positionKey",
                "createdAt",
                "exposure",
                "status",
                "origin",
                "connector"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "positions"
        ],
        "additionalProperties": false
      },
      "ListClosedTradesResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "trades": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "openedAt": {
                  "type": "string"
                },
                "closedAt": {
                  "type": "string"
                },
                "closedReason": {
                  "type": "string",
                  "enum": [
                    "NETTED",
                    "USER",
                    "LIQUIDATED"
                  ]
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "PEAR",
                    "EXTERNAL",
                    "PARTIAL"
                  ]
                },
                "grossPnl": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "netPnl": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "totalFees": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "tradeFees": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "pearFees": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "totalFunding": {
                  "examples": [
                    "+42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                },
                "entryNotional": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "exitNotional": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "exitNotionalComplete": {
                  "type": "boolean"
                },
                "hasSyntheticFills": {
                  "type": "boolean"
                },
                "unstableHistoricalData": {
                  "type": "boolean"
                },
                "longAssets": {
                  "type": "array",
                  "items": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  }
                },
                "shortAssets": {
                  "type": "array",
                  "items": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  }
                },
                "legs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "asset": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "LONG",
                          "SHORT"
                        ]
                      },
                      "entryVwap": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "exitVwap": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "grossPnl": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "netPnl": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "totalFees": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "tradeFees": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "pearFees": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "funding": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "entryNotional": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "exitQuantity": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "undeterminedSize": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "asset",
                      "side",
                      "grossPnl",
                      "netPnl",
                      "totalFees",
                      "tradeFees",
                      "pearFees",
                      "funding",
                      "entryNotional",
                      "exitQuantity",
                      "undeterminedSize"
                    ],
                    "additionalProperties": false
                  }
                },
                "steps": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "executionId": {
                        "type": "string"
                      },
                      "at": {
                        "type": "string"
                      },
                      "grossPnl": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      },
                      "legs": {
                        "type": "array",
                        "items": {
                          "anyOf": [
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "INCREASE"
                                },
                                "asset": {
                                  "examples": [
                                    "BTC"
                                  ],
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[^\\s][^\\s]*$"
                                },
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "BUY",
                                    "SELL"
                                  ]
                                },
                                "quantity": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "price": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "tradeFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                },
                                "pearFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                }
                              },
                              "required": [
                                "kind",
                                "asset",
                                "side",
                                "quantity",
                                "price",
                                "tradeFee",
                                "pearFee"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "REDUCE"
                                },
                                "asset": {
                                  "examples": [
                                    "BTC"
                                  ],
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[^\\s][^\\s]*$"
                                },
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "BUY",
                                    "SELL"
                                  ]
                                },
                                "quantity": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "price": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "entryBasis": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "grossPnl": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                },
                                "tradeFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                },
                                "pearFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                }
                              },
                              "required": [
                                "kind",
                                "asset",
                                "side",
                                "quantity",
                                "price",
                                "entryBasis",
                                "grossPnl",
                                "tradeFee",
                                "pearFee"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "type": "object",
                              "properties": {
                                "kind": {
                                  "type": "string",
                                  "const": "REDUCE_UNPRICED"
                                },
                                "asset": {
                                  "examples": [
                                    "BTC"
                                  ],
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64,
                                  "pattern": "^[^\\s][^\\s]*$"
                                },
                                "side": {
                                  "type": "string",
                                  "enum": [
                                    "BUY",
                                    "SELL"
                                  ]
                                },
                                "quantity": {
                                  "examples": [
                                    "1250.75"
                                  ],
                                  "type": "string",
                                  "pattern": "^\\d+(\\.\\d+)?$"
                                },
                                "tradeFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                },
                                "pearFee": {
                                  "examples": [
                                    "+42.5"
                                  ],
                                  "type": "string",
                                  "pattern": "^[+-]\\d+(\\.\\d+)?$"
                                }
                              },
                              "required": [
                                "kind",
                                "asset",
                                "side",
                                "quantity",
                                "tradeFee",
                                "pearFee"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      }
                    },
                    "required": [
                      "at",
                      "grossPnl",
                      "legs"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "positionId",
                "connector",
                "openedAt",
                "closedAt",
                "origin",
                "grossPnl",
                "netPnl",
                "totalFees",
                "tradeFees",
                "pearFees",
                "totalFunding",
                "entryNotional",
                "exitNotional",
                "exitNotionalComplete",
                "hasSyntheticFills",
                "unstableHistoricalData",
                "longAssets",
                "shortAssets",
                "legs"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "trades"
        ],
        "additionalProperties": false
      },
      "MarketBasketsResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "offset": {
            "type": "number"
          },
          "count": {
            "type": "number"
          },
          "markets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "basketKey": {
                  "type": "string"
                },
                "displaySymbol": {
                  "type": "string"
                },
                "legs": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "symbol": {
                        "type": "string",
                        "minLength": 1
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "symbol",
                      "side"
                    ],
                    "additionalProperties": false
                  }
                },
                "price": {
                  "type": "string"
                },
                "priceChange24h": {
                  "type": "string"
                },
                "weightRatio": {
                  "type": "string"
                },
                "weightRatioChange24h": {
                  "type": "string"
                },
                "netFunding": {
                  "type": "string"
                },
                "volume24h": {
                  "type": "string"
                },
                "openInterest": {
                  "type": "string"
                },
                "tradeability": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "tradable",
                        "reduce_only",
                        "not_tradable"
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                },
                "hasMaterializedStats": {
                  "type": "boolean"
                }
              },
              "required": [
                "connector",
                "basketKey",
                "displaySymbol",
                "legs",
                "price",
                "priceChange24h",
                "weightRatio",
                "weightRatioChange24h",
                "netFunding",
                "volume24h",
                "openInterest",
                "tradeability",
                "updatedAt",
                "hasMaterializedStats"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "offset",
          "count",
          "markets"
        ],
        "additionalProperties": false
      },
      "MarketBasketPositionCountsPayloadDto": {
        "type": "object",
        "properties": {
          "connector": {
            "description": "Absent means every connector, summed",
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "hyperliquid",
                "binance",
                "bybit",
                "okx",
                "lighter"
              ]
            }
          },
          "basketKeys": {
            "description": "Canonical basket keys, as /markets/baskets reports them",
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "examples": [
                "9f2c1b7a4e6d3f8091a5c7e2b4d6f8a0c3e5079b1d3f5a7c9e1b3d5f7a9c1e3d5"
              ],
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        },
        "required": [
          "basketKeys"
        ]
      },
      "MarketBasketPositionCountsResponseDto_Output": {
        "type": "object",
        "properties": {
          "counts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "basketKey": {
                  "type": "string"
                },
                "opened": {
                  "type": "number"
                },
                "traders": {
                  "type": "number"
                }
              },
              "required": [
                "basketKey",
                "opened",
                "traders"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "counts"
        ],
        "additionalProperties": false
      },
      "MarketsResponseDto_Output": {
        "type": "object",
        "properties": {
          "markets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "instrumentId": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "displaySymbol": {
                  "type": "string"
                },
                "base": {
                  "type": "string"
                },
                "quote": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "volume24h": {
                  "type": "string"
                },
                "change24h": {
                  "type": "string"
                },
                "openInterest": {
                  "type": "string"
                },
                "fundingRate": {
                  "type": "string"
                },
                "tradeability": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "tradable",
                        "reduce_only",
                        "not_tradable"
                      ]
                    },
                    "reason": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "status",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "updatedAt": {
                  "type": "number"
                }
              },
              "required": [
                "connector",
                "instrumentId",
                "displaySymbol",
                "base",
                "quote",
                "price",
                "volume24h",
                "change24h",
                "openInterest",
                "fundingRate",
                "tradeability",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "markets": {
                "type": "number"
              },
              "volume24h": {
                "type": "string"
              },
              "openInterest": {
                "type": "string"
              }
            },
            "required": [
              "markets",
              "volume24h",
              "openInterest"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "markets",
          "totals"
        ],
        "additionalProperties": false
      },
      "PricesResponseDto_Output": {
        "type": "object",
        "properties": {
          "mid": {
            "type": "object",
            "propertyNames": {
              "examples": [
                "BTC"
              ],
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^\\s][^\\s]*$"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "mark": {
            "type": "object",
            "propertyNames": {
              "examples": [
                "BTC"
              ],
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^\\s][^\\s]*$"
            },
            "additionalProperties": {
              "type": "string"
            }
          }
        },
        "required": [
          "mid",
          "mark"
        ],
        "additionalProperties": false
      },
      "RebalanceManualDto": {
        "type": "object",
        "properties": {
          "orderType": {
            "type": "string",
            "enum": [
              "MARKET"
            ]
          },
          "weightings": {
            "description": "Array of weightings to rebalance the position. Leg weights must sum to exactly 1. Each leg must name a distinct symbol.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "symbol",
                "weight"
              ]
            }
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "orderType",
          "weightings"
        ]
      },
      "RebalanceManualResponseDto_Output": {
        "type": "object",
        "properties": {
          "plan": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "full_rebalance"
                  }
                },
                "required": [
                  "outcome"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "partial_rebalance"
                  },
                  "messages": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "string"
                      }
                    ],
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "outcome",
                  "messages"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "no_rebalance"
                  },
                  "messages": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "string"
                      }
                    ],
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "outcome",
                  "messages"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "const": "failed"
                  },
                  "messages": {
                    "type": "array",
                    "prefixItems": [
                      {
                        "type": "string"
                      }
                    ],
                    "items": {
                      "type": "string"
                    },
                    "minItems": 1
                  }
                },
                "required": [
                  "outcome",
                  "messages"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "plan"
        ],
        "additionalProperties": false
      },
      "CreateInitialWeight": {
        "type": "object",
        "properties": {
          "weightSource": {
            "type": "string",
            "const": "INITIAL_WEIGHT"
          },
          "minimumDriftPct": {
            "examples": [
              "0.05"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "weightSource",
          "minimumDriftPct",
          "positionId"
        ]
      },
      "CreateLiveBeta": {
        "type": "object",
        "properties": {
          "weightSource": {
            "type": "string",
            "const": "LIVE_BETA"
          },
          "minimumDriftPct": {
            "examples": [
              "0.05"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "1h",
              "4h",
              "1d"
            ]
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "weightSource",
          "minimumDriftPct",
          "timeframe",
          "positionId"
        ]
      },
      "CreateAutoRebalanceConfigDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateInitialWeight"
          },
          {
            "$ref": "#/components/schemas/CreateLiveBeta"
          }
        ],
        "discriminator": {
          "propertyName": "weightSource",
          "mapping": {
            "INITIAL_WEIGHT": "#/components/schemas/CreateInitialWeight",
            "LIVE_BETA": "#/components/schemas/CreateLiveBeta"
          }
        }
      },
      "CreateAutoRebalanceResponseDto_Output": {
        "type": "object",
        "properties": {
          "config": {
            "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "positionId": {
                    "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "PAUSED"
                    ]
                  },
                  "pausedReason": {
                    "type": "string",
                    "enum": [
                      "USER",
                      "POSITION_CHANGED",
                      "REPEATED_FAILURES",
                      "INVALID_LIVE_BETA_EXPOSURE"
                    ]
                  },
                  "minimumDriftPct": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "createdAt": {
                    "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))$",
                    "examples": [
                      "2026-01-15T09:30:00.000Z"
                    ]
                  },
                  "updatedAt": {
                    "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))$",
                    "examples": [
                      "2026-01-15T09:30:00.000Z"
                    ]
                  },
                  "weightSource": {
                    "type": "string",
                    "const": "INITIAL_WEIGHT"
                  }
                },
                "required": [
                  "id",
                  "positionId",
                  "status",
                  "minimumDriftPct",
                  "createdAt",
                  "updatedAt",
                  "weightSource"
                ],
                "additionalProperties": false
              },
              {
                "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "positionId": {
                    "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "PAUSED"
                    ]
                  },
                  "pausedReason": {
                    "type": "string",
                    "enum": [
                      "USER",
                      "POSITION_CHANGED",
                      "REPEATED_FAILURES",
                      "INVALID_LIVE_BETA_EXPOSURE"
                    ]
                  },
                  "minimumDriftPct": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "createdAt": {
                    "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))$",
                    "examples": [
                      "2026-01-15T09:30:00.000Z"
                    ]
                  },
                  "updatedAt": {
                    "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))$",
                    "examples": [
                      "2026-01-15T09:30:00.000Z"
                    ]
                  },
                  "weightSource": {
                    "type": "string",
                    "const": "LIVE_BETA"
                  },
                  "timeframe": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "4h",
                      "1d"
                    ]
                  },
                  "beta": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "PENDING"
                          }
                        },
                        "required": [
                          "state"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "BASELINED"
                          },
                          "impliedEntryBeta": {
                            "examples": [
                              "1250.75"
                            ],
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d+)?$"
                          }
                        },
                        "required": [
                          "state",
                          "impliedEntryBeta"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "state": {
                            "type": "string",
                            "const": "TRACKING"
                          },
                          "impliedEntryBeta": {
                            "examples": [
                              "1250.75"
                            ],
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d+)?$"
                          },
                          "lastDerivedBeta": {
                            "examples": [
                              "1250.75"
                            ],
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d+)?$"
                          },
                          "lastProcessedBetaTime": {
                            "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))$",
                            "examples": [
                              "2026-01-15T09:30:00.000Z"
                            ]
                          },
                          "driftPct": {
                            "examples": [
                              "1250.75"
                            ],
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d+)?$"
                          }
                        },
                        "required": [
                          "state",
                          "impliedEntryBeta",
                          "lastDerivedBeta",
                          "lastProcessedBetaTime"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "positionId",
                  "status",
                  "minimumDriftPct",
                  "createdAt",
                  "updatedAt",
                  "weightSource",
                  "timeframe",
                  "beta"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "config"
        ],
        "additionalProperties": false
      },
      "AutoRebalanceListResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "positionId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "PAUSED"
                      ]
                    },
                    "pausedReason": {
                      "type": "string",
                      "enum": [
                        "USER",
                        "POSITION_CHANGED",
                        "REPEATED_FAILURES",
                        "INVALID_LIVE_BETA_EXPOSURE"
                      ]
                    },
                    "minimumDriftPct": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    },
                    "createdAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "updatedAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "weightSource": {
                      "type": "string",
                      "const": "INITIAL_WEIGHT"
                    }
                  },
                  "required": [
                    "id",
                    "positionId",
                    "status",
                    "minimumDriftPct",
                    "createdAt",
                    "updatedAt",
                    "weightSource"
                  ],
                  "additionalProperties": false
                },
                {
                  "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "positionId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "PAUSED"
                      ]
                    },
                    "pausedReason": {
                      "type": "string",
                      "enum": [
                        "USER",
                        "POSITION_CHANGED",
                        "REPEATED_FAILURES",
                        "INVALID_LIVE_BETA_EXPOSURE"
                      ]
                    },
                    "minimumDriftPct": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    },
                    "createdAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "updatedAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "weightSource": {
                      "type": "string",
                      "const": "LIVE_BETA"
                    },
                    "timeframe": {
                      "type": "string",
                      "enum": [
                        "1h",
                        "4h",
                        "1d"
                      ]
                    },
                    "beta": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "PENDING"
                            }
                          },
                          "required": [
                            "state"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "BASELINED"
                            },
                            "impliedEntryBeta": {
                              "examples": [
                                "1250.75"
                              ],
                              "type": "string",
                              "pattern": "^\\d+(\\.\\d+)?$"
                            }
                          },
                          "required": [
                            "state",
                            "impliedEntryBeta"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "state": {
                              "type": "string",
                              "const": "TRACKING"
                            },
                            "impliedEntryBeta": {
                              "examples": [
                                "1250.75"
                              ],
                              "type": "string",
                              "pattern": "^\\d+(\\.\\d+)?$"
                            },
                            "lastDerivedBeta": {
                              "examples": [
                                "1250.75"
                              ],
                              "type": "string",
                              "pattern": "^\\d+(\\.\\d+)?$"
                            },
                            "lastProcessedBetaTime": {
                              "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))$",
                              "examples": [
                                "2026-01-15T09:30:00.000Z"
                              ]
                            },
                            "driftPct": {
                              "examples": [
                                "1250.75"
                              ],
                              "type": "string",
                              "pattern": "^\\d+(\\.\\d+)?$"
                            }
                          },
                          "required": [
                            "state",
                            "impliedEntryBeta",
                            "lastDerivedBeta",
                            "lastProcessedBetaTime"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "positionId",
                    "status",
                    "minimumDriftPct",
                    "createdAt",
                    "updatedAt",
                    "weightSource",
                    "timeframe",
                    "beta"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "limit",
          "items"
        ],
        "additionalProperties": false
      },
      "UpdateAutoRebalanceConfigDto": {
        "type": "object",
        "properties": {
          "minimumDriftPct": {
            "examples": [
              "0.05"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "1h",
              "4h",
              "1d"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "PAUSED"
            ]
          }
        }
      },
      "InitialWeightConfig": {
        "type": "object",
        "properties": {
          "weightSource": {
            "type": "string",
            "const": "INITIAL_WEIGHT"
          },
          "minimumDriftPct": {
            "examples": [
              "0.05"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          }
        },
        "required": [
          "weightSource",
          "minimumDriftPct"
        ]
      },
      "LiveBetaConfig": {
        "type": "object",
        "properties": {
          "weightSource": {
            "type": "string",
            "const": "LIVE_BETA"
          },
          "minimumDriftPct": {
            "examples": [
              "0.05"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "timeframe": {
            "type": "string",
            "enum": [
              "1h",
              "4h",
              "1d"
            ]
          }
        },
        "required": [
          "weightSource",
          "minimumDriftPct",
          "timeframe"
        ]
      },
      "ReplaceAutoRebalanceConfigDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/InitialWeightConfig"
          },
          {
            "$ref": "#/components/schemas/LiveBetaConfig"
          }
        ],
        "discriminator": {
          "propertyName": "weightSource",
          "mapping": {
            "INITIAL_WEIGHT": "#/components/schemas/InitialWeightConfig",
            "LIVE_BETA": "#/components/schemas/LiveBetaConfig"
          }
        }
      },
      "RebalanceEventListResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "items": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "autoRebalanceConfigId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "weightSource": {
                  "type": "string",
                  "enum": [
                    "INITIAL_WEIGHT",
                    "LIVE_BETA"
                  ]
                },
                "driftPct": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "currentWeights": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "targetWeights": {
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "type": "number"
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "SUCCESS",
                    "FAILED"
                  ]
                },
                "error": {
                  "type": "string"
                },
                "createdAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                }
              },
              "required": [
                "id",
                "autoRebalanceConfigId",
                "positionId",
                "weightSource",
                "driftPct",
                "currentWeights",
                "targetWeights",
                "status",
                "createdAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "items"
        ],
        "additionalProperties": false
      },
      "CreateReferralCodeDto": {
        "type": "object",
        "properties": {
          "referralCode": {
            "examples": [
              "PEAR2026"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "pattern": "^[A-Za-z0-9_-]+$"
          }
        },
        "required": [
          "referralCode"
        ],
        "description": "Payload to issue a referral code to the authenticated user"
      },
      "BindReferralCodeDto": {
        "type": "object",
        "properties": {
          "referralCode": {
            "examples": [
              "PEAR2026"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 32,
            "pattern": "^[\\x20-\\x7E]+$"
          }
        },
        "required": [
          "referralCode"
        ],
        "description": "Payload to bind a referral code permanently to the authenticated user"
      },
      "ReferralRefereeListResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "description": "Total referees this list yields, counting bound V3 users and pending legacy wallets together",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "pendingCount": {
            "type": "integer",
            "description": "Subset of count whose verified legacy wallet has no V3 identity yet, so no binding exists",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "referees": {
            "type": "array",
            "items": {
              "description": "One referral-history entry, shaped by whether the referee is bound to a V3 user yet",
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "The referee resolves to a V3 user with a permanent binding",
                      "type": "string",
                      "const": "BOUND"
                    },
                    "address": {
                      "description": "Linked EVM wallet address when the referee has one",
                      "examples": [
                        "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                      ],
                      "type": "string",
                      "pattern": "^0x[a-fA-F0-9]{40}$"
                    },
                    "referredAt": {
                      "description": "V3 attribution time in epoch milliseconds; not the original legacy on-chain referral time, and absent on a historical binding without a recoverable date",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "tradeCount": {
                      "description": "Distinct Pear executions with at least one real confirmed fill",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "status",
                    "tradeCount"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "status": {
                      "description": "A verified legacy referee that has no V3 identity yet",
                      "type": "string",
                      "const": "PENDING"
                    },
                    "address": {
                      "examples": [
                        "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                      ],
                      "description": "The verified legacy wallet, the only fact a pending referee carries",
                      "type": "string",
                      "pattern": "^0x[a-fA-F0-9]{40}$"
                    }
                  },
                  "required": [
                    "status",
                    "address"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          }
        },
        "required": [
          "limit",
          "count",
          "pendingCount",
          "referees"
        ],
        "additionalProperties": false
      },
      "ReferralStatusResponseDto_Output": {
        "type": "object",
        "properties": {
          "ownedCodes": {
            "type": "array",
            "description": "Exact case-sensitive referral codes owned by the authenticated user",
            "items": {
              "type": "string"
            }
          },
          "referrerCode": {
            "type": "string",
            "description": "Exact case-sensitive code owned by the permanent referrer"
          }
        },
        "required": [
          "ownedCodes"
        ],
        "additionalProperties": false
      },
      "ListSavedBasketsResponseDto_Output": {
        "type": "object",
        "properties": {
          "baskets": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "legs": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "examples": [
                            "BTC"
                          ],
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 64,
                          "pattern": "^[^\\s][^\\s]*$"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "BUY",
                            "SELL"
                          ]
                        },
                        "weight": {
                          "description": "Share of total gross notional as a fraction (legs sum to 1)",
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "symbol",
                        "side",
                        "weight"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "items": {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "weight": {
                        "description": "Share of total gross notional as a fraction (legs sum to 1)",
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "weight"
                    ],
                    "additionalProperties": false
                  },
                  "minItems": 1
                },
                "createdAt": {
                  "type": "string"
                },
                "updatedAt": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "legs",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "baskets"
        ],
        "additionalProperties": false
      },
      "CreateSavedBasketPayloadDto": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Display name, unique per trade account (case-insensitive)",
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "legs": {
            "description": "At least one leg, up to 20",
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "weight": {
                    "description": "Share of total gross notional as a fraction (legs sum to 1)",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "weight"
                ]
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "weight": {
                  "description": "Share of total gross notional as a fraction (legs sum to 1)",
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "symbol",
                "side",
                "weight"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "name",
          "legs"
        ],
        "description": "Save the current basket under a name"
      },
      "CreateSavedBasketResponseDto_Output": {
        "type": "object",
        "properties": {
          "basket": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "name": {
                "type": "string"
              },
              "legs": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "weight": {
                        "description": "Share of total gross notional as a fraction (legs sum to 1)",
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "weight"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "description": "Share of total gross notional as a fraction (legs sum to 1)",
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "legs",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "basket"
        ],
        "additionalProperties": false
      },
      "UpdateSavedBasketPayloadDto": {
        "type": "object",
        "properties": {
          "name": {
            "description": "Display name, unique per trade account (case-insensitive)",
            "type": "string",
            "minLength": 1,
            "maxLength": 48
          },
          "legs": {
            "description": "At least one leg, up to 20",
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "weight": {
                    "description": "Share of total gross notional as a fraction (legs sum to 1)",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "weight"
                ]
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "weight": {
                  "description": "Share of total gross notional as a fraction (legs sum to 1)",
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "symbol",
                "side",
                "weight"
              ]
            },
            "minItems": 1
          }
        },
        "description": "Rename a saved basket and/or replace its legs"
      },
      "UpdateSavedBasketResponseDto_Output": {
        "type": "object",
        "properties": {
          "basket": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "name": {
                "type": "string"
              },
              "legs": {
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "weight": {
                        "description": "Share of total gross notional as a fraction (legs sum to 1)",
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "weight"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "description": "Share of total gross notional as a fraction (legs sum to 1)",
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              },
              "createdAt": {
                "type": "string"
              },
              "updatedAt": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "legs",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "basket"
        ],
        "additionalProperties": false
      },
      "CreateTWAPOpen": {
        "type": "object",
        "properties": {
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "endAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "randomization": {
            "default": {
              "timingJitterBps": 0,
              "sizeJitterBps": 0
            },
            "type": "object",
            "properties": {
              "timingJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              },
              "sizeJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              }
            },
            "required": [
              "timingJitterBps",
              "sizeJitterBps"
            ]
          },
          "strategy": {
            "type": "string",
            "const": "TWAP"
          },
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "executionType": {
            "type": "string",
            "const": "MARKET"
          },
          "legs": {
            "description": "At least one leg is required. Each leg must name a distinct symbol. Leg weights must sum to exactly 1.",
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "symbol",
                "side",
                "weight"
              ]
            }
          },
          "targetNotional": {
            "examples": [
              "5000"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "sliceIntervalSec": {
            "type": "integer",
            "minimum": 15,
            "maximum": 2678400
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "startAt",
          "endAt",
          "strategy",
          "intent",
          "executionType",
          "legs",
          "targetNotional",
          "sliceIntervalSec"
        ]
      },
      "CreateTWAPClose": {
        "type": "object",
        "properties": {
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "endAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ]
          },
          "randomization": {
            "default": {
              "timingJitterBps": 0,
              "sizeJitterBps": 0
            },
            "type": "object",
            "properties": {
              "timingJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              },
              "sizeJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              }
            },
            "required": [
              "timingJitterBps",
              "sizeJitterBps"
            ]
          },
          "strategy": {
            "type": "string",
            "const": "TWAP"
          },
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "executionType": {
            "type": "string",
            "const": "MARKET"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "sliceIntervalSec": {
            "type": "integer",
            "minimum": 15,
            "maximum": 2678400
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "startAt",
          "endAt",
          "strategy",
          "intent",
          "executionType",
          "positionId",
          "sliceIntervalSec"
        ]
      },
      "CreateScheduleDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateTWAPOpen"
          },
          {
            "$ref": "#/components/schemas/CreateTWAPClose"
          }
        ],
        "discriminator": {
          "propertyName": "intent",
          "mapping": {
            "OPEN": "#/components/schemas/CreateTWAPOpen",
            "CLOSE": "#/components/schemas/CreateTWAPClose"
          }
        }
      },
      "TWAPOpen_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "strategy": {
            "type": "string",
            "const": "TWAP"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "positionKey": {
            "type": "string"
          },
          "executionType": {
            "type": "string",
            "enum": [
              "MARKET"
            ]
          },
          "lastSliceAt": {
            "type": "string"
          },
          "startAt": {
            "type": "string"
          },
          "endAt": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "cancelledReason": {
            "type": "string",
            "enum": [
              "POSITION_CLOSED",
              "USER",
              "SYSTEM",
              "POSITION_NETTED",
              "POSITION_REVERSED"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "sliceIntervalSec": {
            "type": "number"
          },
          "sliceCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "randomization": {
            "type": "object",
            "properties": {
              "timingJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              },
              "sizeJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              }
            },
            "required": [
              "timingJitterBps",
              "sizeJitterBps"
            ],
            "additionalProperties": false
          },
          "legs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "weight": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "symbol",
                "side",
                "weight"
              ],
              "additionalProperties": false
            }
          },
          "targetNotional": {
            "examples": [
              "1250.75"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          },
          "remainingNotional": {
            "examples": [
              "1250.75"
            ],
            "type": "string",
            "pattern": "^\\d+(\\.\\d+)?$"
          }
        },
        "required": [
          "id",
          "connector",
          "strategy",
          "status",
          "intent",
          "positionKey",
          "executionType",
          "startAt",
          "endAt",
          "createdAt",
          "updatedAt",
          "sliceIntervalSec",
          "sliceCount",
          "randomization",
          "legs",
          "targetNotional",
          "remainingNotional"
        ],
        "additionalProperties": false
      },
      "TWAPClose_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "connector": {
            "type": "string",
            "enum": [
              "hyperliquid",
              "binance",
              "bybit",
              "okx",
              "lighter"
            ]
          },
          "strategy": {
            "type": "string",
            "const": "TWAP"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "COMPLETED",
              "FAILED",
              "CANCELLED"
            ]
          },
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "positionKey": {
            "type": "string"
          },
          "executionType": {
            "type": "string",
            "enum": [
              "MARKET"
            ]
          },
          "lastSliceAt": {
            "type": "string"
          },
          "startAt": {
            "type": "string"
          },
          "endAt": {
            "type": "string"
          },
          "cancelledAt": {
            "type": "string"
          },
          "cancelledReason": {
            "type": "string",
            "enum": [
              "POSITION_CLOSED",
              "USER",
              "SYSTEM",
              "POSITION_NETTED",
              "POSITION_REVERSED"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "fills": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "PROVISIONAL",
                    "CONFIRMED",
                    "RECONCILED"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "isExternal": {
                  "type": "boolean"
                },
                "synthetic": {
                  "type": "boolean"
                },
                "quantity": {
                  "type": "string"
                },
                "price": {
                  "type": "string"
                },
                "usd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "timestamp": {
                  "type": "string"
                },
                "original": {
                  "type": "object",
                  "properties": {
                    "exchangeFillId": {
                      "type": "string"
                    },
                    "quantity": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "exchangeFillId",
                    "quantity"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "status",
                "tradeAccountId",
                "symbol",
                "positionId",
                "connector",
                "side",
                "reduceOnly",
                "isExternal",
                "synthetic",
                "quantity",
                "price",
                "usd",
                "timestamp"
              ],
              "additionalProperties": false
            }
          },
          "sliceIntervalSec": {
            "type": "number"
          },
          "sliceCount": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "randomization": {
            "type": "object",
            "properties": {
              "timingJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              },
              "sizeJitterBps": {
                "type": "integer",
                "minimum": 0,
                "maximum": 5000
              }
            },
            "required": [
              "timingJitterBps",
              "sizeJitterBps"
            ],
            "additionalProperties": false
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "initialExposure": {
            "type": "object",
            "propertyNames": {
              "examples": [
                "BTC"
              ],
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "pattern": "^[^\\s][^\\s]*$"
            },
            "additionalProperties": {
              "examples": [
                "+42.5"
              ],
              "type": "string",
              "pattern": "^[+-]\\d+(\\.\\d+)?$"
            }
          }
        },
        "required": [
          "id",
          "connector",
          "strategy",
          "status",
          "intent",
          "positionKey",
          "executionType",
          "startAt",
          "endAt",
          "createdAt",
          "updatedAt",
          "sliceIntervalSec",
          "sliceCount",
          "randomization",
          "positionId",
          "initialExposure"
        ],
        "additionalProperties": false
      },
      "CreateScheduleResponseDto_Output": {
        "type": "object",
        "properties": {
          "schedule": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TWAPOpen_Output"
              },
              {
                "$ref": "#/components/schemas/TWAPClose_Output"
              }
            ],
            "discriminator": {
              "propertyName": "intent",
              "mapping": {
                "OPEN": "#/components/schemas/TWAPOpen_Output",
                "CLOSE": "#/components/schemas/TWAPClose_Output"
              }
            }
          }
        },
        "required": [
          "schedule"
        ],
        "additionalProperties": false
      },
      "ListSchedulesResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "schedules": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/TWAPOpen_Output"
                },
                {
                  "$ref": "#/components/schemas/TWAPClose_Output"
                }
              ],
              "discriminator": {
                "propertyName": "intent",
                "mapping": {
                  "OPEN": "#/components/schemas/TWAPOpen_Output",
                  "CLOSE": "#/components/schemas/TWAPClose_Output"
                }
              }
            }
          }
        },
        "required": [
          "limit",
          "schedules"
        ],
        "additionalProperties": false
      },
      "CancelScheduleResponseDto_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "CancelAllSchedulesResponseDto_Output": {
        "type": "object",
        "properties": {
          "ids": {
            "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)$",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        },
        "required": [
          "ids"
        ],
        "additionalProperties": false
      },
      "VolumeStatisticsResponseDto_Output": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "timestamp": {
                  "type": "number"
                },
                "volume": {
                  "type": "number"
                },
                "fees": {
                  "type": "number"
                },
                "trades": {
                  "type": "number"
                },
                "users": {
                  "type": "number"
                },
                "newUsers": {
                  "type": "number"
                }
              },
              "required": [
                "timestamp",
                "volume",
                "fees",
                "trades",
                "users",
                "newUsers"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "OiStatisticsResponseDto_Output": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "timestamp": {
                  "type": "number"
                },
                "openInterest": {
                  "type": "number"
                },
                "openPositions": {
                  "type": "number"
                }
              },
              "required": [
                "timestamp",
                "openInterest",
                "openPositions"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "LeaderboardResponseDto_Output": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tradeAccountId": {
                  "type": "string"
                },
                "userId": {
                  "type": "string"
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "volume": {
                  "type": "string"
                },
                "grossRealizedPnl": {
                  "type": "string"
                },
                "grossUpnl": {
                  "type": "string"
                },
                "fundingPayment": {
                  "type": "string"
                },
                "totalNetPnl": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "totalTrades": {
                  "type": "number"
                },
                "roi": {
                  "type": "string"
                },
                "xHandle": {
                  "type": "string"
                },
                "xName": {
                  "type": "string"
                },
                "xAvatarUrl": {
                  "type": "string"
                },
                "xUserId": {
                  "type": "string"
                }
              },
              "required": [
                "tradeAccountId",
                "userId",
                "connector",
                "volume",
                "grossRealizedPnl",
                "grossUpnl",
                "fundingPayment",
                "totalNetPnl",
                "pearFee",
                "tradeFee",
                "totalTrades"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "StatisticsTotalsResponseDto_Output": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "totalVolume": {
                "type": "number"
              },
              "totalFees": {
                "type": "number"
              },
              "totalTrades": {
                "type": "number"
              },
              "totalUsers": {
                "type": "number"
              }
            },
            "required": [
              "totalVolume",
              "totalFees",
              "totalTrades",
              "totalUsers"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "data"
        ],
        "additionalProperties": false
      },
      "SyncFillsSinceRequestDto": {
        "type": "object",
        "properties": {
          "overlapMs": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "overlapMs"
        ]
      },
      "SyncFillsSinceResponseDto_Output": {
        "type": "object",
        "properties": {
          "sinceMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "neverSynced": {
            "type": "boolean"
          },
          "firstSyncStartedAt": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "confirmedExchangeFillIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "sinceMs",
          "neverSynced"
        ],
        "additionalProperties": false
      },
      "ReconcileFillsRequestDto": {
        "type": "object",
        "propertyNames": {
          "type": "string",
          "minLength": 1
        },
        "additionalProperties": {
          "type": "array",
          "prefixItems": [
            {
              "type": "object",
              "properties": {
                "exchangeFillId": {
                  "type": "string",
                  "minLength": 1
                },
                "cloid": {
                  "type": "string"
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "timestamp": {
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "tradeFee": {
                  "examples": [
                    "-42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "builderFee": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "liquidation": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "mark": {
                          "examples": [
                            "1250.75"
                          ],
                          "type": "string",
                          "pattern": "^\\d+(\\.\\d+)?$"
                        }
                      },
                      "required": [
                        "mark"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "exchangeFillId",
                "cloid",
                "connector",
                "symbol",
                "price",
                "quantity",
                "side",
                "reduceOnly",
                "timestamp",
                "tradeFee",
                "builderFee",
                "liquidation"
              ]
            },
            {
              "type": "object",
              "properties": {
                "exchangeFillId": {
                  "type": "string",
                  "minLength": 1
                },
                "cloid": {
                  "type": "string"
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "price": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "reduceOnly": {
                  "type": "boolean"
                },
                "timestamp": {
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "tradeFee": {
                  "examples": [
                    "-42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "builderFee": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "liquidation": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "mark": {
                          "examples": [
                            "1250.75"
                          ],
                          "type": "string",
                          "pattern": "^\\d+(\\.\\d+)?$"
                        }
                      },
                      "required": [
                        "mark"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "exchangeFillId",
                "cloid",
                "connector",
                "symbol",
                "price",
                "quantity",
                "side",
                "reduceOnly",
                "timestamp",
                "tradeFee",
                "builderFee",
                "liquidation"
              ]
            }
          ],
          "items": {
            "type": "object",
            "properties": {
              "exchangeFillId": {
                "type": "string",
                "minLength": 1
              },
              "cloid": {
                "type": "string"
              },
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "price": {
                "examples": [
                  "1250.75"
                ],
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "quantity": {
                "examples": [
                  "1250.75"
                ],
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "side": {
                "type": "string",
                "enum": [
                  "BUY",
                  "SELL"
                ]
              },
              "reduceOnly": {
                "type": "boolean"
              },
              "timestamp": {
                "description": "Unix timestamp in milliseconds",
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "tradeFee": {
                "examples": [
                  "-42.5"
                ],
                "type": "string",
                "pattern": "^[+-]?\\d+(\\.\\d+)?$"
              },
              "builderFee": {
                "examples": [
                  "1250.75"
                ],
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "liquidation": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "mark": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "mark"
                    ]
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "exchangeFillId",
              "cloid",
              "connector",
              "symbol",
              "price",
              "quantity",
              "side",
              "reduceOnly",
              "timestamp",
              "tradeFee",
              "builderFee",
              "liquidation"
            ]
          },
          "minItems": 2
        }
      },
      "SyncFillsResponseDto_Output": {
        "type": "object",
        "properties": {},
        "additionalProperties": false
      },
      "ConfirmFillsRequestDto": {
        "type": "object",
        "propertyNames": {
          "description": "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)$",
          "examples": [
            "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          ]
        },
        "additionalProperties": {
          "type": "array",
          "prefixItems": [
            {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "confirm"
                },
                "exchangeFillId": {
                  "type": "string",
                  "minLength": 1
                },
                "cloid": {
                  "type": "string"
                },
                "positionId": {
                  "description": "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "quantity": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "timestamp": {
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "tradeFee": {
                  "examples": [
                    "-42.5"
                  ],
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "builderFee": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "type",
                "exchangeFillId",
                "cloid",
                "positionId",
                "connector",
                "symbol",
                "quantity",
                "timestamp",
                "tradeFee",
                "builderFee"
              ]
            }
          ],
          "items": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "confirm"
              },
              "exchangeFillId": {
                "type": "string",
                "minLength": 1
              },
              "cloid": {
                "type": "string"
              },
              "positionId": {
                "description": "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "quantity": {
                "examples": [
                  "1250.75"
                ],
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?$"
              },
              "timestamp": {
                "description": "Unix timestamp in milliseconds",
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "tradeFee": {
                "examples": [
                  "-42.5"
                ],
                "type": "string",
                "pattern": "^[+-]?\\d+(\\.\\d+)?$"
              },
              "builderFee": {
                "examples": [
                  "1250.75"
                ],
                "type": "string",
                "pattern": "^\\d+(\\.\\d+)?$"
              }
            },
            "required": [
              "type",
              "exchangeFillId",
              "cloid",
              "positionId",
              "connector",
              "symbol",
              "quantity",
              "timestamp",
              "tradeFee",
              "builderFee"
            ]
          },
          "minItems": 1
        }
      },
      "CreateApplicablesRequestDto": {
        "type": "object",
        "properties": {
          "applicables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "positionKey": {
                  "type": "string",
                  "minLength": 1
                },
                "exposure": {
                  "description": "final position exposure (signed, BASE units)",
                  "type": "object",
                  "propertyNames": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "additionalProperties": {
                    "examples": [
                      "+42.5"
                    ],
                    "type": "string",
                    "pattern": "^[+-]\\d+(\\.\\d+)?$"
                  }
                },
                "origin": {
                  "type": "string",
                  "enum": [
                    "PEAR",
                    "EXTERNAL",
                    "PARTIAL"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "OPEN",
                    "CLOSED"
                  ]
                },
                "closedReason": {
                  "description": "set when status is CLOSED, e.g. NETTED",
                  "type": "string",
                  "enum": [
                    "NETTED",
                    "USER",
                    "LIQUIDATED"
                  ]
                },
                "fills": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "exchangeFillId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "cloid": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "connector": {
                        "type": "string",
                        "enum": [
                          "hyperliquid",
                          "binance",
                          "bybit",
                          "okx",
                          "lighter"
                        ]
                      },
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "quantity": {
                        "examples": [
                          "1250.75"
                        ],
                        "description": "BASE units",
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "price": {
                        "examples": [
                          "1250.75"
                        ],
                        "description": "\"0\" only on an unpriceable gone-close synthetic",
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "usd": {
                        "examples": [
                          "1250.75"
                        ],
                        "description": "\"0\" only on an unpriceable gone-close synthetic",
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "timestamp": {
                        "description": "ms — apply replays in this order",
                        "type": "integer",
                        "exclusiveMinimum": 0,
                        "maximum": 9007199254740991
                      },
                      "reduceOnly": {
                        "type": "boolean"
                      },
                      "synthetic": {
                        "type": "boolean"
                      },
                      "isExternal": {
                        "type": "boolean"
                      },
                      "tradeFee": {
                        "examples": [
                          "-42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                      },
                      "builderFee": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      },
                      "closedReason": {
                        "description": "e.g. NETTED for a synthetic close fill",
                        "type": "string",
                        "enum": [
                          "NETTED",
                          "USER",
                          "LIQUIDATED"
                        ]
                      },
                      "liquidation": {
                        "anyOf": [
                          {
                            "type": "object",
                            "properties": {
                              "mark": {
                                "examples": [
                                  "1250.75"
                                ],
                                "type": "string",
                                "pattern": "^\\d+(\\.\\d+)?$"
                              }
                            },
                            "required": [
                              "mark"
                            ]
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "original": {
                        "type": "object",
                        "properties": {
                          "exchangeFillId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "quantity": {
                            "examples": [
                              "1250.75"
                            ],
                            "type": "string",
                            "pattern": "^\\d+(\\.\\d+)?$"
                          }
                        },
                        "required": [
                          "exchangeFillId",
                          "quantity"
                        ]
                      }
                    },
                    "required": [
                      "exchangeFillId",
                      "cloid",
                      "connector",
                      "symbol",
                      "side",
                      "quantity",
                      "price",
                      "usd",
                      "timestamp",
                      "reduceOnly",
                      "synthetic",
                      "isExternal",
                      "tradeFee",
                      "builderFee"
                    ]
                  }
                },
                "metadata": {
                  "type": "object",
                  "properties": {
                    "initialExposureUSD": {
                      "description": "opening cost basis from this position’s own real fills; partial map allowed",
                      "type": "object",
                      "propertyNames": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "additionalProperties": {
                        "examples": [
                          "+42.5"
                        ],
                        "type": "string",
                        "pattern": "^[+-]\\d+(\\.\\d+)?$"
                      }
                    }
                  },
                  "required": [
                    "initialExposureUSD"
                  ]
                }
              },
              "required": [
                "positionKey",
                "exposure",
                "origin",
                "status",
                "fills",
                "metadata"
              ]
            }
          },
          "exchangePositions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "size": {
                  "examples": [
                    "1250.75"
                  ],
                  "description": "BASE units, contractSize applied; always >= 0",
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "side": {
                  "description": "sign of the net position",
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "entryPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "description": "exchange-reported average entry",
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "markPrice": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "symbol",
                "size",
                "side",
                "entryPrice",
                "markPrice"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "externalMaxTs": {
                "description": "watermark advance source",
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "firstSyncStartedAt": {
                "description": "backend-issued timestamp returned before the first fill-history fetch",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "newestFillTs": {
                "description": "raw newest fetched fill — settle-gate source, never trim-advanced",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "externalMaxTs"
            ]
          }
        },
        "required": [
          "applicables",
          "exchangePositions",
          "meta"
        ]
      },
      "SyncFundingSinceRequestDto": {
        "type": "object",
        "properties": {
          "overlapMs": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "overlapMs"
        ]
      },
      "SyncFundingSinceResponseDto_Output": {
        "type": "object",
        "properties": {
          "sinceMs": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "sinceMs"
        ],
        "additionalProperties": false
      },
      "CreateFundingPaymentsRequestDto": {
        "type": "object",
        "properties": {
          "payments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "instrumentId": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "fundingRate": {
                  "examples": [
                    "-12.34"
                  ],
                  "description": "applied funding rate, optionally signed",
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "notional": {
                  "examples": [
                    "-12.34"
                  ],
                  "description": "funding amount in USD notional, optionally signed",
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "fundingPerUnit": {
                  "examples": [
                    "-12.34"
                  ],
                  "description": "signed funding per 1 unit of size (notional / szi); attribution coefficient",
                  "type": "string",
                  "pattern": "^[+-]?\\d+(\\.\\d+)?$"
                },
                "timestamp": {
                  "description": "Unix timestamp in milliseconds",
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "connector",
                "instrumentId",
                "fundingRate",
                "notional",
                "fundingPerUnit",
                "timestamp"
              ]
            }
          },
          "meta": {
            "type": "object",
            "properties": {
              "externalMaxTs": {
                "description": "watermark advance source",
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "externalMaxTs"
            ]
          }
        },
        "required": [
          "payments",
          "meta"
        ]
      },
      "TcaExecutionResponseDto_Output": {
        "type": "object",
        "properties": {
          "summary": {
            "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "executionId": {
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "tradeAccountId": {
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "executionContext": {
                "type": "object",
                "properties": {
                  "intent": {
                    "type": "string",
                    "enum": [
                      "OPEN",
                      "CLOSE",
                      "ADJUST",
                      "REVERSE"
                    ]
                  },
                  "orderType": {
                    "type": "string",
                    "enum": [
                      "MARKET"
                    ]
                  },
                  "executionStatus": {
                    "type": "string",
                    "enum": [
                      "IDLE",
                      "ACTIVE",
                      "COMPLETED",
                      "FAILED",
                      "CANCELLED"
                    ]
                  },
                  "positionId": {
                    "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "scheduleId": {
                    "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "triggerId": {
                    "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)$",
                    "examples": [
                      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                    ]
                  },
                  "legs": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "symbol": {
                          "type": "string"
                        },
                        "side": {
                          "type": "string",
                          "enum": [
                            "BUY",
                            "SELL"
                          ]
                        },
                        "reduceOnly": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "symbol",
                        "side",
                        "reduceOnly"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "intent",
                  "orderType",
                  "executionStatus",
                  "legs"
                ],
                "additionalProperties": false
              },
              "notionalQuote": {
                "type": "string"
              },
              "notionalUsd": {
                "type": "string"
              },
              "weightedSlippageBps": {
                "type": "string"
              },
              "totalSlippageUsd": {
                "type": "string"
              },
              "totalTradeFee": {
                "type": "string"
              },
              "totalPearFee": {
                "type": "string"
              },
              "totalCostUsd": {
                "type": "string"
              },
              "fillCount": {
                "type": "number"
              },
              "status": {
                "type": "string",
                "const": "FINAL"
              },
              "createdAt": {
                "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))$",
                "examples": [
                  "2026-01-15T09:30:00.000Z"
                ]
              },
              "updatedAt": {
                "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))$",
                "examples": [
                  "2026-01-15T09:30:00.000Z"
                ]
              }
            },
            "required": [
              "id",
              "executionId",
              "tradeAccountId",
              "connector",
              "fillCount",
              "status",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          },
          "fillMetrics": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "fillId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "benchmarkId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "executionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "symbol": {
                  "type": "string"
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "slippageBps": {
                  "type": "string"
                },
                "slippageQuote": {
                  "type": "string"
                },
                "slippageUsd": {
                  "type": "string"
                },
                "implementationShortfallBps": {
                  "type": "string"
                },
                "spreadCostQuote": {
                  "type": "string"
                },
                "spreadCostUsd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "totalCostUsd": {
                  "type": "string"
                },
                "gatewayLatencyMs": {
                  "type": "number"
                },
                "timeToFillMs": {
                  "type": "number"
                },
                "quoteAsset": {
                  "type": "string"
                },
                "notionalQuote": {
                  "type": "string"
                },
                "notionalUsd": {
                  "type": "string"
                },
                "submittedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "acknowledgedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "exchangeExecutedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "timingGranularity": {
                  "type": "string",
                  "enum": [
                    "BATCH",
                    "LEG"
                  ]
                },
                "status": {
                  "type": "string",
                  "const": "FINAL"
                },
                "createdAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "updatedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "benchmark": {
                  "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "executionId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "orderId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "cloid": {
                      "type": "string"
                    },
                    "legIndex": {
                      "type": "number"
                    },
                    "connector": {
                      "type": "string",
                      "enum": [
                        "hyperliquid",
                        "binance",
                        "bybit",
                        "okx",
                        "lighter"
                      ]
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "decisionPrice": {
                      "type": "string"
                    },
                    "arrivalMid": {
                      "type": "string"
                    },
                    "arrivalBid": {
                      "type": "string"
                    },
                    "arrivalAsk": {
                      "type": "string"
                    },
                    "markPrice": {
                      "type": "string"
                    },
                    "indexPrice": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "timestamp": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "quoteAsset": {
                      "type": "string"
                    },
                    "usdConversionPrice": {
                      "type": "string"
                    },
                    "createdAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "executionId",
                    "legIndex",
                    "connector",
                    "symbol",
                    "side",
                    "source",
                    "timestamp",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "fillId",
                "tradeAccountId",
                "connector",
                "symbol",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "fillMetrics"
        ],
        "additionalProperties": false
      },
      "TcaPositionResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "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))$",
            "examples": [
              "2026-01-15T09:30:00.000Z"
            ]
          },
          "fillMetrics": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "fillId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "benchmarkId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "executionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "positionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "symbol": {
                  "type": "string"
                },
                "cloid": {
                  "type": "string"
                },
                "exchangeFillId": {
                  "type": "string"
                },
                "slippageBps": {
                  "type": "string"
                },
                "slippageQuote": {
                  "type": "string"
                },
                "slippageUsd": {
                  "type": "string"
                },
                "implementationShortfallBps": {
                  "type": "string"
                },
                "spreadCostQuote": {
                  "type": "string"
                },
                "spreadCostUsd": {
                  "type": "string"
                },
                "tradeFee": {
                  "type": "string"
                },
                "pearFee": {
                  "type": "string"
                },
                "totalCostUsd": {
                  "type": "string"
                },
                "gatewayLatencyMs": {
                  "type": "number"
                },
                "timeToFillMs": {
                  "type": "number"
                },
                "quoteAsset": {
                  "type": "string"
                },
                "notionalQuote": {
                  "type": "string"
                },
                "notionalUsd": {
                  "type": "string"
                },
                "submittedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "acknowledgedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "exchangeExecutedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "timingGranularity": {
                  "type": "string",
                  "enum": [
                    "BATCH",
                    "LEG"
                  ]
                },
                "status": {
                  "type": "string",
                  "const": "FINAL"
                },
                "createdAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "updatedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "benchmark": {
                  "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "executionId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "orderId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "cloid": {
                      "type": "string"
                    },
                    "legIndex": {
                      "type": "number"
                    },
                    "connector": {
                      "type": "string",
                      "enum": [
                        "hyperliquid",
                        "binance",
                        "bybit",
                        "okx",
                        "lighter"
                      ]
                    },
                    "symbol": {
                      "type": "string"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "decisionPrice": {
                      "type": "string"
                    },
                    "arrivalMid": {
                      "type": "string"
                    },
                    "arrivalBid": {
                      "type": "string"
                    },
                    "arrivalAsk": {
                      "type": "string"
                    },
                    "markPrice": {
                      "type": "string"
                    },
                    "indexPrice": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "timestamp": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    },
                    "quoteAsset": {
                      "type": "string"
                    },
                    "usdConversionPrice": {
                      "type": "string"
                    },
                    "createdAt": {
                      "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))$",
                      "examples": [
                        "2026-01-15T09:30:00.000Z"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "executionId",
                    "legIndex",
                    "connector",
                    "symbol",
                    "side",
                    "source",
                    "timestamp",
                    "createdAt"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "id",
                "fillId",
                "tradeAccountId",
                "connector",
                "symbol",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "limit",
          "fillMetrics"
        ],
        "additionalProperties": false
      },
      "TcaSummaryResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "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))$",
            "examples": [
              "2026-01-15T09:30:00.000Z"
            ]
          },
          "summaries": {
            "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "executionId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "tradeAccountId": {
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "connector": {
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "executionContext": {
                  "type": "object",
                  "properties": {
                    "intent": {
                      "type": "string",
                      "enum": [
                        "OPEN",
                        "CLOSE",
                        "ADJUST",
                        "REVERSE"
                      ]
                    },
                    "orderType": {
                      "type": "string",
                      "enum": [
                        "MARKET"
                      ]
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "IDLE",
                        "ACTIVE",
                        "COMPLETED",
                        "FAILED",
                        "CANCELLED"
                      ]
                    },
                    "positionId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "scheduleId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "triggerId": {
                      "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)$",
                      "examples": [
                        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                      ]
                    },
                    "legs": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string"
                          },
                          "side": {
                            "type": "string",
                            "enum": [
                              "BUY",
                              "SELL"
                            ]
                          },
                          "reduceOnly": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "symbol",
                          "side",
                          "reduceOnly"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "intent",
                    "orderType",
                    "executionStatus",
                    "legs"
                  ],
                  "additionalProperties": false
                },
                "notionalQuote": {
                  "type": "string"
                },
                "notionalUsd": {
                  "type": "string"
                },
                "weightedSlippageBps": {
                  "type": "string"
                },
                "totalSlippageUsd": {
                  "type": "string"
                },
                "totalTradeFee": {
                  "type": "string"
                },
                "totalPearFee": {
                  "type": "string"
                },
                "totalCostUsd": {
                  "type": "string"
                },
                "fillCount": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "const": "FINAL"
                },
                "createdAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                },
                "updatedAt": {
                  "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))$",
                  "examples": [
                    "2026-01-15T09:30:00.000Z"
                  ]
                }
              },
              "required": [
                "id",
                "executionId",
                "tradeAccountId",
                "connector",
                "fillCount",
                "status",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          },
          "totals": {
            "type": "object",
            "properties": {
              "executionCount": {
                "type": "number"
              },
              "fillCount": {
                "type": "number"
              },
              "notionalQuote": {
                "type": "string"
              },
              "notionalUsd": {
                "type": "string"
              },
              "weightedSlippageBps": {
                "type": "string"
              },
              "totalSlippageUsd": {
                "type": "string"
              },
              "totalTradeFee": {
                "type": "string"
              },
              "totalPearFee": {
                "type": "string"
              },
              "totalCostUsd": {
                "type": "string"
              }
            },
            "required": [
              "executionCount",
              "fillCount"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "limit",
          "summaries",
          "totals"
        ],
        "additionalProperties": false
      },
      "TradeAccountListResponseDto_Output": {
        "type": "object",
        "properties": {
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "description": "Trade account UUID",
                  "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)$",
                  "examples": [
                    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                  ]
                },
                "alias": {
                  "description": "User-defined trade account alias",
                  "type": "string"
                },
                "connector": {
                  "description": "Exchange connector type",
                  "type": "string",
                  "enum": [
                    "hyperliquid",
                    "binance",
                    "bybit",
                    "okx",
                    "lighter"
                  ]
                },
                "exchangeIdentifier": {
                  "description": "User identifier on the exchange",
                  "type": "string"
                },
                "metadata": {
                  "description": "Connector-specific metadata",
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "agentWalletAddress": {
                          "type": "string"
                        },
                        "isSubaccount": {
                          "type": "boolean"
                        },
                        "mainAccountAddress": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "agentWalletAddress",
                        "isSubaccount",
                        "mainAccountAddress"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "l1_address": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "l1_address"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "createdAt": {
                  "description": "Creation timestamp (ISO 8601)",
                  "type": "string"
                },
                "updatedAt": {
                  "description": "Last update timestamp (ISO 8601)",
                  "type": "string"
                },
                "deletedAt": {
                  "description": "Deletion timestamp (ISO 8601)",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "alias",
                "connector",
                "exchangeIdentifier",
                "createdAt",
                "updatedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "accounts"
        ],
        "additionalProperties": false
      },
      "CreateHyperliquidAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "hyperliquid"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "exchangeIdentifier": {
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "credentials": {
            "type": "object",
            "properties": {
              "signer_key": {
                "examples": [
                  "0xdeadbeef"
                ],
                "type": "string",
                "minLength": 2,
                "pattern": "^0x[a-fA-F0-9]+$"
              }
            },
            "required": [
              "signer_key"
            ]
          },
          "metadata": {
            "type": "object",
            "properties": {
              "agentWalletAddress": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              },
              "isSubaccount": {
                "type": "boolean"
              },
              "mainAccountAddress": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              }
            },
            "required": [
              "agentWalletAddress",
              "isSubaccount",
              "mainAccountAddress"
            ]
          }
        },
        "required": [
          "connector",
          "alias",
          "exchangeIdentifier",
          "credentials",
          "metadata"
        ]
      },
      "CreateBinanceAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "binance"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "read": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string",
                    "minLength": 1
                  },
                  "api_secret": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              },
              "write": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string",
                    "minLength": 1
                  },
                  "api_secret": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              }
            },
            "required": [
              "read",
              "write"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector",
          "alias",
          "credentials"
        ]
      },
      "CreateBybitAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "bybit"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string",
                "minLength": 1
              },
              "api_secret": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "api_key",
              "api_secret"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector",
          "alias",
          "credentials"
        ]
      },
      "CreateOkxAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "okx"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string",
                "minLength": 1
              },
              "api_secret": {
                "type": "string",
                "minLength": 1
              },
              "api_pass": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "api_key",
              "api_secret",
              "api_pass"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector",
          "alias",
          "credentials"
        ]
      },
      "CreateLighterAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "lighter"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "exchangeIdentifier": {
            "examples": [
              "123456"
            ],
            "type": "string",
            "pattern": "^\\d+$"
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_private_key": {
                "type": "string",
                "minLength": 1
              },
              "api_key_index": {
                "type": "integer",
                "minimum": 4,
                "maximum": 254
              }
            },
            "required": [
              "api_private_key",
              "api_key_index"
            ]
          },
          "metadata": {
            "type": "object",
            "properties": {
              "l1_address": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              }
            },
            "required": [
              "l1_address"
            ]
          }
        },
        "required": [
          "connector",
          "alias",
          "exchangeIdentifier",
          "credentials",
          "metadata"
        ]
      },
      "CreateTradeAccountDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateHyperliquidAccount"
          },
          {
            "$ref": "#/components/schemas/CreateBinanceAccount"
          },
          {
            "$ref": "#/components/schemas/CreateBybitAccount"
          },
          {
            "$ref": "#/components/schemas/CreateOkxAccount"
          },
          {
            "$ref": "#/components/schemas/CreateLighterAccount"
          }
        ],
        "discriminator": {
          "propertyName": "connector",
          "mapping": {
            "hyperliquid": "#/components/schemas/CreateHyperliquidAccount",
            "binance": "#/components/schemas/CreateBinanceAccount",
            "bybit": "#/components/schemas/CreateBybitAccount",
            "okx": "#/components/schemas/CreateOkxAccount",
            "lighter": "#/components/schemas/CreateLighterAccount"
          }
        }
      },
      "TradeAccountResponseDto_Output": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ],
                    "additionalProperties": false
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "account"
        ],
        "additionalProperties": false
      },
      "UpdateHyperliquidAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "hyperliquid"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "signer_key": {
                "examples": [
                  "0xdeadbeef"
                ],
                "type": "string",
                "minLength": 2,
                "pattern": "^0x[a-fA-F0-9]+$"
              }
            },
            "required": [
              "signer_key"
            ]
          },
          "metadata": {
            "type": "object",
            "properties": {
              "agentWalletAddress": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              },
              "isSubaccount": {
                "type": "boolean"
              },
              "mainAccountAddress": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              }
            },
            "required": [
              "agentWalletAddress",
              "isSubaccount",
              "mainAccountAddress"
            ]
          }
        },
        "required": [
          "connector"
        ]
      },
      "UpdateBinanceAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "binance"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "read": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string",
                    "minLength": 1
                  },
                  "api_secret": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              },
              "write": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string",
                    "minLength": 1
                  },
                  "api_secret": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              }
            },
            "required": [
              "read",
              "write"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector"
        ]
      },
      "UpdateBybitAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "bybit"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string",
                "minLength": 1
              },
              "api_secret": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "api_key",
              "api_secret"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector"
        ]
      },
      "UpdateOkxAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "okx"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string",
                "minLength": 1
              },
              "api_secret": {
                "type": "string",
                "minLength": 1
              },
              "api_pass": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "api_key",
              "api_secret",
              "api_pass"
            ]
          },
          "metadata": {
            "not": {}
          }
        },
        "required": [
          "connector"
        ]
      },
      "UpdateLighterAccount": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "lighter"
          },
          "alias": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_private_key": {
                "type": "string",
                "minLength": 1
              },
              "api_key_index": {
                "type": "integer",
                "minimum": 4,
                "maximum": 254
              }
            },
            "required": [
              "api_private_key",
              "api_key_index"
            ]
          },
          "metadata": {
            "type": "object",
            "properties": {
              "l1_address": {
                "examples": [
                  "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
                ],
                "type": "string",
                "pattern": "^0x[a-fA-F0-9]{40}$"
              }
            },
            "required": [
              "l1_address"
            ]
          }
        },
        "required": [
          "connector"
        ]
      },
      "UpdateTradeAccountDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/UpdateHyperliquidAccount"
          },
          {
            "$ref": "#/components/schemas/UpdateBinanceAccount"
          },
          {
            "$ref": "#/components/schemas/UpdateBybitAccount"
          },
          {
            "$ref": "#/components/schemas/UpdateOkxAccount"
          },
          {
            "$ref": "#/components/schemas/UpdateLighterAccount"
          }
        ],
        "discriminator": {
          "propertyName": "connector",
          "mapping": {
            "hyperliquid": "#/components/schemas/UpdateHyperliquidAccount",
            "binance": "#/components/schemas/UpdateBinanceAccount",
            "bybit": "#/components/schemas/UpdateBybitAccount",
            "okx": "#/components/schemas/UpdateOkxAccount",
            "lighter": "#/components/schemas/UpdateLighterAccount"
          }
        }
      },
      "HyperliquidCredentialsResponse": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "hyperliquid"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ]
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ]
          },
          "credentials": {
            "type": "object",
            "properties": {
              "signer_key": {
                "type": "string"
              }
            },
            "required": [
              "signer_key"
            ]
          }
        },
        "required": [
          "connector",
          "account",
          "credentials"
        ]
      },
      "BinanceCredentialsResponse": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "binance"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ]
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ]
          },
          "credentials": {
            "type": "object",
            "properties": {
              "read": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string"
                  },
                  "api_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              },
              "write": {
                "type": "object",
                "properties": {
                  "api_key": {
                    "type": "string"
                  },
                  "api_secret": {
                    "type": "string"
                  }
                },
                "required": [
                  "api_key",
                  "api_secret"
                ]
              }
            },
            "required": [
              "read",
              "write"
            ]
          }
        },
        "required": [
          "connector",
          "account",
          "credentials"
        ]
      },
      "BybitCredentialsResponse": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "bybit"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ]
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ]
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string"
              },
              "api_secret": {
                "type": "string"
              }
            },
            "required": [
              "api_key",
              "api_secret"
            ]
          }
        },
        "required": [
          "connector",
          "account",
          "credentials"
        ]
      },
      "OkxCredentialsResponse": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "okx"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ]
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ]
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_key": {
                "type": "string"
              },
              "api_secret": {
                "type": "string"
              },
              "api_pass": {
                "type": "string"
              }
            },
            "required": [
              "api_key",
              "api_secret",
              "api_pass"
            ]
          }
        },
        "required": [
          "connector",
          "account",
          "credentials"
        ]
      },
      "LighterCredentialsResponse": {
        "type": "object",
        "properties": {
          "connector": {
            "type": "string",
            "const": "lighter"
          },
          "account": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Trade account UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "alias": {
                "description": "User-defined trade account alias",
                "type": "string"
              },
              "connector": {
                "description": "Exchange connector type",
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "exchangeIdentifier": {
                "description": "User identifier on the exchange",
                "type": "string"
              },
              "metadata": {
                "description": "Connector-specific metadata",
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "agentWalletAddress": {
                        "type": "string"
                      },
                      "isSubaccount": {
                        "type": "boolean"
                      },
                      "mainAccountAddress": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "agentWalletAddress",
                      "isSubaccount",
                      "mainAccountAddress"
                    ]
                  },
                  {
                    "type": "object",
                    "properties": {
                      "l1_address": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "l1_address"
                    ]
                  }
                ]
              },
              "createdAt": {
                "description": "Creation timestamp (ISO 8601)",
                "type": "string"
              },
              "updatedAt": {
                "description": "Last update timestamp (ISO 8601)",
                "type": "string"
              },
              "deletedAt": {
                "description": "Deletion timestamp (ISO 8601)",
                "type": "string"
              }
            },
            "required": [
              "id",
              "alias",
              "connector",
              "exchangeIdentifier",
              "createdAt",
              "updatedAt"
            ]
          },
          "credentials": {
            "type": "object",
            "properties": {
              "api_private_key": {
                "type": "string"
              },
              "api_key_index": {
                "type": "number"
              }
            },
            "required": [
              "api_private_key",
              "api_key_index"
            ]
          }
        },
        "required": [
          "connector",
          "account",
          "credentials"
        ]
      },
      "ExchangeCredentialsResponseDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/HyperliquidCredentialsResponse"
          },
          {
            "$ref": "#/components/schemas/BinanceCredentialsResponse"
          },
          {
            "$ref": "#/components/schemas/BybitCredentialsResponse"
          },
          {
            "$ref": "#/components/schemas/OkxCredentialsResponse"
          },
          {
            "$ref": "#/components/schemas/LighterCredentialsResponse"
          }
        ],
        "discriminator": {
          "propertyName": "connector",
          "mapping": {
            "hyperliquid": "#/components/schemas/HyperliquidCredentialsResponse",
            "binance": "#/components/schemas/BinanceCredentialsResponse",
            "bybit": "#/components/schemas/BybitCredentialsResponse",
            "okx": "#/components/schemas/OkxCredentialsResponse",
            "lighter": "#/components/schemas/LighterCredentialsResponse"
          }
        }
      },
      "CreateMarketOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "legs": {
            "description": "Array of legs to make up the exposure. At least one leg is required. Each leg must name a distinct symbol.",
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "QUANTITY",
                      "USD"
                    ]
                  },
                  "amount": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "mode",
                  "amount"
                ]
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "QUANTITY",
                    "USD"
                  ]
                },
                "amount": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                }
              },
              "required": [
                "symbol",
                "side",
                "mode",
                "amount"
              ]
            },
            "minItems": 1
          },
          "trigger": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic"
              },
              {
                "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing"
              }
            ]
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "type",
          "legs"
        ]
      },
      "CreateTradeOpenDto": {
        "$ref": "#/components/schemas/CreateMarketOpen"
      },
      "TradeOpenResponseDto_Output": {
        "type": "object",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/MarketExecution_Output"
          }
        },
        "required": [
          "execution"
        ],
        "additionalProperties": false
      },
      "CreateMarketAdjust": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "legs": {
            "description": "Array of legs to modify the position. At least one leg is required. Each leg must name a distinct symbol.",
            "type": "array",
            "prefixItems": [
              {
                "type": "object",
                "properties": {
                  "symbol": {
                    "examples": [
                      "BTC"
                    ],
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 64,
                    "pattern": "^[^\\s][^\\s]*$"
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "BUY",
                      "SELL"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "QUANTITY",
                      "USD"
                    ]
                  },
                  "amount": {
                    "examples": [
                      "1250.75"
                    ],
                    "type": "string",
                    "pattern": "^\\d+(\\.\\d+)?$"
                  },
                  "reduceOnly": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "symbol",
                  "side",
                  "mode",
                  "amount",
                  "reduceOnly"
                ]
              }
            ],
            "items": {
              "type": "object",
              "properties": {
                "symbol": {
                  "examples": [
                    "BTC"
                  ],
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 64,
                  "pattern": "^[^\\s][^\\s]*$"
                },
                "side": {
                  "type": "string",
                  "enum": [
                    "BUY",
                    "SELL"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "QUANTITY",
                    "USD"
                  ]
                },
                "amount": {
                  "examples": [
                    "1250.75"
                  ],
                  "type": "string",
                  "pattern": "^\\d+(\\.\\d+)?$"
                },
                "reduceOnly": {
                  "type": "boolean"
                }
              },
              "required": [
                "symbol",
                "side",
                "mode",
                "amount",
                "reduceOnly"
              ]
            },
            "minItems": 1
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "type",
          "legs"
        ]
      },
      "CreateTradeAdjustDto": {
        "$ref": "#/components/schemas/CreateMarketAdjust"
      },
      "TradeAdjustResponseDto_Output": {
        "type": "object",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/MarketExecution_Output"
          }
        },
        "required": [
          "execution"
        ],
        "additionalProperties": false
      },
      "CreateMarketClose": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "type"
        ]
      },
      "CreateTradeCloseDto": {
        "$ref": "#/components/schemas/CreateMarketClose"
      },
      "TradeCloseResponseDto_Output": {
        "type": "object",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/MarketExecution_Output"
          }
        },
        "required": [
          "execution"
        ],
        "additionalProperties": false
      },
      "CreateMarketReverse": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "type"
        ]
      },
      "CreateTradeReverseDto": {
        "$ref": "#/components/schemas/CreateMarketReverse"
      },
      "TradeReverseResponseDto_Output": {
        "type": "object",
        "properties": {
          "execution": {
            "$ref": "#/components/schemas/MarketExecution_Output"
          }
        },
        "required": [
          "execution"
        ],
        "additionalProperties": false
      },
      "CreateMarketCloseAll": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "type"
        ]
      },
      "TradeCloseAllResponseDto_Output": {
        "type": "object",
        "properties": {
          "executions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketExecution_Output"
            }
          }
        },
        "required": [
          "executions"
        ],
        "additionalProperties": false
      },
      "CreateTriggerMarketOpen": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "OPEN"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatioOpen"
              },
              {
                "$ref": "#/components/schemas/PriceOpen"
              },
              {
                "$ref": "#/components/schemas/WeightedRatioOpen"
              },
              {
                "$ref": "#/components/schemas/FundingRateOpen"
              },
              {
                "$ref": "#/components/schemas/PredictionMarketOpen"
              },
              {
                "$ref": "#/components/schemas/BtcDominanceOpen"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/RatioOpen",
                "price": "#/components/schemas/PriceOpen",
                "weighted_ratio": "#/components/schemas/WeightedRatioOpen",
                "funding_rate": "#/components/schemas/FundingRateOpen",
                "prediction_market": "#/components/schemas/PredictionMarketOpen",
                "btc_dominance": "#/components/schemas/BtcDominanceOpen"
              }
            }
          },
          "attachTriggers": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/AttachTriggerMarketCloseStatic"
                },
                {
                  "$ref": "#/components/schemas/AttachTriggerMarketCloseTrailing"
                }
              ]
            }
          },
          "payload": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "legs": {
                "description": "Array of legs to make up the exposure. At least one leg is required. Each leg must name a distinct symbol.",
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "QUANTITY",
                          "USD"
                        ]
                      },
                      "amount": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "mode",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "QUANTITY",
                        "USD"
                      ]
                    },
                    "amount": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "mode",
                    "amount"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              }
            },
            "required": [
              "type",
              "legs"
            ],
            "additionalProperties": false
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "intent",
          "type",
          "condition",
          "payload"
        ],
        "additionalProperties": false
      },
      "RatioOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "PriceOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "symbol",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "WeightedRatioOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "description": "At least two legs are required. Each leg must name a distinct symbol. Leg weights must sum to exactly 1.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ]
                }
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "basket",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "FundingRateOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "funding_rate"
          },
          "data": {
            "type": "object",
            "properties": {
              "connector": {
                "type": "string",
                "enum": [
                  "hyperliquid",
                  "binance",
                  "bybit",
                  "okx",
                  "lighter"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number"
              }
            },
            "required": [
              "connector",
              "symbol",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "PredictionMarketOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "prediction_market"
          },
          "data": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "kalshi",
                  "polymarket"
                ]
              },
              "marketKey": {
                "type": "string",
                "minLength": 1
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "source",
              "marketKey",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "BtcDominanceOpen": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "btc_dominance"
          },
          "data": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "const": "coingecko"
              },
              "track": {
                "type": "string",
                "enum": [
                  "PEAK",
                  "TROUGH"
                ]
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "source",
              "track",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "CreateTriggerMarketAdjust": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "ADJUST"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatioOpen"
              },
              {
                "$ref": "#/components/schemas/PriceOpen"
              },
              {
                "$ref": "#/components/schemas/WeightedRatioOpen"
              },
              {
                "$ref": "#/components/schemas/FundingRateOpen"
              },
              {
                "$ref": "#/components/schemas/PredictionMarketOpen"
              },
              {
                "$ref": "#/components/schemas/BtcDominanceOpen"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/RatioOpen",
                "price": "#/components/schemas/PriceOpen",
                "weighted_ratio": "#/components/schemas/WeightedRatioOpen",
                "funding_rate": "#/components/schemas/FundingRateOpen",
                "prediction_market": "#/components/schemas/PredictionMarketOpen",
                "btc_dominance": "#/components/schemas/BtcDominanceOpen"
              }
            }
          },
          "payload": {
            "type": "object",
            "properties": {
              "type": {
                "type": "string",
                "const": "MARKET"
              },
              "legs": {
                "description": "Array of legs to make up the exposure. At least one leg is required. Each leg must name a distinct symbol.",
                "type": "array",
                "prefixItems": [
                  {
                    "type": "object",
                    "properties": {
                      "symbol": {
                        "examples": [
                          "BTC"
                        ],
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64,
                        "pattern": "^[^\\s][^\\s]*$"
                      },
                      "side": {
                        "type": "string",
                        "enum": [
                          "BUY",
                          "SELL"
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "QUANTITY",
                          "USD"
                        ]
                      },
                      "amount": {
                        "examples": [
                          "1250.75"
                        ],
                        "type": "string",
                        "pattern": "^\\d+(\\.\\d+)?$"
                      }
                    },
                    "required": [
                      "symbol",
                      "side",
                      "mode",
                      "amount"
                    ],
                    "additionalProperties": false
                  }
                ],
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "mode": {
                      "type": "string",
                      "enum": [
                        "QUANTITY",
                        "USD"
                      ]
                    },
                    "amount": {
                      "examples": [
                        "1250.75"
                      ],
                      "type": "string",
                      "pattern": "^\\d+(\\.\\d+)?$"
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "mode",
                    "amount"
                  ],
                  "additionalProperties": false
                },
                "minItems": 1
              }
            },
            "required": [
              "type",
              "legs"
            ],
            "additionalProperties": false
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "intent",
          "type",
          "positionId",
          "condition",
          "payload"
        ],
        "additionalProperties": false
      },
      "CreateTriggerOpenDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/CreateTriggerMarketOpen"
          },
          {
            "$ref": "#/components/schemas/CreateTriggerMarketAdjust"
          }
        ],
        "discriminator": {
          "propertyName": "intent",
          "mapping": {
            "OPEN": "#/components/schemas/CreateTriggerMarketOpen",
            "ADJUST": "#/components/schemas/CreateTriggerMarketAdjust"
          }
        }
      },
      "CreateTriggerResponseDto_Output": {
        "type": "object",
        "properties": {
          "trigger": {
            "$ref": "#/components/schemas/TriggerMarket_Output"
          }
        },
        "required": [
          "trigger"
        ],
        "additionalProperties": false
      },
      "CreateTriggerMarketCloseStatic": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "bracketType": {
            "type": "string",
            "enum": [
              "STOP_LOSS",
              "TAKE_PROFIT",
              "NONE"
            ]
          },
          "semanticBracketType": {
            "type": "string",
            "enum": [
              "TAKE_PROFIT",
              "STOP_LOSS"
            ]
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatioCloseStatic"
              },
              {
                "$ref": "#/components/schemas/PriceCloseStatic"
              },
              {
                "$ref": "#/components/schemas/WeightedRatioCloseStatic"
              },
              {
                "$ref": "#/components/schemas/NotionalCloseStatic"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseStatic"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseStatic"
              },
              {
                "$ref": "#/components/schemas/PredictionMarketCloseStatic"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio": "#/components/schemas/RatioCloseStatic",
                "price": "#/components/schemas/PriceCloseStatic",
                "weighted_ratio": "#/components/schemas/WeightedRatioCloseStatic",
                "notional": "#/components/schemas/NotionalCloseStatic",
                "upnl": "#/components/schemas/UpnlCloseStatic",
                "upnl_bps": "#/components/schemas/UpnlBpsCloseStatic",
                "prediction_market": "#/components/schemas/PredictionMarketCloseStatic"
              }
            }
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "intent",
          "type",
          "positionId",
          "bracketType",
          "condition"
        ]
      },
      "RatioCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "PriceCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "symbol",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "WeightedRatioCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "description": "At least two legs are required. Each leg must name a distinct symbol. Leg weights must sum to exactly 1.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ]
                }
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "priceSource",
              "basket",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "PredictionMarketCloseStatic": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "prediction_market"
          },
          "data": {
            "type": "object",
            "properties": {
              "source": {
                "type": "string",
                "enum": [
                  "kalshi",
                  "polymarket"
                ]
              },
              "marketKey": {
                "type": "string",
                "minLength": 1
              },
              "threshold": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "source",
              "marketKey",
              "threshold"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "CreateTriggerMarketCloseTrailing": {
        "type": "object",
        "properties": {
          "intent": {
            "type": "string",
            "const": "CLOSE"
          },
          "type": {
            "type": "string",
            "const": "MARKET"
          },
          "positionId": {
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "condition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RatioCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/PriceCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/WeightedRatioCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/NotionalCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/UpnlCloseTrailing"
              },
              {
                "$ref": "#/components/schemas/UpnlBpsCloseTrailing"
              }
            ],
            "discriminator": {
              "propertyName": "type",
              "mapping": {
                "ratio_trailing": "#/components/schemas/RatioCloseTrailing",
                "price_trailing": "#/components/schemas/PriceCloseTrailing",
                "weighted_ratio_trailing": "#/components/schemas/WeightedRatioCloseTrailing",
                "notional_trailing": "#/components/schemas/NotionalCloseTrailing",
                "upnl_trailing": "#/components/schemas/UpnlCloseTrailing",
                "upnl_bps_trailing": "#/components/schemas/UpnlBpsCloseTrailing"
              }
            }
          },
          "trailing": {
            "type": "object",
            "properties": {
              "mode": {
                "type": "string",
                "enum": [
                  "RELATIVE_BPS",
                  "ABSOLUTE_POINTS"
                ]
              },
              "deltaValue": {
                "type": "number"
              },
              "activationValue": {
                "type": "number"
              }
            },
            "required": [
              "mode",
              "deltaValue"
            ]
          },
          "clientId": {
            "description": "Attribution route code (client_ids.code)",
            "examples": [
              "pear-web"
            ],
            "type": "string",
            "minLength": 1,
            "maxLength": 64
          }
        },
        "required": [
          "intent",
          "type",
          "positionId",
          "condition",
          "trailing"
        ]
      },
      "RatioCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "ratio_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol_a": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              },
              "symbol_b": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              }
            },
            "required": [
              "priceSource",
              "symbol_a",
              "symbol_b"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "PriceCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "price_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "symbol": {
                "examples": [
                  "BTC"
                ],
                "type": "string",
                "minLength": 1,
                "maxLength": 64,
                "pattern": "^[^\\s][^\\s]*$"
              }
            },
            "required": [
              "priceSource",
              "symbol"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "WeightedRatioCloseTrailing": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "weighted_ratio_trailing"
          },
          "data": {
            "type": "object",
            "properties": {
              "priceSource": {
                "type": "string",
                "enum": [
                  "mid",
                  "mark"
                ]
              },
              "basket": {
                "description": "At least two legs are required. Each leg must name a distinct symbol. Leg weights must sum to exactly 1.",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "examples": [
                        "BTC"
                      ],
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 64,
                      "pattern": "^[^\\s][^\\s]*$"
                    },
                    "side": {
                      "type": "string",
                      "enum": [
                        "BUY",
                        "SELL"
                      ]
                    },
                    "weight": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "symbol",
                    "side",
                    "weight"
                  ]
                }
              }
            },
            "required": [
              "priceSource",
              "basket"
            ]
          }
        },
        "required": [
          "type",
          "data"
        ]
      },
      "CreateTriggerCloseDto": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CreateTriggerMarketCloseStatic"
          },
          {
            "$ref": "#/components/schemas/CreateTriggerMarketCloseTrailing"
          }
        ]
      },
      "ListTriggersResponseDto_Output": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "nextCursor": {
            "type": "string"
          },
          "triggers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TriggerMarket_Output"
            }
          }
        },
        "required": [
          "limit",
          "triggers"
        ],
        "additionalProperties": false
      },
      "CancelTriggerResponseDto_Output": {
        "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "CancelAllTriggersResponseDto_Output": {
        "type": "object",
        "properties": {
          "ids": {
            "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)$",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          }
        },
        "required": [
          "ids"
        ],
        "additionalProperties": false
      },
      "OracleTriggerResponseDto_Output": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "enum": [
              "btcdom"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "coingecko"
            ]
          },
          "oracle": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "value": {
                    "type": "number"
                  },
                  "unit": {
                    "type": "string",
                    "enum": [
                      "cent",
                      "percent"
                    ]
                  }
                },
                "required": [
                  "value",
                  "unit"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "category",
          "source",
          "oracle"
        ],
        "additionalProperties": false
      },
      "ProfileResponseDto_Output": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "description": "User profile of the authenticated user",
            "properties": {
              "id": {
                "description": "User UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "displayName": {
                "description": "Public display name",
                "type": "string"
              },
              "role": {
                "description": "User role",
                "type": "string",
                "enum": [
                  "basic",
                  "pro"
                ]
              },
              "address": {
                "description": "Linked wallet address (for evm_wallet provider)",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "email": {
                "description": "Linked email address (for email provider)",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "emailVerified": {
                "description": "Whether the email is verified",
                "type": "boolean"
              },
              "xHandle": {
                "description": "Linked X handle, without the leading \"@\" (for x provider)",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "xName": {
                "description": "Linked X display name",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "xAvatarUrl": {
                "description": "Linked X avatar URL",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "xHidden": {
                "description": "Whether the leaderboard withholds the linked X account",
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "displayName",
              "role",
              "address",
              "email",
              "emailVerified",
              "xHandle",
              "xName",
              "xAvatarUrl",
              "xHidden"
            ],
            "additionalProperties": false
          },
          "preferences": {
            "type": "object",
            "description": "User preferences",
            "properties": {
              "slippageToleranceBps": {
                "description": "User slippage preference in basis points",
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "slippageToleranceBps"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "profile",
          "preferences"
        ],
        "additionalProperties": false
      },
      "UpdateUserDisplayNameDto": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "minLength": 1,
            "maxLength": 40
          }
        },
        "required": [
          "displayName"
        ],
        "description": "Payload to update user display name"
      },
      "UpdateUserDisplayNameResponseDto_Output": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Updated user display name"
          }
        },
        "required": [
          "displayName"
        ],
        "additionalProperties": false
      },
      "UpdateUserPreferencesDto": {
        "type": "object",
        "properties": {
          "slippageToleranceBps": {
            "description": "User slippage preference in basis points",
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          }
        },
        "description": "Payload to update user preferences"
      },
      "UpdateUserPreferencesResponseDto_Output": {
        "type": "object",
        "properties": {
          "preferences": {
            "type": "object",
            "description": "User preferences",
            "properties": {
              "slippageToleranceBps": {
                "description": "User slippage preference in basis points",
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "slippageToleranceBps"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "preferences"
        ],
        "additionalProperties": false
      },
      "FeeResponseDto_Output": {
        "type": "object",
        "properties": {
          "feeRecipient": {
            "type": "string"
          },
          "baseBps": {
            "type": "string",
            "examples": [
              "3.5"
            ],
            "pattern": "^\\d{1,2}(\\.\\d)?$"
          },
          "overrideBps": {
            "type": "string",
            "examples": [
              "3.5"
            ],
            "pattern": "^\\d{1,2}(\\.\\d)?$"
          },
          "overrideScope": {
            "type": "string",
            "enum": [
              "user",
              "client_id"
            ]
          },
          "discounts": {
            "type": "array",
            "items": {
              "description": "A discount applied to the quoted fee",
              "type": "object",
              "properties": {
                "scope": {
                  "type": "string",
                  "enum": [
                    "user",
                    "client_id",
                    "connector",
                    "all"
                  ]
                },
                "rate": {
                  "examples": [
                    "0.2"
                  ],
                  "type": "string",
                  "pattern": "^(0(\\.\\d{1,4})?|1(\\.0{1,4})?)$"
                }
              },
              "required": [
                "scope",
                "rate"
              ],
              "additionalProperties": false
            }
          },
          "finalBps": {
            "type": "string",
            "examples": [
              "3.5"
            ],
            "pattern": "^\\d{1,2}(\\.\\d)?$"
          }
        },
        "required": [
          "baseBps",
          "discounts",
          "finalBps"
        ],
        "description": "Resolved trading fee and connector fee recipient for the caller's trade account",
        "additionalProperties": false
      },
      "FeeRecipientResponseDto_Output": {
        "type": "object",
        "properties": {
          "recipient": {
            "type": "string"
          }
        },
        "description": "Connector-native fee recipient to approve for the caller's role",
        "additionalProperties": false
      },
      "LinkEmailRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "description": "Email address (lowercase)",
            "examples": [
              "trader@example.com"
            ],
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "email"
        ],
        "description": "Link email credentials to the authenticated account"
      },
      "LinkWalletRequestDto": {
        "type": "object",
        "properties": {
          "address": {
            "description": "Ethereum wallet address (0x-prefixed, 40 hex chars, lowercase)",
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "signature": {
            "description": "Signature of the nonce message",
            "type": "string",
            "minLength": 1
          },
          "nonce": {
            "description": "Nonce of the signed challenge, as returned by the nonce endpoint",
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          }
        },
        "required": [
          "address",
          "signature"
        ],
        "description": "Link wallet credentials to the authenticated account"
      },
      "StartXLinkRequestDto": {
        "type": "object",
        "properties": {
          "returnTo": {
            "description": "Page to send the browser back to once the link finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin.",
            "type": "string"
          }
        },
        "description": "Start of the X account link flow"
      },
      "StartXLinkResponseDto_Output": {
        "type": "object",
        "properties": {
          "authorizeUrl": {
            "type": "string",
            "description": "X authorization URL to send the browser to. Expires with the flow's state."
          }
        },
        "required": [
          "authorizeUrl"
        ],
        "description": "Start of the X account link flow",
        "additionalProperties": false
      },
      "SetXVisibilityRequestDto": {
        "type": "object",
        "properties": {
          "xHidden": {
            "description": "True to withhold the linked X account from the leaderboard, false to publish it. The wanted state rather than a flip, so a retry lands on the same result and two tabs cannot disagree. Named to match `xHidden` on the user profile - one name for one value.",
            "type": "boolean"
          }
        },
        "required": [
          "xHidden"
        ],
        "description": "Leaderboard visibility of the X account"
      },
      "SetXVisibilityResponseDto_Output": {
        "type": "object",
        "properties": {
          "xHidden": {
            "type": "boolean",
            "description": "The stored state, read back from the write: true when the leaderboard withholds the X account. A confirmation of what was asked for, not a value the caller could not otherwise know."
          }
        },
        "required": [
          "xHidden"
        ],
        "description": "Leaderboard visibility of the X account after the write",
        "additionalProperties": false
      },
      "WalletLoginRequest": {
        "description": "Wallet-based authentication using nonce signature",
        "type": "object",
        "properties": {
          "method": {
            "description": "Must be \"wallet\" for wallet authentication",
            "type": "string",
            "const": "wallet"
          },
          "address": {
            "description": "Ethereum wallet address (0x-prefixed, 40 hex chars, lowercase)",
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          },
          "signature": {
            "description": "Signature of the nonce message",
            "type": "string",
            "minLength": 1
          },
          "nonce": {
            "description": "Nonce of the signed challenge, as returned by the nonce endpoint",
            "type": "string",
            "minLength": 1,
            "maxLength": 128
          },
          "accessCode": {
            "description": "Optional beta access code",
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "method",
          "address",
          "signature"
        ]
      },
      "EmailLoginRequest": {
        "description": "Email-based authentication using email and password",
        "type": "object",
        "properties": {
          "method": {
            "description": "Must be \"email\" for email authentication",
            "type": "string",
            "const": "email"
          },
          "email": {
            "description": "Email address (lowercase)",
            "examples": [
              "trader@example.com"
            ],
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "password": {
            "description": "Password for authentication",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        },
        "required": [
          "method",
          "email",
          "password"
        ]
      },
      "LoginRequestDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/WalletLoginRequest"
          },
          {
            "$ref": "#/components/schemas/EmailLoginRequest"
          }
        ],
        "discriminator": {
          "propertyName": "method",
          "mapping": {
            "wallet": "#/components/schemas/WalletLoginRequest",
            "email": "#/components/schemas/EmailLoginRequest"
          }
        }
      },
      "LoginResponseDto_Output": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "New JWT access token"
          },
          "refreshToken": {
            "type": "string",
            "description": "New JWT refresh token"
          },
          "user": {
            "type": "object",
            "description": "Current authenticated user info",
            "properties": {
              "id": {
                "description": "User UUID",
                "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)$",
                "examples": [
                  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
                ]
              },
              "role": {
                "description": "User role",
                "type": "string",
                "enum": [
                  "basic",
                  "pro"
                ]
              },
              "providerId": {
                "description": "Provider identifier (wallet address or email)",
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "loginMethod": {
                "description": "Authentication provider used for the current session",
                "type": "string",
                "enum": [
                  "email",
                  "evm_wallet",
                  "oauth",
                  "x"
                ]
              }
            },
            "required": [
              "id",
              "role",
              "providerId",
              "loginMethod"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "accessToken",
          "refreshToken",
          "user"
        ],
        "description": "Successful login response",
        "additionalProperties": false
      },
      "StartXLoginRequestDto": {
        "type": "object",
        "properties": {
          "returnTo": {
            "description": "Page to send the browser back to once the sign-in finishes, normally the page the user is on. Must be on the calling origin; defaults to that origin. Any fragment is dropped - the flow returns its ticket there.",
            "type": "string"
          },
          "handoffId": {
            "examples": [
              "login-2f8a1c"
            ],
            "description": "Names this sign-in attempt. Echoed back on the return URL so a browser that started more than one knows which secret this outcome belongs to.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{1,64}$"
          },
          "handoffChallenge": {
            "examples": [
              "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
            ],
            "description": "Base64url SHA-256 of a random verifier this browser keeps. The finished sign-in is redeemed by presenting that verifier, so only the browser that started the flow can collect it.",
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          }
        },
        "required": [
          "handoffId",
          "handoffChallenge"
        ],
        "description": "Start of the X sign-in flow"
      },
      "StartXLoginResponseDto_Output": {
        "type": "object",
        "properties": {
          "authorizeUrl": {
            "type": "string",
            "description": "X authorization URL to send the browser to. Expires with the flow's state."
          }
        },
        "required": [
          "authorizeUrl"
        ],
        "description": "Start of the X sign-in flow",
        "additionalProperties": false
      },
      "ExchangeXLoginRequestDto": {
        "type": "object",
        "properties": {
          "ticket": {
            "description": "Single-use ticket from the return URL fragment",
            "type": "string",
            "minLength": 1
          },
          "handoffVerifier": {
            "examples": [
              "dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk"
            ],
            "description": "The verifier whose challenge started this sign-in",
            "type": "string",
            "pattern": "^[A-Za-z0-9_-]{43}$"
          }
        },
        "required": [
          "ticket",
          "handoffVerifier"
        ],
        "description": "Redemption of a finished X sign-in for a session"
      },
      "RequestNonceRequestDto": {
        "type": "object",
        "properties": {
          "address": {
            "description": "Ethereum wallet address (0x-prefixed, 40 hex chars, lowercase)",
            "examples": [
              "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"
            ],
            "type": "string",
            "pattern": "^0x[a-fA-F0-9]{40}$"
          }
        },
        "required": [
          "address"
        ],
        "description": "Request a nonce for wallet authentication"
      },
      "RequestNonceResponseDto_Output": {
        "type": "object",
        "properties": {
          "nonce": {
            "type": "string",
            "description": "Nonce to sign with wallet"
          },
          "message": {
            "type": "string",
            "description": "Domain-bound wallet sign-in message"
          },
          "expiresAt": {
            "type": "integer",
            "description": "Unix timestamp when nonce expires",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "nonce",
          "message",
          "expiresAt"
        ],
        "description": "Nonce response for wallet authentication",
        "additionalProperties": false
      },
      "EmailRegisterRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "description": "Email address (lowercase)",
            "examples": [
              "trader@example.com"
            ],
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "password": {
            "description": "Password for authentication",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          },
          "accessCode": {
            "description": "Optional beta access code",
            "type": "string",
            "maxLength": 64
          }
        },
        "required": [
          "email",
          "password"
        ],
        "description": "Email registration request"
      },
      "MeResponseDto_Output": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User UUID",
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "role": {
            "type": "string",
            "description": "User role",
            "enum": [
              "basic",
              "pro"
            ]
          },
          "providerId": {
            "description": "Provider identifier (wallet address or email)",
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "loginMethod": {
            "type": "string",
            "description": "Authentication provider used for the current session",
            "enum": [
              "email",
              "evm_wallet",
              "oauth",
              "x"
            ]
          },
          "identities": {
            "type": "array",
            "description": "Every provider identity connected to this account, oldest first",
            "items": {
              "description": "One provider identity connected to the account",
              "type": "object",
              "properties": {
                "provider": {
                  "description": "Provider that owns this identity",
                  "type": "string",
                  "enum": [
                    "email",
                    "evm_wallet",
                    "oauth",
                    "x"
                  ]
                },
                "externalId": {
                  "description": "Immutable id the provider knows the account by: wallet address, email, or X numeric id",
                  "type": "string"
                },
                "connectedAt": {
                  "description": "ISO-8601 timestamp of when the identity was connected",
                  "type": "string"
                }
              },
              "required": [
                "provider",
                "externalId",
                "connectedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "id",
          "role",
          "providerId",
          "loginMethod",
          "identities"
        ],
        "description": "Current authenticated user info",
        "additionalProperties": false
      },
      "ApiKeyMeResponseDto_Output": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "User UUID that owns the API key",
            "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)$",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "role": {
            "type": "string",
            "description": "User role",
            "enum": [
              "basic",
              "pro"
            ]
          },
          "scope": {
            "type": "string",
            "description": "API key access scope",
            "enum": [
              "read",
              "read_write"
            ]
          },
          "authMethod": {
            "type": "string",
            "const": "api_key"
          }
        },
        "required": [
          "id",
          "role",
          "scope",
          "authMethod"
        ],
        "description": "Identity of the caller authenticated via an API key",
        "additionalProperties": false
      },
      "RefreshSessionResponseDto_Output": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "New JWT access token"
          },
          "tokenType": {
            "type": "string",
            "description": "Token type (always \"Bearer\")",
            "const": "Bearer"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Access token expiry time in seconds",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "accessToken",
          "tokenType",
          "expiresIn"
        ],
        "description": "Successful session refresh response",
        "additionalProperties": false
      },
      "RefreshTokenRequestDto": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "description": "Refresh token",
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "refreshToken"
        ],
        "description": "Refresh token request"
      },
      "RefreshTokenResponseDto_Output": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "description": "New JWT access token"
          },
          "refreshToken": {
            "type": "string",
            "description": "New JWT refresh token"
          },
          "tokenType": {
            "type": "string",
            "description": "Token type (always \"Bearer\")",
            "const": "Bearer"
          },
          "expiresIn": {
            "type": "integer",
            "description": "Access token expiry time in seconds",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "accessToken",
          "refreshToken",
          "tokenType",
          "expiresIn"
        ],
        "description": "Successful token refresh response",
        "additionalProperties": false
      },
      "ResendVerificationForRegisterRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "description": "Email address (lowercase)",
            "examples": [
              "trader@example.com"
            ],
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "email"
        ],
        "description": "Resend verification email by email address (unauthenticated)"
      },
      "VerifyEmailRequestDto": {
        "type": "object",
        "properties": {
          "token": {
            "description": "Verification token",
            "type": "string",
            "minLength": 1
          },
          "password": {
            "description": "Password for the email claim if using link-flow",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        },
        "required": [
          "token"
        ],
        "description": "Verify email claim using the token from the verification email"
      },
      "VerifyEmailResponseDto_Output": {
        "type": "object",
        "properties": {
          "verified": {
            "type": "boolean",
            "description": "Always true; the claim behind the token is now verified",
            "const": true
          },
          "email": {
            "type": "string",
            "description": "Email address the verified claim belongs to"
          },
          "flow": {
            "type": "string",
            "description": "Claim flow the token was issued for",
            "enum": [
              "register",
              "link"
            ]
          },
          "verifiedAt": {
            "type": "string",
            "description": "ISO-8601 timestamp of when the claim was verified"
          }
        },
        "required": [
          "verified",
          "email",
          "flow",
          "verifiedAt"
        ],
        "description": "Successful email verification response",
        "additionalProperties": false
      },
      "ChangePasswordRequestDto": {
        "type": "object",
        "properties": {
          "currentPassword": {
            "description": "Current password for the authenticated user",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          },
          "newPassword": {
            "description": "New password to set",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        },
        "required": [
          "currentPassword",
          "newPassword"
        ],
        "description": "Change password for an authenticated user"
      },
      "ForgotPasswordRequestDto": {
        "type": "object",
        "properties": {
          "email": {
            "description": "Email address (lowercase)",
            "examples": [
              "trader@example.com"
            ],
            "type": "string",
            "format": "email",
            "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          }
        },
        "required": [
          "email"
        ],
        "description": "Request a password reset link by email"
      },
      "ResetPasswordRequestDto": {
        "type": "object",
        "properties": {
          "token": {
            "description": "Password reset token",
            "type": "string",
            "minLength": 1
          },
          "password": {
            "description": "New password to set",
            "type": "string",
            "minLength": 8,
            "maxLength": 128
          }
        },
        "required": [
          "token",
          "password"
        ],
        "description": "Reset password using a password reset token"
      },
      "OauthInteractionDetailsResponseDto": {
        "type": "object",
        "properties": {
          "uid": {
            "description": "Interaction session identifier",
            "type": "string"
          },
          "prompt": {
            "description": "Prompt the interaction is currently awaiting",
            "type": "object",
            "properties": {
              "name": {
                "description": "Prompt name the interaction is currently awaiting, e.g. \"login\" or \"consent\"",
                "type": "string"
              },
              "details": {
                "description": "Prompt-specific details from the AS",
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "required": [
              "name",
              "details"
            ]
          },
          "params": {
            "description": "Original authorization request params",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "client": {
            "description": "OAuth client info for an interaction",
            "type": "object",
            "properties": {
              "clientId": {
                "description": "OAuth client identifier",
                "type": "string"
              },
              "clientName": {
                "description": "Human-readable client name",
                "type": "string"
              },
              "redirectUris": {
                "description": "Registered redirect URIs for the client",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "clientId",
              "redirectUris"
            ]
          }
        },
        "required": [
          "uid",
          "prompt",
          "params",
          "client"
        ],
        "description": "OAuth interaction details for the current prompt"
      },
      "OauthInteractionRedirectResponseDto": {
        "type": "object",
        "properties": {
          "returnTo": {
            "description": "Provider URL to redirect the browser back to",
            "type": "string"
          }
        },
        "required": [
          "returnTo"
        ],
        "description": "OAuth interaction redirect target after login/confirm/abort"
      },
      "OauthInteractionConfirmRequestDto": {
        "type": "object",
        "properties": {
          "scopes": {
            "description": "The scope set the user granted at consent (opaque to the AS; empty resolves to the read-only fail-safe)",
            "default": [],
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "description": "Consent confirmation body — the granted scope set"
      },
      "OauthGrantsResponseDto_Output": {
        "type": "object",
        "properties": {
          "grants": {
            "type": "array",
            "description": "The user active OAuth grants, newest first",
            "items": {
              "description": "One active OAuth grant the user has authorized",
              "type": "object",
              "properties": {
                "id": {
                  "description": "OAuth grant id — used to revoke this grant",
                  "type": "string"
                },
                "name": {
                  "description": "Human-readable client name, falling back to the client id when unnamed",
                  "type": "string"
                },
                "scopes": {
                  "description": "The granted scope set (opaque; the client interprets it)",
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "connectedAt": {
                  "description": "ISO timestamp when the grant was created",
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name",
                "scopes",
                "connectedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "grants"
        ],
        "description": "List of the user active OAuth grants",
        "additionalProperties": false
      }
    }
  },
  "tags": []
}
