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

# Retrieve Swap

> Returns the status of a specific swap, by the id returned from POST /swaps.



## OpenAPI

````yaml /openapi/api-v1-native.yml get /swaps/{id}
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    Hand-written V1 endpoints. Merged into the GraphqlRestProxy-generated schema
    at build time.
  version: v1
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.whop.com/api/v1
security: []
paths:
  /swaps/{id}:
    get:
      tags:
        - Swaps
      summary: Retrieve Swap
      description: >-
        Returns the status of a specific swap, by the id returned from POST
        /swaps.
      operationId: retrieveSwap
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Swap ID returned from POST /swaps.
      responses:
        '200':
          description: swap status retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - swap
                  id:
                    type: string
                    description: Swap ID.
                  account_id:
                    type: string
                    description: Account ID that owns the wallet used for the swap.
                  status:
                    type: string
                    description: Current swap status.
                  tx_hashes:
                    type: array
                    items:
                      type: string
                    description: On-chain transaction hashes produced by the swap.
                  error:
                    type:
                      - string
                      - 'null'
                    description: Latest error returned for a failed swap.
                required:
                  - object
                  - id
                  - account_id
                  - status
                  - tx_hashes
        '400':
          $ref: '#/components/responses/InvalidParameters'
          description: swap id is invalid
        '403':
          $ref: '#/components/responses/Forbidden'
          description: credential lacks the crypto-wallet scope
        '404':
          $ref: '#/components/responses/NotFound'
          description: swap does not exist
      security:
        - bearerAuth:
            - crypto_wallet:swap
components:
  responses:
    InvalidParameters:
      description: Invalid Parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/V1ErrorResponse'
  schemas:
    V1ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              description: Machine-readable error code.
            message:
              type: string
              description: Human-readable error message.
          required:
            - type
            - message
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: auth-scheme
      description: >-
        An account API key, account scoped JWT, app API key, or user OAuth
        token.

````