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

# Get swap by reference



## OpenAPI

````yaml /openapi.json get /exchange/fx/convert/{reference}
openapi: 3.0.0
info:
  title: Juicyway API
  version: 1.0.0
servers: []
security: []
tags:
  - description: Payment APIs
    name: payments
  - description: Payouts APIs
    name: payouts
  - description: Exchange APIs
    name: exchange
  - description: Wallets APIs
    name: wallets
paths:
  /exchange/fx/convert/{reference}:
    get:
      tags:
        - Swaps
      summary: Get swap by reference
      operationId: Exchange.Web.SwapController.get_swap_by_ref
      parameters:
        - description: Swap reference
          in: path
          name: ref
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapResponse'
          description: Swap
        '404':
          $ref: '#/components/responses/not_found'
      callbacks: {}
components:
  schemas:
    SwapResponse:
      description: Response schema for swap
      properties:
        data:
          $ref: '#/components/schemas/SwapDetails'
      title: SwapResponse
      type: object
    SwapDetails:
      description: Swap details
      example:
        correlation_id: 7da742ea-a1bc-11ee-b907-560f156a658b
        created_at: '2021-01-01T00:00:00Z'
        customer:
          email: customer@email.com
          id: '1'
          name: User 1
          type: user
        id: 7da8e726-a1bc-11ee-80cf-560f156a658b
        provider:
          email: provider@email.com
          id: '1'
          name: Provider 1
          type: provider
        source_amount:
          amount: 1
          currency: USD
        status: success
        symbol: USD-NGN
        target_amount:
          amount: 1000
          currency: NGN
        updated_at: '2021-01-01T00:00:00Z'
      properties:
        client_reference:
          description: Reference
          nullable: true
          type: string
        correlation_id:
          description: Correlation ID
          type: string
        created_at:
          description: Creation timestamp
          format: date-time
          type: string
        customer:
          $ref: '#/components/schemas/Profile'
        fee_amount:
          description: Fee Amount
          type: number
        fee_currency:
          description: Fee Currency
          type: string
        id:
          description: Id
          type: string
        provider:
          $ref: '#/components/schemas/Profile'
        source_amount:
          description: Source Amount
          type: number
        source_currency:
          description: Source Currency
          type: string
        status:
          enum:
            - pending
            - success
            - failed
          type: string
        symbol:
          description: Currency pair
          type: string
        target_amount:
          description: Target Amount
          type: number
        target_currency:
          description: Target Currency
          type: string
        updated_at:
          description: Update timestamp
          format: date-time
          type: string
      title: SwapDetails
      type: object
    Profile:
      description: Profile Details
      example:
        email: customer@email.com
        id: '1'
        name: User 1
        type: user
      properties:
        email:
          description: Provider email
          nullable: true
          type: string
        id:
          description: Provider ID
          type: string
        name:
          description: Provider name
          nullable: true
          type: string
        type:
          description: Provider type
          type: string
      title: Profile
      type: object
  responses:
    not_found:
      content:
        application/json:
          schema:
            type: string
      description: Not Found

````