# Get Trades for Order

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /account/orders/{order_id}/trades:
    get:
      summary: Get Trades for Order
      deprecated: false
      description: Get list of trades for a specific order.
      tags:
        - One Trading Public REST API/Trading
      parameters:
        - name: order_id
          in: path
          description: The order ID to get trades for
          required: true
          example: e9765da8-1861-4cc8-1af3-6f89b079941a
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  trade_history:
                    type: array
                    items:
                      type: object
                      properties:
                        fee:
                          $ref: '#/components/schemas/Fee'
                        trade:
                          $ref: '#/components/schemas/Trade'
                      x-apidog-orders:
                        - fee
                        - trade
                      required:
                        - fee
                        - trade
                      x-apidog-ignore-properties: []
                x-apidog-orders:
                  - trade_history
                required:
                  - trade_history
                x-apidog-ignore-properties: []
              example:
                trade_history:
                  - fee:
                      fee_amount: '0.29'
                      fee_currency: EUR
                    trade:
                      trade_id: a7b6f4f8-0278-40a1-a435-7d02f93bafd0
                      order_id: ff119f4e-7918-4bec-8816-75d5b57865d1
                      account_id: 726288e6-a463-4f88-9068-024ae8f97a34
                      amount: '1'
                      side: SELL
                      instrument_code: SOL_EUR
                      price: '145'
                      time: '2024-11-14T10:26:57.241Z'
                      sequence: '58894265752'
                      matched_as: MAKER
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  error:
                    type: string
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
              example:
                error: Invalid order ID.
          headers: {}
          x-apidog-name: Bad Request
        '404':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  error:
                    type: string
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
              example:
                error: Order not found.
          headers: {}
          x-apidog-name: Not Found
      security: []
      x-apidog-folder: One Trading Public REST API/Trading
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-3612098-run
components:
  schemas:
    Trade:
      type: object
      properties:
        account_id:
          type: string
          format: uuid
          description: Account ID the trade belongs to
        order_id:
          type: string
          format: uuid
          description: Unique identifier of the order the trade belongs to
        trade_id:
          type: string
          format: uuid
          description: Unique identifier of the trade
        time:
          type: string
          description: The time the trade was executed ((ISO 8601, milisecond precision)
          format: date-time
          deprecated: true
        time_nanos:
          type: string
          format: date-time
          description: The time the trade was executed ((ISO 8601, nanosecond precision)
        instrument_code:
          type: string
          description: The market identifier for the trade
        side:
          type: string
          enum:
            - BUY
            - SELL
          x-apidog-enum:
            - value: BUY
              name: ''
              description: ''
            - value: SELL
              name: ''
              description: ''
          description: BUY or SELL
        matched_as:
          type: string
          enum:
            - MAKER
            - TAKER
          x-apidog-enum:
            - value: MAKER
              name: ''
              description: ''
            - value: TAKER
              name: ''
              description: ''
          description: MAKER or TAKER
        amount:
          type: string
          description: The quantity that has been executed, expressed in the base currency.
          deprecated: true
        filled_amount:
          type: string
          description: The quantity that has been executed, expressed in the base currency.
        price:
          type: string
          description: The price at which the trade matched at
        sequence:
          type: string
          description: An incremental identifier for tracking the trade in the exchange
        position_id:
          type: string
          format: uuid
          description: >-
            The ID of the position associated with this trade. Included only for
            trades executed on perpetual markets.
        prev_position_id:
          type: string
          format: uuid
          description: >-
            If the trade causes a position flip (long to short or short to
            long), this field specifies the ID of the position closed by the
            trade. Present only for perpetual-market trades that result in a
            position flip.
        open_position_amount:
          type: string
          description: >-
            The post-execution open position amount. This field is included only
            for trades executed on perpetual markets.
      x-apidog-orders:
        - account_id
        - order_id
        - trade_id
        - time
        - time_nanos
        - instrument_code
        - side
        - matched_as
        - amount
        - filled_amount
        - price
        - sequence
        - position_id
        - prev_position_id
        - open_position_amount
      required:
        - account_id
        - order_id
        - trade_id
        - time
        - time_nanos
        - instrument_code
        - side
        - matched_as
        - amount
        - filled_amount
        - price
        - sequence
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    Fee:
      type: object
      properties:
        fee_amount:
          type: string
          description: The amount paid in the fee currency
        fee_currency:
          type: string
          description: The currency the fee was paid in
      x-apidog-orders:
        - fee_amount
        - fee_currency
      required:
        - fee_amount
        - fee_currency
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.onetrading.com/fast/v1
    description: Production Env
security: []

```