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

# Get trade by ID

> Returns detailed information about a specific trade using its unique identifier.

Returns detailed information about a specific trade using its unique identifier.

Use this endpoint to:

* Verify order execution details
* View settlement status
* Access transaction timestamps
* Review trade parameters

## Errors

| Status | Message                                                                         | Notes                                                                             |
| ------ | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| 400    | `Query validation failed`                                                       | Request didn't match schema, or `id` not found (v2 surfaces lookup misses as 400) |
| 401    | `The authorization key provided is either invalid or expired, please try again` | Mint a fresh JWT — see [Authentication](/v2/authentication)                       |
| 409    | `Request with this idempotency key is currently processing`                     | See [Errors → Idempotency](/v2/errors#idempotency-errors)                         |
| 422    | `Idempotency key reused with different parameters`                              | New body → new key                                                                |
| 500    | `An internal error has occurred`                                                | Server fault; retry with backoff                                                  |

See the full [v2 error reference](/v2/errors) for retry semantics and idempotency-specific codes.


## OpenAPI

````yaml GET /v2/brokerage/{orgId}/trade/{id}
openapi: 3.1.0
info:
  title: Overview of OpenFX APIs
  description: >-
    OpenFX provides a robust and secure API suite engineered for high
    performance and reliability, enabling programmatic access to real-time
    market data, trade execution, and money movement functionalities. This guide
    will walk through the step-by-step process of deposits, quoting, trading,
    settlements and monitoring using OpenFX APIs.
  version: v2.0.0
  termsOfService: https://www.openfx.com/terms
  contact:
    name: OpenFX Support
    email: support@openfx.com
    url: https://www.openfx.com
servers:
  - url: https://api.openfx.com
    description: OpenFX API Server
security:
  - bearerAuth: []
tags:
  - name: MarketData
    description: >-
      This endpoint retrieves a complete list of all tradable fiat and
      stablecoin currency pairs on the OpenFX platform.
  - name: Balances
    description: >-
      The Balance endpoints enable real-time tracking and management of currency
      holdings within an account.
  - name: Trade
    description: >-
      The Trade APIs facilitate programmatic currency exchange through a
      quote-then-trade workflow, ensuring price transparency and guaranteed
      execution at quoted rates.
  - name: Deposits
    description: >-
      Deposit endpoints enable secure funding of trading accounts across
      multiple supported currencies and methods.
  - name: Withdrawals
    description: >-
      The Withdrawal API facilitates secure fund withdrawals for both fiat and
      stablecoins.
paths:
  /v2/brokerage/{orgId}/trade/{id}:
    get:
      tags:
        - Trade
      summary: Get trade by ID
      description: >
        Provides detailed information on a specific trade using its unique
        identifier.
            
        Use this endpoint to:

        - Verify order execution details

        - View settlement status

        - Access transaction timestamps

        - Review trade parameters
      operationId: getTradeById
      parameters:
        - schema:
            type: string
          in: path
          name: orgId
          required: true
        - schema:
            type: string
          in: path
          name: id
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                      - error
                    example: success
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        example: 24753ee0-c3e9-4268-a48f-0cef3559f17f
                        description: Unique identifier for the trade
                      tradingPair:
                        type: string
                        example: USD/USDC
                        description: >-
                          Currency pair involved in the trade, in the format
                          `QUOTE/BASE`
                      referencedUnit:
                        type: string
                        example: USD
                        description: Currency symbol used to define the trade input amount
                      tradeDirection:
                        type: string
                        examples:
                          - BUY
                          - SELL
                        description: Direction of the trade relative to the user
                      amount:
                        type: number
                        example: 3333
                        description: >-
                          Amount specified by the user in the referenced
                          currency
                      computedAmount:
                        type: number
                        example: 3306.38229166667
                        description: Final calculated amount of the counter currency
                      createdAtUtc:
                        type: string
                        example: '2025-01-21T17:37:33.074Z'
                        description: UTC Timestamp when the trade was created
                      updatedAtUtc:
                        type: string
                        example: '2025-01-21T17:37:33.074Z'
                        description: UTC Timestamp when the trade was last updated
                      orderType:
                        type: string
                        example: MARKET
                        description: Type of trade order
                      status:
                        type: string
                        example: EXECUTED
                        description: Current status of the trade
                      source:
                        type: string
                        enum:
                          - API
                          - GUI
                          - OTC
                        example: API
                        description: Origin of the trade request
                  message:
                    type: string
                    example: Data fetched successfully
              examples:
                default_example:
                  value:
                    status: success
                    data:
                      id: b6e537a3-e673-4cd4-832a-cb67b66eb425
                      tradingPair: USDC/USD
                      referencedUnit: USDC
                      tradeDirection: BUY
                      amount: 3333
                      computedAmount: 3359.4960168
                      createdAtUtc: '2025-01-21T17:36:33.310Z'
                      updatedAtUtc: '2025-01-21T17:36:33.310Z'
                      orderType: MARKET
                      status: EXECUTED
                      source: GUI
        '400':
          description: Bad Request
          content:
            application/json:
              examples:
                default_example:
                  value:
                    status: error
                    message: Query validation failed
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                default_example:
                  value:
                    status: error
                    message: >-
                      The authorization key provided is either invalid or
                      expired, please try again
        '409':
          description: Conflict
          content:
            application/json:
              examples:
                default_example:
                  value:
                    status: error
                    message: Request with this idempotency key is currently processing
                    error:
                      code: IDEMPOTENCY_IN_FLIGHT
                      details: Please wait for the original request to complete
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              examples:
                default_example:
                  value:
                    status: error
                    message: Idempotency key reused with different parameters
                    error:
                      code: IDEMPOTENCY_MISMATCH
                      details: >-
                        This idempotency key was already used with different
                        request parameters
        '500':
          description: Internal Server Error
          content:
            application/json:
              examples:
                default_example:
                  value:
                    status: error
                    message: An internal error has occurred
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````