> ## Documentation Index
> Fetch the complete documentation index at: https://dexbuilder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 查询持仓列表

> 查询持仓列表

> [!NOTE]
>
> 此接口仅供 Broker 使用。请求须携带 Broker API Key、`Timestamp`、`SIGN` 和 `X-User-Wallet-Address`。网关确认钱包属于当前 Broker 后转发。请按外部 `/api/v4/broker/...` 路径计算签名。详见[Broker API 认证与签名](https://dexbuilder.mintlify.site/zh/event-markets/api/broker-authentication.md).

查询持仓列表。


## OpenAPI

````yaml openapi/event-markets.yaml GET /api/v4/broker/prediction/positions
openapi: 3.0.3
info:
  title: DexBuilder Prediction Market API
  version: 1.0.0
  description: DexBuilder 事件市场 REST API
servers:
  - url: https://api.dexbuilder.com
security: []
paths:
  /api/v4/broker/prediction/positions:
    get:
      summary: 查询持仓列表
      description: 查询持仓列表
      operationId: query_positions
      parameters:
        - name: Timestamp
          in: header
          required: true
          description: Unix 秒级时间戳，与网关时间差不超过 60 秒
          schema:
            type: string
        - name: SIGN
          in: header
          required: true
          description: 按实际外部请求路径、Query 和 Body 生成的 HMAC-SHA512 十六进制签名
          schema:
            type: string
        - name: X-User-Wallet-Address
          in: header
          required: true
          description: 目标终端用户的钱包地址；网关校验该钱包属于当前 Broker
          schema:
            type: string
        - name: event_id
          in: query
          required: false
          schema:
            type: string
        - name: condition_id
          in: query
          required: false
          schema:
            type: string
        - name: settlement_status
          in: query
          required: false
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: 请求成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMarketsPositionListResponse'
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 认证失败
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Broker 权限不足，或目标钱包未通过归属校验
        '503':
          description: 服务暂时不可用
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BrokerAPIKey: []
components:
  schemas:
    EventMarketsPositionListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PositionListItem'
        next_cursor:
          type: string
      description: 响应对象。
    Error:
      type: object
      description: 错误响应。
      properties:
        label:
          type: string
          example: INVALID_ARGUMENT
        message:
          type: string
          example: invalid request
    PositionListItem:
      type: object
      properties:
        available_size:
          type: string
        avg_open_price:
          type: string
        claimable_amount:
          type: string
        event_id:
          type: string
        locked_size:
          type: string
        outcome:
          type: string
        position_id:
          type: string
        position_value:
          type: string
        settlement_status:
          type: string
        size:
          type: string
        token_id:
          type: string
        updated_at:
          type: integer
        won:
          type: boolean
      description: 响应对象。
  securitySchemes:
    BrokerAPIKey:
      type: apiKey
      in: header
      name: KEY
      description: Broker API Key（由项目方管理流程创建）

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.