> ## 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.

# List Orders

> List Orders.

Returns the authenticated user's orders.

**Base URL:** `https://api.dexbuilder.com`

**Authentication:** Use a Broker API Key and sign this request with `Timestamp` and `SIGN`. Pass a wallet address that belongs to your Broker in `X-User-Wallet-Address`. Calculate the signature using the external Broker path. See [Broker API Key and signing](https://dexbuilder.mintlify.site/en/api-reference/common/broker-authentication.md) and [Access on behalf of a user](https://dexbuilder.mintlify.site/en/api-reference/common/sub-user-wallet.md).

## Request

```bash theme={null}
curl -X GET "https://api.dexbuilder.com/api/v4/broker/prediction/orders" \
  -H "KEY: ${BROKER_API_KEY}" \
  -H "SIGN: ${SIGN}" \
  -H "Timestamp: ${TIMESTAMP}" \
  -H "X-User-Wallet-Address: ${USER_WALLET}"
```

Filter by market, condition, status, time range, and cursor using the supported query parameters.

The OpenAPI panel below is the source of truth for required parameters, types, enum values, and request-body fields. Timestamps are Unix timestamps unless the field description states otherwise.

## Response

Returns an order list with order ID, client order ID, token and condition IDs, side, type, price, quantities, status, and timestamps.

A successful response uses HTTP 200. Invalid parameters or request bodies return HTTP 400. Private endpoints can return HTTP 401 when authentication fails, and temporary upstream failures can return HTTP 503. The error response contains a machine-readable label and message.

For order, position, claim, transfer, and account operations, treat the response as the current server result and query the resource again when the operation is asynchronous.


## OpenAPI

````yaml openapi/event-markets-en.yaml GET /api/v4/broker/prediction/orders
openapi: 3.0.3
info:
  title: DexBuilder Prediction Markets API
  version: 1.0.0
  description: DexBuilder Prediction Markets REST API.
servers:
  - url: https://api.dexbuilder.com
security: []
paths:
  /api/v4/broker/prediction/orders:
    get:
      summary: List Orders
      description: List Orders.
      operationId: query_orders
      parameters:
        - name: Timestamp
          in: header
          required: true
          description: >-
            Unix timestamp in seconds; the gateway allows at most 60 seconds of
            clock skew.
          schema:
            type: string
        - name: SIGN
          in: header
          required: true
          description: >-
            Hexadecimal HMAC-SHA512 signature over the external request path,
            query string, and body.
          schema:
            type: string
        - name: X-User-Wallet-Address
          in: header
          required: true
          description: >-
            End-user wallet address. The gateway checks that this wallet belongs
            to the current Broker.
          schema:
            type: string
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - processing
              - open
              - matched
              - canceled
              - failed
            description: Lowercase REST order status
        - name: condition_id
          in: query
          required: false
          schema:
            type: string
        - name: event_id
          in: query
          required: false
          schema:
            type: string
        - name: order_id
          in: query
          required: false
          schema:
            type: string
        - name: client_order_id
          in: query
          required: false
          schema:
            type: string
        - name: sort_type
          in: query
          required: false
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: from
          in: query
          required: false
          schema:
            type: integer
        - name: to
          in: query
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventMarketsOrderListResponse'
        '400':
          description: Invalid request or parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BrokerAPIKey: []
components:
  schemas:
    EventMarketsOrderListResponse:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/OrderListItem'
        next_cursor:
          type: string
      description: Response object.
    Error:
      type: object
      description: Error response.
      properties:
        label:
          type: string
          example: INVALID_ARGUMENT
        message:
          type: string
          example: invalid request
    OrderListItem:
      type: object
      properties:
        client_order_id:
          type: string
        condition_id:
          type: string
        created_at:
          type: integer
        error_code:
          type: string
        event_id:
          type: string
        expire_time:
          type: integer
        order_id:
          type: string
        order_mode:
          type: string
          enum:
            - LIMIT
            - MARKET
          description: 'Execution mode: LIMIT or MARKET'
        order_type:
          type: string
          enum:
            - GTC
            - GTD
            - FOK
            - FAK
          description: 'Time-in-force: GTC, GTD, FOK, or FAK'
        outcome:
          type: string
        price:
          type: string
        side:
          type: string
        size:
          type: string
        size_left:
          type: string
        size_matched:
          type: string
        status:
          type: string
          enum:
            - processing
            - open
            - matched
            - canceled
            - failed
          description: Lowercase REST order status
        token_id:
          type: string
        updated_at:
          type: integer
      description: Response object.
  securitySchemes:
    BrokerAPIKey:
      type: apiKey
      in: header
      name: KEY
      description: Broker API Key, created through the project administrator's process.

````

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