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

# Get Status

> Returns the status and details of a specific swap by ID



## OpenAPI

````yaml GET /swap/{swapId}
openapi: 3.1.0
info:
  title: Bestflow API
  description: >-
    Bestflow is a cryptocurrency exchange aggregator that provides cross-chain
    swap capabilities without any additional fees. It aggregates multiple
    exchanges to offer users the best rates and seamless cryptocurrency swaps
    across different networks.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.bestflow.xyz
security:
  - {}
  - bearerAuth: []
paths:
  /swap/{swapId}:
    get:
      description: Returns the status and details of a specific swap by ID
      parameters:
        - name: swapId
          in: path
          description: Unique identifier for the swap
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Swap status retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapStatusResponse'
        '400':
          description: >-
            Invalid swap ID format, unknown exchange prefix, or validation
            failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: Swap not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected server failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
components:
  schemas:
    SwapStatusResponse:
      type: object
      required:
        - id
        - exchange
        - status
        - from
        - to
        - fromNetwork
        - toNetwork
        - sendAmount
        - estReceive
        - sendAddress
        - sendMemo
        - receiveAddress
        - receiveMemo
        - hashIn
        - hashOut
        - createdAt
      properties:
        id:
          type: string
          description: Unique identifier for the swap
        exchange:
          type: string
          enum:
            - swapter
            - etzswap
            - pegasusswap
          description: Exchange identifier
        status:
          type: string
          description: Current swap status
          enum:
            - Waiting
            - Confirmation
            - Confirmed
            - Exchanging
            - Sending
            - Success
            - Frozen
            - Refunded
            - Overdue
            - Suspended
            - Error
        from:
          type: string
        to:
          type: string
        fromNetwork:
          type: string
        toNetwork:
          type: string
        sendAmount:
          type: number
          description: Expected deposit amount
        estReceive:
          type: number
          description: Estimated amount to be received
        sendAddress:
          type: string
          description: Deposit address
        sendMemo:
          type:
            - string
            - 'null'
          description: Deposit memo/tag; null when absent
        receiveAddress:
          type: string
          description: Destination address
        receiveMemo:
          type:
            - string
            - 'null'
          description: Destination memo/tag; null when absent
        hashIn:
          type:
            - string
            - 'null'
          description: Inbound transaction hash
        hashOut:
          type:
            - string
            - 'null'
          description: Outbound transaction hash
        createdAt:
          type: string
          format: date-time
          description: Swap creation timestamp in ISO 8601 format
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Error code
          enum:
            - VALIDATION_ERROR
            - INVALID_FORMAT
            - UNKNOWN_EXCHANGE
            - SWAP_ERROR
            - SWAP_NOT_FOUND
            - UNAUTHORIZED
            - RATE_LIMITED
            - SERVICE_UNAVAILABLE
        message:
          type: string
          description: Human-readable error message
  responses:
    UnauthorizedError:
      description: Invalid or unknown API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: UNAUTHORIZED
            message: Invalid API key
    ServiceUnavailableError:
      description: Auth dependency unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: SERVICE_UNAVAILABLE
            message: Auth service unavailable
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Optional Bearer authentication using an API key provided as a Bearer
        token. Required for unlimited requests and revenue sharing.

````