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

# List swaps

> Returns up to 50 swaps for your organisation, newest first. Optionally filter by `customerId`. Requires `api:read` scope.



## OpenAPI

````yaml /openapi.yaml get /swaps
openapi: 3.1.0
info:
  title: Remitflex API
  version: 1.0.0
  description: >
    Programmatic access to Remitflex payment routes, fiat rates, customers, and
    transactions.


    **Dashboard:** Create API keys at https://dashboard.remitflex.io


    **Authentication:** Send your API key as `Authorization: Bearer
    rmf_live_...` or `rmf_test_...`.


    **Idempotency:** Mutating requests (`POST`, `PUT`, `PATCH`, `DELETE`)
    require an `Idempotency-Key` header when authenticated with an API key.
servers:
  - url: http://localhost:4000/v1
    description: Local development
  - url: https://api.remitflex.io/v1
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /swaps:
    get:
      tags:
        - Swaps
      summary: List swaps
      description: >-
        Returns up to 50 swaps for your organisation, newest first. Optionally
        filter by `customerId`. Requires `api:read` scope.
      operationId: listSwaps
      parameters:
        - $ref: '#/components/parameters/CustomerIdQuery'
      responses:
        '200':
          description: Swaps fetched
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/SuccessEnvelope'
                  - type: object
                    properties:
                      data:
                        type: object
                        properties:
                          swaps:
                            type: array
                            items:
                              $ref: '#/components/schemas/Swap'
                          total:
                            type: integer
              examples:
                success:
                  $ref: 39d1146b-095d-44a3-86bb-0a9ac748e4fd
      security:
        - ApiKeyAuth: []
components:
  parameters:
    CustomerIdQuery:
      name: customerId
      in: query
      required: false
      description: Filter results to a single customer under your organisation.
      schema:
        type: string
        format: uuid
        example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
  schemas:
    SuccessEnvelope:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
        data:
          nullable: true
    Swap:
      type: object
      properties:
        id:
          type: string
          format: uuid
        customerId:
          type: string
          format: uuid
        customerName:
          type: string
        status:
          type: string
          enum:
            - awaiting_deposit
            - deposit_received
            - swapping
            - completed
            - failed
            - expired
            - cancelled
            - refunded
        from:
          type: string
        to:
          type: string
        tradeType:
          type: string
          enum:
            - exact_input
            - exact_output
        amount:
          type: number
        expectedAmount:
          type: string
          description: Atomic units for the request amount (send or receive per tradeType).
        sendAmount:
          type: string
          nullable: true
          description: Atomic units the payer should send (from Relay quote).
        sendAmountHuman:
          type: number
          nullable: true
        receivedAmount:
          type: string
          nullable: true
        outputAmount:
          type: string
          nullable: true
        rate:
          type: number
          nullable: true
        feeBps:
          type: integer
        depositAddress:
          type: string
          description: Relay Solana deposit address for the origin token.
        relayRequestId:
          type: string
          nullable: true
        relayStatus:
          type: string
          nullable: true
        refundTo:
          type: string
          nullable: true
        originChainId:
          type: integer
          example: 792703809
        destinationAddress:
          type: string
        depositTxHash:
          type: string
          nullable: true
        inTxHashes:
          type: array
          items:
            type: string
        outTxHashes:
          type: array
          items:
            type: string
        errorMessage:
          type: string
          nullable: true
          description: Human-readable failure/refund reason when terminal.
        expiresAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        expectedOutput:
          type: number
          nullable: true
        receivedOutput:
          type: number
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >
        API key created in the Remitflex Dashboard at dashboard.remitflex.io
        (`rmf_live_...` or `rmf_test_...`).

        Key management endpoints require a dashboard JWT and are not part of
        this reference.

````