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

# Get Account Completed Orders

> This endpoint retrieves the account completed orders.



## OpenAPI

````yaml GET /api/v1/completed-orders
openapi: 3.1.0
info:
  title: User Account API
  version: 1.0.0
servers:
  - url: https://user-account.sandbox.rails.xyz
security: []
paths:
  /api/v1/completed-orders:
    get:
      summary: Get Account Completed Orders
      operationId: getAccountCompletedOrders
      parameters:
        - $ref: '#/components/parameters/startDate'
        - $ref: '#/components/parameters/endDate'
        - $ref: '#/components/parameters/start'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/completedOrdersResponse'
              example:
                completedOrders:
                  - market: ETH-USDT
                    matchId: a59141f0-9c13-4ec8-bc37-beceb7fb284a
                    orderId: 01JP39KFBF8SHJAT3ERHPF3YSP
                    orderType: buy
                    executionType: maker
                    fillType: complete
                    price: '1949'
                    quantity: '273.78842139'
                    tradeType: limit
                    fees: '533.61363328'
                    triggerType: none
                    triggerPrice: '0'
                    transactionHash: >-
                      335a50808317116f2fc1147277bcc226e0e52dfea7b15899d66add371d2ab499
                    filledAt: 1747426816421
                  - market: BTC-USDT
                    matchId: 6d6ca016-fd1d-415a-8a83-25a1f5fc02f4
                    orderId: 01JP390Z8WVR9EP6X1P187P722
                    orderType: sell
                    executionType: taker
                    fillType: complete
                    price: '82850.59187039'
                    quantity: '6.34127086'
                    tradeType: market
                    fees: '525.37804396'
                    triggerType: none
                    triggerPrice: '0'
                    transactionHash: >-
                      4dfb16c92be57701a4498b37c9af9ece0d1109bef5350d9a891e5f2f64eaf6d2
                    filledAt: 1747426816421
                last: >-
                  BTC-USDT#FEES#01JP390Z8WVR9EP6X1P187P722#01JP36QTCRJCGN7NC0CPZ22NAB@1741719371497
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - bearerAuth: []
components:
  parameters:
    startDate:
      name: startDate
      in: query
      required: false
      description: >-
        This is a parameter to support querying by date. The value should be in
        the format of milliseconds since epoch. It can be used alone or in
        conjunction with the `endDate` parameter.
      schema:
        type: number
    endDate:
      name: endDate
      in: query
      required: false
      description: >-
        This is a parameter to support querying by date. The value should be in
        the format of milliseconds since epoch. It can be used alone or in
        conjunction with the `startDate` parameter.
      schema:
        type: number
    start:
      name: start
      in: query
      required: false
      description: >-
        This is a parameter to support pagination. Get the value from the `last`
        field if present in the previous response.
      schema:
        type: string
  schemas:
    completedOrdersResponse:
      type: object
      properties:
        completedOrders:
          type: array
          description: List of completed (filled) orders for the account.
          items:
            type: object
            properties:
              market:
                type: string
                description: >-
                  Market name. Example value: `ETH-USDT`. To get all supported
                  markets, call
                  [/api/v1/markets](/latest/perps/rest-api/get-supported-markets)
                  endpoint.
              matchId:
                type: string
                description: Unique identifier for the trade match.
              orderId:
                type: string
                description: Unique identifier for the order.
              orderType:
                type: string
                enum:
                  - buy
                  - sell
                description: Order side.
              executionType:
                type: string
                enum:
                  - taker
                  - maker
                description: Order execution role.
              fillType:
                type: string
                enum:
                  - complete
                  - partial
                description: Fill type.
              price:
                type: string
                description: Order fill price.
              quantity:
                type: string
                description: Order fill quantity.
              tradeType:
                type: string
                enum:
                  - market
                  - limit
                description: Order type.
              fees:
                type: string
                description: Fees paid for the order.
              triggerType:
                type: string
                enum:
                  - none
                  - take_profit
                  - stop_loss
                  - liquidation
                description: Trigger type for the order.
              triggerPrice:
                type: string
                description: Trigger price for the order.
              transactionHash:
                type: string
                description: Transaction hash for the trade.
              filledAt:
                type: number
                description: Order fill timestamp (milliseconds since epoch).
            required:
              - market
              - matchId
              - orderId
              - orderType
              - executionType
              - fillType
              - price
              - quantity
              - tradeType
              - fees
              - triggerType
              - triggerPrice
              - transactionHash
              - filledAt
        last:
          $ref: '#/components/schemas/last'
      required:
        - completedOrders
    last:
      type: string
      description: >-
        This is a field in the response to support pagination. Use this value if
        present for the `start` parameter of the following request to get the
        next page of results.
  responses:
    Unauthorized:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: A human-readable message describing the error.
            required:
              - message
          example:
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````