# Get Trade by Trade ID

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /account/trade/{trade_id}:
    get:
      summary: Get Trade by Trade ID
      deprecated: false
      description: >-
        Get information about an executed trade using the exchange generated
        trade_id.


        Will only return trades from the last 30 days.
      tags:
        - One Trading Public REST API/Trading
      parameters:
        - name: trade_id
          in: path
          description: The trade ID to fetch trade details for
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                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: []
          headers: {}
          x-apidog-name: Success
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
          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: []
          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-3612100-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: []

```