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

# Get user orders

> Order history for one user of your app, newest first. Filter with `status`, `orderId` and `quoteId`; legs of one multi-venue trade share a `quoteId`. Authenticate with an `x-app-api-key` of either scope: a `read` key can read any user of your app, so treat it as a credential over your users' full trading history.



## OpenAPI

````yaml /openapi/openapi.json get /apps/{appId}/users/{userId}/orders
openapi: 3.0.2
info:
  title: AGG API
  version: 1.0.0
  description: >-
    Prediction market aggregator REST API — authentication, users, venue events,
    venue markets, orderbooks, charts, and execution workflows.
servers:
  - url: https://api.agg.market
    description: Production
  - url: https://api.staging.agg.market
    description: Staging
security: []
paths:
  /apps/{appId}/users/{userId}/orders:
    get:
      tags:
        - App Management
      summary: Get user orders
      description: >-
        Order history for one user of your app, newest first. Filter with
        `status`, `orderId` and `quoteId`; legs of one multi-venue trade share a
        `quoteId`. Authenticate with an `x-app-api-key` of either scope: a
        `read` key can read any user of your app, so treat it as a credential
        over your users' full trading history.
      operationId: getAppUserOrders
      parameters:
        - name: appId
          in: path
          required: true
          schema:
            type: string
        - name: userId
          in: path
          required: true
          schema:
            type: string
        - name: orderId
          in: query
          required: false
          schema:
            type: string
        - name: quoteId
          in: query
          required: false
          schema:
            type: string
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - pending
              - signing
              - pending_bridge
              - submitting
              - submitted
              - open
              - partially_filled_open
              - cancel_pending
              - filled
              - partial_fill
              - failed
              - expired
              - cancelled
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 100
            type: integer
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - nextCursor
                  - hasMore
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      required:
                        - id
                        - quoteId
                        - venue
                        - status
                        - side
                        - amountRaw
                        - limitPriceRaw
                        - timeInForce
                        - expiresAt
                        - slippageBps
                        - quotedPriceRaw
                        - quotedCostRaw
                        - quotedSharesRaw
                        - quotedToWinRaw
                        - filledAmountRaw
                        - executionPrice
                        - actualSharesRaw
                        - actualToWinRaw
                        - partialFillReason
                        - txHash
                        - errorMessage
                        - dagRunId
                        - createdAt
                        - updatedAt
                        - venueMarket
                        - venueMarketOutcome
                      properties:
                        id:
                          type: string
                        quoteId:
                          type: string
                          nullable: true
                        venue:
                          type: string
                          enum:
                            - kalshi
                            - polymarket
                            - limitless
                            - opinion
                            - predict
                            - probable
                            - myriad
                            - hyperliquid
                        status:
                          type: string
                        side:
                          type: string
                        amountRaw:
                          type: string
                        orderType:
                          type: string
                          enum:
                            - market
                            - limit
                        limitPriceRaw:
                          type: string
                          nullable: true
                        limitSizeRaw:
                          type: string
                          nullable: true
                        timeInForce:
                          type: string
                          enum:
                            - GTC
                            - GTD
                            - FOK
                            - FAK
                            - IOC
                            - ALO
                          nullable: true
                        postOnly:
                          type: boolean
                        expiresAt:
                          format: date-time
                          type: string
                          nullable: true
                        reservedCostRaw:
                          type: string
                          nullable: true
                        filledSizeRaw:
                          type: string
                          nullable: true
                        filledCostRaw:
                          type: string
                          nullable: true
                        remainingSizeRaw:
                          type: string
                          nullable: true
                        averageFillPriceRaw:
                          type: string
                          nullable: true
                        venueOrderId:
                          type: string
                          nullable: true
                        cancelRequestedAt:
                          type: string
                          nullable: true
                        cancelledAt:
                          type: string
                          nullable: true
                        slippageBps:
                          type: number
                          nullable: true
                        quotedPriceRaw:
                          type: string
                          nullable: true
                        quotedCostRaw:
                          type: string
                          nullable: true
                        quotedSharesRaw:
                          type: string
                          nullable: true
                        quotedToWinRaw:
                          type: string
                          nullable: true
                        filledAmountRaw:
                          type: string
                          nullable: true
                        executionPrice:
                          type: string
                          nullable: true
                        actualSharesRaw:
                          type: string
                          nullable: true
                        actualToWinRaw:
                          type: string
                          nullable: true
                        partialFillReason:
                          type: string
                          nullable: true
                        txHash:
                          type: string
                          nullable: true
                        errorMessage:
                          type: string
                          nullable: true
                        dagRunId:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                        updatedAt:
                          type: string
                        venueMarket:
                          type: object
                          required:
                            - id
                            - venueEventId
                            - question
                            - image
                          properties:
                            id:
                              type: string
                            venueEventId:
                              type: string
                            question:
                              type: string
                            image:
                              type: string
                              nullable: true
                          nullable: true
                        venueMarketOutcome:
                          type: object
                          required:
                            - label
                            - title
                          properties:
                            label:
                              type: string
                            title:
                              type: string
                              nullable: true
                          nullable: true
                  nextCursor:
                    type: string
                    nullable: true
                  hasMore:
                    type: boolean
        '401':
          description: '401'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '403':
          description: '403'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                required:
                  - message
                properties:
                  message:
                    type: string
      security:
        - appApiKey: []
components:
  securitySchemes:
    appApiKey:
      type: apiKey
      in: header
      name: x-app-api-key
      description: App-scoped API key for programmatic app management.

````