> ## 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.

# List trades

> Returns a paginated list of all trades for the organization, including completed and pending orders.

Returns a paginated list of all trades for the organization, covering both completed and pending orders.

Use this endpoint to:

* Track trading activity
* Monitor order statuses
* Generate trading reports
* Reconcile transactions

## Errors

| Status | Message                                                                         | Notes                                                       |
| ------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| 400    | `Query validation failed`                                                       | Request didn't match schema                                 |
| 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}/trades
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}/trades:
    get:
      tags:
        - Trade
      summary: List trades
      description: >
        Returns a comprehensive list of all orders, including both completed and
        pending transactions.
            
        Use this endpoint to:

        - Track trading activity

        - Monitor order statuses

        - Generate trading reports

        - Reconcile transactions
      operationId: ListTrades
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type:
              - number
              - 'null'
            minimum: 1
            example: 1
          example: 1
        - name: limit
          in: query
          required: false
          schema:
            type:
              - number
              - 'null'
            minimum: 1
            maximum: 50
            example: 10
          example: 10
        - schema:
            type: string
          in: path
          name: orgId
          required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                      - error
                    example: success
                  data:
                    type: array
                    items:
                      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
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          total:
                            type: number
                            example: 10
                          start:
                            type: number
                            example: 1
                          end:
                            type: number
                            example: 2
                          page:
                            type: number
                            example: 1
                          limit:
                            type: number
                            example: 2
              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
                      - id: 93f7189a-0c14-4bf4-8004-1266bd14fbbf
                        tradingPair: USDC/USD
                        referencedUnit: USD
                        tradeDirection: SELL
                        amount: 30507.8873260065
                        computedAmount: 18914.8854134015
                        createdAtUtc: '2025-01-16T04:52:18.167Z'
                        updatedAtUtc: '2025-01-16T04:52:18.167Z'
                        orderType: MARKET
                        status: EXECUTED
                        source: API
                    meta:
                      pagination:
                        total: 2
                        start: 1
                        end: 2
                        page: 1
                        limit: 2
        '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

````